(function(t){var i="Webkit Moz ms Ms O".split(" ");var e=document.documentElement.style;function n(t){if(!t){return}if(typeof e[t]==="string"){return t}t=t.charAt(0).toUpperCase()+t.slice(1);var n;for(var s=0,o=i.length;s=this.lazyInstance.getWindowTop()},isOnTop:function(){return false},show:function(){this.lazyInstance.queue.add(this);this.showed=true},forceShow:function(){this.showed=true;this.el.className=this.el.className.replace("lazy-loading-before-start-animation","lazy-loading-end-animation")},startAnimation:function(){var t=this;t.elements.forEach(function(i){i.$el.bind(o,function(e){var n=e.target||e.srcElement;if(n!=i.el){return}i.$el.unbind(o);t.finishedElementsCount++;if(t.finishedElementsCount>=t.getElementsCount()){setTimeout(function(){var i=t.el.className.replace("lazy-loading-before-start-animation","").replace("lazy-loading-start-animation","lazy-loading-end-animation");t.el.className=i;if(window.gemSettings.fullpageEnabled){t.el.classList.add("fullpage-lazy-loading-initialized")}},t.options.finishDelay)}});i.show()});if(t.options.finishDelay>0){t.lazyInstance.queue.startTimer(function(){t.finishAnimation()})}else{t.finishAnimation()}t.$el.addClass("lazy-loading-start-animation")},finishAnimation:function(){this.lazyInstance.queue.finishPosition()}};function r(i,e){this.el=i;this.$el=t(i);this.group=e;this.options={effect:a(i,"llEffect","ll-effect",""),delay:a(i,"llItemDelay","ll-item-delay",e.getItemDelay()),actionFunction:a(i,"llActionFunc","ll-action-func","")};this.options.queueType=this.options.delay!=-1?"async":"sync";if(this.options.effect!=""){this.$el.addClass("lazy-loading-item-"+this.getEffectClass())}}r.prototype={effects:{action:function(t){if(!t.options.actionFunction||window[t.options.actionFunction]==null||window[t.options.actionFunction]==undefined){return}window[t.options.actionFunction](t.el)}},getEffectClass:function(){var t=this.options.effect;if(t=="drop-right-without-wrap"||t=="drop-right-unwrap"){return"drop-right"}return t},show:function(){if(this.effects[this.options.effect]!=undefined){this.effects[this.options.effect](this)}}};u.prototype={initialize:function(){this.queue=new l(this);this.groups=[];this.hasHeaderVisuals=t(".ls-wp-container").length>0;this.$checkPoint=t("#lazy-loading-point");if(!this.$checkPoint.length){t('
').insertAfter("#main");this.$checkPoint=t("#lazy-loading-point")}this.windowBottom=0;this.windowHeight=0;this.scrollHandle=false;this.perspectiveOpened=false;this.$page=t("#page");t(document).ready(this.documentReady.bind(this))},documentReady:function(){var i=this;this.updateCheckPointOffset();this.updateWindowHeight();this.buildGroups();this.windowScroll();t(window).resize(this.windowResize.bind(this));t(window).scroll(this.windowScroll.bind(this));t(window).on("perspective-modalview-opened",function(){i.perspectiveOpened=true});t(window).on("perspective-modalview-closed",function(){i.perspectiveOpened=false})},windowResize:function(){this.updateWindowHeight();this.updateGroups();this.windowScroll()},buildGroups:function(){var i=this;i.groups=[];t(".lazy-loading").each(function(){if(window.gemSettings.fullpageEnabled&&t(this).hasClass("fullpage-lazy-loading-initialized")){return}var e=new h(this,i);e.updatePosition();t(".lazy-loading-item",this).each(function(){e.addElement(new r(this,e))});if(e.getElementsCount()>0){i.groups.push(e)}})},updateGroups:function(){var t=this;t.groups.forEach(function(t){if(t.isShowed()){return}t.updatePosition()})},windowScroll:function(){if(this.scrollHandle){}this.scrollHandle=true;this.calculateWindowTop();this.calculateWindowBottom();if(this.isGroupsPositionsChanged()){this.updateGroups()}this.groups.forEach(function(t){if(t.isShowed()){return}if(t.isOnTop()){t.forceShow()}if(t.isVisible()){t.show()}});this.scrollHandle=false;this.queue.next()},calculateWindowBottom:function(){if(self.perspectiveOpened){this.windowBottom=this.windowTop+this.$page.height()}else{this.windowBottom=this.windowTop+this.windowHeight}},calculateWindowTop:function(){if(self.perspectiveOpened){this.windowTop=this.$page.scrollTop()}else{this.windowTop=t(window).scrollTop()}},getWindowTop:function(){return this.windowTop},getWindowBottom:function(){return this.windowBottom},updateWindowHeight:function(){this.windowHeight=t(window).height()},getWindowHeight:function(){return this.windowHeight},updateCheckPointOffset:function(){this.checkPointOffset=this.$checkPoint.length?this.$checkPoint.offset().top:0},isGroupsPositionsChanged:function(){var t=this.checkPointOffset;this.updateCheckPointOffset();return Math.abs(this.checkPointOffset-t)>1},getLastGroup:function(){if(!this.groups.length){return null}return this.groups[this.groups.length-1]}};function u(i){this.options={};t.extend(this.options,i);this.initialize()}t.lazyLoading=function(t){return new u(t)};if(window.gemSettings!==undefined&&!window.gemSettings.lasyDisabled&&t.support.opacity){t(".wpb_text_column.wpb_animate_when_almost_visible.wpb_fade").each(function(){t(this).wrap('
').addClass("lazy-loading-item").data("ll-effect","fading")});t(".gem-list.lazy-loading").each(function(){t(this).data("ll-item-delay","200");t("li",this).addClass("lazy-loading-item").data("ll-effect","slide-right");t("li",this).each(function(i){t(this).attr("style","transition-delay: "+(i+1)*.2+"s;")})});t.lazyLoading()}})(jQuery);