function display_tumblr() {
    result = "";
    tumblr_api_read["posts"].each(function(post){
            if (post["type"] == "quote") {
                result += '<blockquote><div class="quote-text">' + post["quote-text"] + '</div><div class="quote-source">' + post["quote-source"] + '</div></blockquote>';
            } else if (post["type"] == "link" && post["link-description"] != "") {
                result += '<div class="link"><a href="' + post["link-url"] + '">' + post["link-text"] + '</a> <span class="link-text">' + post["link-description"] + '</span></div>';
            } else if (post["type"] == "photo") {
                result += '<div class="photo"><img src="' + post["photo-url-250"] + '" />' + '<br /><span class="photo-caption">' + post["photo-caption"] + '</span></div>';
            } else if (post["type"] == "regular") {
                result += '<div class="regular-text"><h3>' + post["regular-title"] + '</h3>' + post["regular-body"] + '</div>';
            } else if (post["type"] == "video") {
              result += '<div class="video">' + post["video-player"] + '<br /><span class="video-caption">' + post["video-caption"] + '</span></div>';
            }
        });
    if ($('tumblr')) {
        $('tumblr').innerHTML = result;
    }
}

Event.observe(window, 'load', display_tumblr);
