").bind("load",function(){var r=n.attr("data-"+a.data_attribute);n.hide(),n.is("img")?n.attr("src",r):n.css("background-image","url('"+r+"')"),n[a.effect](a.effect_speed),t.loaded=!0;var i=e.grep(o,function(e){return!e.loaded});o=e(i);if(a.load){var s=o.length;a.load.call(t,s,a)}}).attr("src",n.attr("data-"+a.data_attribute))}}),0!==a.event.indexOf("scroll")&&n.bind(a.event,function(){t.loaded||n.trigger("appear")})}),i.bind("resize",function(){f()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&i.bind("pageshow",function(t){t.originalEvent&&t.originalEvent.persisted&&o.each(function(){e(this).trigger("appear")})}),e(n).ready(function(){f()}),this},e.belowthefold=function(n,s){var o;return s.container===r||s.container===t?o=(t.innerHeight?t.innerHeight:i.height())+i.scrollTop():o=e(s.container).offset().top+e(s.container).height(),o<=e(n).offset().top-s.threshold},e.rightoffold=function(n,s){var o;return s.container===r||s.container===t?o=i.width()+i.scrollLeft():o=e(s.container).offset().left+e(s.container).width(),o<=e(n).offset().left-s.threshold},e.abovethetop=function(n,s){var o;return s.container===r||s.container===t?o=i.scrollTop():o=e(s.container).offset().top,o>=e(n).offset().top+s.threshold+e(n).height()},e.leftofbegin=function(n,s){var o;return s.container===r||s.container===t?o=i.scrollLeft():o=e(s.container).offset().left,o>=e(n).offset().left+s.threshold+e(n).width()},e.inviewport=function(t,n){return!e.rightoffold(t,n)&&!e.leftofbegin(t,n)&&!e.belowthefold(t,n)&&!e.abovethetop(t,n)},e.extend(e.expr[":"],{"below-the-fold":function(t){return e.belowthefold(t,{threshold:0})},"above-the-top":function(t){return!e.belowthefold(t,{threshold:0})},"right-of-screen":function(t){return e.rightoffold(t,{threshold:0})},"left-of-screen":function(t){return!e.rightoffold(t,{threshold:0})},"in-viewport":function(t){return e.inviewport(t,{threshold:0})},"above-the-fold":function(t){return!e.belowthefold(t,{threshold:0})},"right-of-fold":function(t){return e.rightoffold(t,{threshold:0})},"left-of-fold":function(t){return!e.rightoffold(t,{threshold:0})}})})(jQuery,window,document)