/*javascript libraryless js
function dylanbooks(books){
    var bookUl = document.getElementById('books');
    var bookCount = books.reader_books;
    for(var i=0; i<bookCount.length; i++){
        var title = books.reader_books[i].book_edition.title;
        var cover = books.reader_books[i].book_edition.covers.cover_medium;
        var permalink = books.reader_books[i].permalink;
        
        var listItem = document.createElement("li");
        
        var anchor = document.createElement("a");
        anchor.setAttribute("href",permalink);
        anchor.setAttribute("title",title);
        
        var image = document.createElement("img");
        image.setAttribute("src",cover);
        image.setAttribute("alt",title);
        
        anchor.appendChild(image);
        listItem.appendChild(anchor);
        bookUl.appendChild(listItem);
    }
}
---------------------------------*/

/*JQuery js*/
$(document).ready(function () {
    var bookUl = $("#books");
    $.getJSON("http://readernaut.com/api/v1/json/dylan/books/?callback=?",
    function(books){
        var bookCount = books.reader_books;
        $.each(bookCount,function(i){
           var title = books.reader_books[i].book_edition.title;
           var cover = books.reader_books[i].book_edition.covers.cover_medium;
           var permalink = books.reader_books[i].permalink;
           
           var lineItem = $("<li>").appendTo(bookUl);
           var bookLink = $("<a>").attr({
                                    href:permalink,
                                    title:title
                                }).appendTo(lineItem);
           $("<img/>").attr({
                        src:cover,
                        alt:title
                    }).appendTo(bookLink);
        });
    });
});

/*---------------------------------*/