(function(a){a.fn.lazyload=function(d){var e={threshold:0};e=a.extend(d||{});var b=e.threshold,g=this;if(b<1){return}var c=function(){var h=document,i=(navigator.userAgent.toLowerCase().match(/iPad/i)=="ipad")?window.PageYOffset:Math.max(h.documentElement.scrollTop,h.body.scrollTop);return h.documentElement.clientHeight+i-b};var f=function(){var h;a.each(g,function(j,k){if(a(this).offset().top<=c()){h=a(this).attr("original");if(h){a(this).css({opacity:0}).attr("src",h).stop().animate({opacity:1},300).removeAttr("original")}}})};a(window).bind("scroll",function(){f();return false});f();return this}})(jQuery);