(function(e,h,d){var j,f,g,i,a,c;a=navigator.userAgent;c=/iPad/i.test(a)||/iPhone OS 3_1_2/i.test(a)||/iPhone OS 3_2_2/i.test(a);j=function(k){var o=e("body"),p=e(h),m="loading",n=e("<div id='"+m+"' class='box'><strong>Loading contents</strong></div>"),l=e("<img id='preLoading' scr='/lib2/loading.gif' alt='loading' style='display:none' />");if(!e("#preLoading").length){o.append(l)}p.unbind("scroll").scroll(function(){var s=p.scrollTop(),r=o.height(),q=p.height();if(s>(r-q)){k.trigger("click");if(!(e("#"+m).length)){o.append(n);n.appendTo(o).animate({bottom:"41px"},300)}}})};i=function(k){k.css("cursor","pointer").click(function(){e("html,body").stop().animate({scrollTop:0},1000,"swing")})};f=function(s,p){var u,r,q,o,m,t,l,k,n;u={proxy:"lib2/proxy.php?url=",appendFeed:true};r=p.width();o=function(w){var v=["src","alt","href"];w.each(function(){var y=this.attributes,z=y.length;while(z--){var x=y[z];if(e.inArray(x.name,v)==-1){this.removeAttributeNode(x)}}})};l=function(w){var x,v,y=460;w.wrap("<div class='imgWrap' />");x=w.parent();if(w.width()<(y/2)){x.css({"float":"left",margin:"0 20px 10px 0"});x.after("<div class='clr'>&nbsp;</div>")}else{x.css({width:"498px",margin:"10px 0 10px -20px"});if((x.parent().is("a")&&x.parent("a").is(":first-child"))||(x.is(":first-child")&&!x.parent().is("a"))){x.css({"margin-top":"-21px"})}w.css("width","100%");if(x.parents("p").prev().length){x.parents("p").prev().css("margin-bottom","40px")}if(x.parents("div:eq(0)").prev("div").find("table:eq(0)").length){x.parents("div:eq(0)").prev("div").css("margin-bottom","40px")}if(x.parent().is("a")){x.append("<div class='external'>&#9755;</div>")}}};k=function(v){v.each(function(){var y,w,A,z,x,B=499;y=e(this);A=y.attr("width");w=y.attr("height");z=A/w;x=B/z;y.css({margin:"-21px 0 10px -20px",width:B,height:x}).attr("height",x).attr("width",B)})};n=function(v){v.each(function(){var w,y=499,x=360;w=e(this);w.width(y).height(x).css({margin:"-21px 0 10px -20px",border:"none"})})};m=function(v){v.addClass("box").prepend("<div class='hd'><div class='arrow'>&nbsp;</div></div><div class='arrowcontainer'><div class='arrowdown'>&nbsp;</div></div>").end().find("h2").hover(function(){e(this).parent("div").find("abbr.date").stop().fadeTo(300,0).end().find("div.arrow").stop().fadeTo(300,1)},function(){e(this).parent("div").find("abbr.date").stop().fadeTo(200,1).end().find("div.arrow").stop().fadeTo(300,0)}).next("div").addClass("itemNfo").end();v.each(function(){var w=e(this);t(w);w.prepend("<abbr class='date'><strong>"+w.data().date.day+"</strong><em>"+w.data().date.monthstr+"</em></abbr>");w.append("<div class='ft'><a class='permalink' href='"+w.data().permalink+"'>&hearts; permalink</a></div>")})};t=function(w){var z,x,v,y;z=w.find("div.itemNfo");x=["Fuck","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];v=z.text().match(/.*?(\d+)\/(\d+)\//);v=[parseInt(v[2]),parseInt(v[1])];y=w.find("h2 a");w.data({date:{monthstr:x[v[1]],month:v[1],day:v[0]},title:y.text(),permalink:y.attr("href")})};e.ajax({url:u.proxy+s+"&full_status=1",dataType:"json",success:function(w){var v=e(w.contents);$items=v.find("div#items"),$nextLink=$items.find("div#more a:eq(0)"),$images=$items.find("img"),$embed=$items.find("embed");if(u.appendFeed&&!(e("head > link#auto-discovery").length)){e("head").append(v[14])}$items.removeAttr("id");o($items.find("> div.item *:not(embed)"));m($items.find("> div.item"));n($items.find("iframe").not("*:[src*=vimeo],*:[src*=youtube]").remove().end());$images.filter("*:[src*=http://feeds.feedburner.com/], *:[src*=http://feedads.g.doubleclick.net], *:[src*=http://a.fsdn.com/]").remove();$images.load(function(){l(e(this))});k($embed,$items.find("iframe"));$items.appendTo(p);j($nextLink);$nextLink.click(function(z){z.preventDefault();var x=e(this),y=x.attr("href");x.remove();f(y,p)});if(e("#loading").length){e("#loading").stop().delay(999).animate({bottom:"-100px"},300,function(){e(this).remove()})}}})};function b(k){k.hover(function(){e(this).find("> span").stop(false,true).fadeTo(200,0.2)},function(){e(this).find("> span").stop(false,true).fadeTo(300,0)})}e(function(){f("http://www.google.com/reader/shared/meodai",e("div#mainSlider"));i(e("h1#logo"));b(e("h1#logo"));if(c){e("#fft").remove()}})}(jQuery,window));
