!function(e,t,o,i){"use strict";var n=e(t);e.fn.lazyload=function(i){function r(){var t=0;f.each(function(o){var i=e(this);if(i.length){if(!l.skip_invisible||i.is(":visible"))if(!i.closest(".owl-carousel").length||e.abovethetop(this,l)||e.belowthefold(this,l))if(e.abovethetop(this,l)||e.leftofbegin(this,l));else if(e.belowthefold(this,l)||e.rightoffold(this,l)){if(++t>l.failure_limit)return!1}else i.trigger("appear"),t=0;else i.trigger("appear"),t=0}else delete f[o]})}var a,f=this,l={threshold:1,failure_limit:0,event:"scroll",effect:"show",container:t,data_attribute:"original",data_srcset:"srcset",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return i&&(void 0!==i.failurelimit&&(i.failure_limit=i.failurelimit,delete i.failurelimit),void 0!==i.effectspeed&&(i.effect_speed=i.effectspeed,delete i.effectspeed),e.extend(l,i)),a=void 0===l.container||l.container===t?n:e(l.container),0===l.event.indexOf("scroll")&&a.bind(l.event,function(){return r()}),this.each(function(){var t=this,o=e(t);t.loaded=!1,void 0!==o.attr("src")&&!1!==o.attr("src")||o.is("img")&&o.attr("src",l.placeholder),o.one("appear",function(i){if(!this.loaded){if(l.appear){var n=f.length;l.appear.call(t,n,l)}var r=o.attr("data-oi")?"data-oi":"data-"+l.data_attribute;e("<img />").bind("load",function(){var i=o.attr(r),n=o.attr("data-"+l.data_srcset);o.is("img")?o.hasClass("no-transition")||(o.hide().addClass("no-transition"),o.attr("src",i),n&&o.attr("srcset",n),o[l.effect](l.effect_speed,function(){o.removeClass("no-transition")})):o.css("background-image","url('"+i+"')").removeAttr(r),t.loaded=!0;var a=e.grep(f,function(e){return!e.loaded});if(f=e(a),l.load){var s=f.length;l.load.call(t,s,l)}}).attr("src",o.attr(r))}}),0!==l.event.indexOf("scroll")&&o.bind(l.event,function(){t.loaded||o.trigger("appear")}),o.is(":hidden")&&!t.loaded&&o.trigger("appear")}),n.bind("resize",function(){r()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&n.bind("pageshow",function(t){t.originalEvent&&t.originalEvent.persisted&&f.each(function(){e(this).trigger("appear")})}),e(o).ready(function(){r()}),this},e.belowthefold=function(o,i){return(void 0===i.container||i.container===t?(t.innerHeight?t.innerHeight:n.height())+n.scrollTop():e(i.container).offset().top+e(i.container).height())<=e(o).offset().top-i.threshold},e.rightoffold=function(o,i){return(void 0===i.container||i.container===t?n.width()+n.scrollLeft():e(i.container).offset().left+e(i.container).width())<=e(o).offset().left-i.threshold},e.abovethetop=function(o,i){return(void 0===i.container||i.container===t?n.scrollTop():e(i.container).offset().top)>=e(o).offset().top+i.threshold+o.offsetHeight},e.leftofbegin=function(o,i){return(void 0===i.container||i.container===t?n.scrollLeft():e(i.container).offset().left)>=e(o).offset().left+i.threshold+e(o).width()},e.inviewport=function(t,o){return!(e.rightoffold(t,o)||e.leftofbegin(t,o)||e.belowthefold(t,o)||e.abovethetop(t,o))},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);