//").bind("load",function(){var i=g.attr("data-"+c.data_attribute);g.hide().attr("src",i)[c.effect](c.effect_speed);f.loaded=true;var j=a.grep(d,function(l){return !l.loaded});d=a(j);if(c.load){var k=d.length;c.load.call(f,k,c)}}).attr("src",g.attr("data-"+c.data_attribute))}});if(0!==c.event.indexOf("scroll")){g.bind(c.event,function(){if(!f.loaded){g.trigger("appear")}})}});a(window).bind("resize",function(){e()});if(/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)){a(window).bind("pageshow",function(f){if(f.originalEvent&&f.originalEvent.persisted){d.each(function(){a(this).trigger("appear")})}})}a(document).ready(function(){e()});return this};function e(){var f=0;d.each(function(){var g=a(this);if(c.skip_invisible&&!g.is(":visible")){return}if(!a.abovethetop(this,c)&&!a.leftofbegin(this,c)){if(!a.belowthefold(this,c)&&!a.rightoffold(this,c)){g.trigger("appear");f=0}else{if(++f>c.failure_limit){return false}}}})}a.belowthefold=function(f,g){var h;if(g.container===undefined||g.container===a(window)){h=(a(window).innerHeight()?a(window).innerHeight():a(window).height())+a(window).scrollTop()}else{h=g.container.offset().top+g.container.height()}return h<=a(f).offset().top-g.threshold};a.rightoffold=function(f,g){var h;if(g.container===undefined||g.container===a(window)){h=a(window).width()+a(window).scrollLeft()}else{h=g.container.offset().left+g.container.width()}return h<=a(f).offset().left-g.threshold};a.abovethetop=function(f,g){var h;if(g.container===undefined||g.container===a(window)){h=a(window).scrollTop()}else{h=g.container.offset().top}return h>=a(f).offset().top+g.threshold+a(f).height()};a.leftofbegin=function(f,g){var h;if(g.container===undefined||g.container===a(window)){h=a(window).scrollLeft()}else{h=g.container.offset().left}return h>=a(f).offset().left+g.threshold+a(f).width()};a.extend(a.expr[":"],{"below-the-fold":function(f){return a.belowthefold(f,{threshold:0})},"above-the-top":function(f){return !a.belowthefold(f,{threshold:0})},"right-of-fold":function(f){return a.rightoffold(f,{threshold:0})},"left-of-fold":function(f){return !a.rightoffold(f,{threshold:0})},"vertical-range":function(f){return !a.belowthefold(f,{threshold:0})&&!a.abovethetop(f,{threshold:0})},"horizontal-range":function(f){return !a.rightoffold(f,{threshold:0})&&!a.leftofbegin(f,{threshold:0})}})}(jQuery)); $(function() { $("img").lazyload({effect : "fadeIn",threshold : 200}); }); //]]>