function tagsJSON(a){if($(a).length>0){$(".tagContainer").append("<ul></ul>");$("<li class='seeAll' onclick='seeAll()'>Show All</li>").appendTo(".tagContainer ul");$.each(a,function(b,c){html="";html+="<li><a href='#' onclick='tagCall(\""+b+"\")'>"+b+"</a> <span>("+c+")</span></li>";$(html).appendTo(".tagContainer ul")})}}function processJSON(a){$.each(a,function(c,e){var b="";b+="<div class='bookmarksDiv'>";b+="<h3>"+a[c].d+"</h3>";b+="<p>"+a[c].n+"</p><p>Link: <a class='links' href='"+a[c].u+"' target='_blank'>"+a[c].u+"</a>";b+="<br />Tags: ";for(var d=0;d<=a[c].t.length-1;d++){b+="<a href='#' onclick='tagCall(\""+a[c].t[d]+"\")'>"+a[c].t[d]+"</a>";if(d<a[c].t.length-1){b+=", "}}b+="</p></div>";$(".bookmarkContent").append(b)})}function tagCall(a){$.getJSON("http://feeds.delicious.com/v2/json/berryny/"+a+"?callback=?",function(b){$(".bookmarkContent").hide();$(".bookmarkTagContent").empty().show();$.each(b,function(d,f){var c="";c+="<div class='bookmarksDiv'>";c+="<h3>"+b[d].d+"</h3>";c+="<p>"+b[d].n+"</p><p>Link: <a class='links' href='"+b[d].u+"' target='_blank'>"+b[d].u+"</a>";c+="<br />Tags: ";for(var e=0;e<=b[d].t.length-1;e++){c+="<a href='#' onclick='tagCall(\""+b[d].t[e]+"\")'>"+b[d].t[e]+"</a>";if(e<b[d].t.length-1){c+=", "}}c+="</p></div>";$(".bookmarkTagContent").append(c)})})}function seeAll(){$(".bookmarkTagContent").empty().hide();$(".bookmarkContent").show()}$().ready(function(){$.getJSON("http://feeds.delicious.com/v2/json/berryny?count=40&callback=processJSON&jsoncallback=?");$.getJSON("http://feeds.delicious.com/v2/json/tags/berryny?count=20&callback=tagsJSON&jsoncallback=?")});
