/macros/OptionsEdition
Type: /type/macro
macro: value: $def with (page)

$ booksense = "http://booksense.com/product/info.jsp?isbn=XXX"
$ amazon = "http://www.amazon.com/gp/product/XXX?tag=openlibr-20"
$ abebooks = "http://clickserve.cc-dt.com/link/tplclick?lid=41000000024660875&pubid=21000000000172077&isbn=XXX"
$ alibris = " http://click.linksynergy.com/fs-bin/click?id=eSmaWuUpnDY&offerid=99238.122856000&type=2&subid=0&tmpid=939&RD_PARM1=http%253A%252F%252Fwww.alibris.com/booksearch%253Fqsort%253Dp%2526isbn%253DXXX"
$ barnesandnoble = "http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ISBN=XXXafsrc=1&lkid=J14933426&pubid=K172077"
$ powells = "http://www.powells.com/partner/33286/biblio/XXX"

$ worldcat = "http://worldcat.org/isbn/XXX"
$ worldcatoclc = "http://worldcat.org/oclc/XXX"
$ bookmooch = "http://www.bookmooch.com/detail/XXX"
$ titletrader = "http://www.titletrader.com/invinfo/XXX.html"
$ google = "http://books.google.com/books?vid=ISBNXXX"

$ viewbook = "http://www.archive.org/stream/XXX"
$ detailbook = "http://www.archive.org/details/XXX"
$ downloadbook = "http://www.archive.org/download/XXX/XXX.pdf"
$ djvu = "http://www.archive.org/stream/XXX/XXX.djvu"
$ djvutxt = "http://www.archive.org/download/XXX/XXX_djvu.txt"
$ seeall = "http://www.archive.org/download/XXX"

<div id="nav" style="margin-top: 0px;">
<div id="options">
<div class="navouter">
<img src="/static/images/nav.top.png" alt="Options" border="0" />
<div class="navinner">

<div class="navinner-padding">
<span class="navheader">Buy</span> <br />

$ isbn_10 = (page.isbn_10 and page.isbn_10[0]) or ""
$ oclc_numbers = (page.oclc_numbers and page.oclc_numbers[0]) or ""

$if isbn_10:
    <div class="navsubheader">
    <a href="$amazon.replace('XXX', isbn_10)" class="datalink">Amazon</a><br />
    <a href="$abebooks.replace('XXX', isbn_10)" class="datalink">Abebooks</a><br />
    <a href="$alibris.replace('XXX', isbn_10)" class="datalink">Alibris</a><br />
    <a href="$barnesandnoble.replace('XXX', isbn_10)" class="datalink">Barnes and Noble</a><br />
    <a href="$powells.replace('XXX', isbn_10)" class="datalink">Powells</a>
    </div>
$else:
    <div class="navsubheader"><em>Not available for this book.</em></div>

<br />
<span class="navheader">Borrow</span> <br />
$if isbn_10:
    <div class="navsubheader">
    <a href="$worldcat.replace('XXX', isbn_10)" class="datalink">Your local library</a><br />
    <a href="$bookmooch.replace('XXX', isbn_10)" class="datalink">BookMooch</a><br />
    <a href="$titletrader.replace('XXX', isbn_10)" class="datalink">Title Trader</a><br />
    </div>
$elif oclc_numbers:
    <div class="navsubheader">
    <a href="$worldcatoclc.replace('XXX', oclc_numbers)" class="datalink">Your local library</a><br />
    </div>
$else:
    <div class="navsubheader"><em>Not available for this book.</em></div>

<br />

        <span class="navheader">Browse</span>
<div class="navsubheader">
$if page.volumes:
    <em>Internet Archive:</em><br />
    $for v in page.volumes:
        $if v.ia_id != "-":
            <span class="navtext">- <a href="$viewbook.replace('XXX', v.ia_id)">View Volume $v.volume_number</a></span><br />
$elif page.get('ocaid'):
    <em>Internet Archive:</em><br />
    <span class="navtext">- <a href="$viewbook.replace('XXX', page.ocaid)">View</a></span><br />
    <span class="navtext">- <a href="$detailbook.replace('XXX', page.ocaid)">Details</a></span><br />
    <span class="navtext">- <a href="$downloadbook.replace('XXX', page.ocaid)">Download</a></span><br /><br />
$elif not isbn_10:
    <em>Not available for this book.</em>
$if isbn_10:
    <a href="$google.replace('XXX', isbn_10)" class="datalink">Google Book Search</a><br />
</div>
<br />

</div>
</div>

<div style="padding-top: 10px">

<span class="book-details-italic">
Data comes from <a href="http://www.amazon.com/" class="sidebar">Amazon</a>, 
<a href="http://www.loc.gov/" class="sidebar">Library of Congress</a>, and users like you.
</span>
<br />
</div>

<img src="/static/images/nav.bot.png" alt="" border="0" />
</div>
</div>