Free javascript Hosting


smartslider-frontend-min.js

Uploaded on Feb 01 2022 17:33 by jesuseelopez

(function(){var t=this;t.N2_=t.N2_||{r:[],d:[]},t.N2R=t.N2R||function(){t.N2_.r.push(arguments)},t.N2D=t.N2D||function(){t.N2_.d.push(arguments)}}).call(window),N2D("SmartSliderBackgrounds",function(t,e){function i(e){this.device=null,this.slider=e,this.hasFixed=!1,this.lazyLoad=e.parameters.lazyLoad,this.lazyLoadNeighbor=e.parameters.lazyLoadNeighbor,this.deviceDeferred=t.Deferred(),this.slider.sliderElement.one("SliderDevice",t.proxy(this.onSlideDeviceChangedFirst,this)),this.slider.sliderElement.on("visibleSlidesChanged",t.proxy(this.onVisibleSlidesChanged,this)),this.slider.sliderElement.on("slideCountChanged",t.proxy(this.onVisibleSlidesChanged,this))}return i.prototype.whenWithProgress=function(e){for(var i=0,s=t.Deferred(),n=0;n<e.length;n++)t.when(e[n]).done(function(){s.notify(++i,e.length)});return t.when.apply(t,e).done(function(){s.resolveWith(null,arguments)}),s},i.prototype.getBackgroundImages=function(){for(var t=[],e=0;e<this.slider.realSlides.length;e++)t.push(this.slider.realSlides[e].background);return t},i.prototype.onVisibleSlidesChanged=function(){1==this.lazyLoad?this.load=t.when.apply(t,this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):2==this.lazyLoad&&(this.load=t.when.apply(t,this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))))},i.prototype.onSlideDeviceChangedFirst=function(e,i){this.onSlideDeviceChanged(e,i),this.deviceDeferred.resolve(),this.slider.sliderElement.on("SliderDevice",t.proxy(this.onSlideDeviceChanged,this)),1==this.lazyLoad?(this.preLoadSlides=this.preloadSlidesLazyNeighbor,this.load=this.whenWithProgress(this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)))):2==this.lazyLoad?(this.preLoadSlides=this._preLoadSlides,t(window).on("load",t.proxy(this.preLoadAll,this)),this.load=this.whenWithProgress(this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)))):(this.preLoadSlides=this._preLoadSlides,this.load=this.whenWithProgress(this.preLoadAll()))},i.prototype.onSlideDeviceChanged=function(t,e){this.device=e;for(var i=0;i<this.slider.realSlides.length;i++)this.slider.realSlides[i].background&&this.slider.realSlides[i].background.updateBackgroundToDevice(e)},i.prototype.preLoadAll=function(){for(var t=[],e=0;e<this.slider.realSlides.length;e++)t.push(this.slider.realSlides[e].preLoad());return t},i.prototype._preLoadSlides=function(t){var e=[];"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]);for(var i=0;i<t.length;i++)e.push(t[i].preLoad());return e},i.prototype.preloadSlidesLazyNeighbor=function(e){var i=this._preLoadSlides(e);if(this.lazyLoadNeighbor)for(var s=0,n=e[0].previousSlide,r=e[e.length-1].nextSlide;s<this.lazyLoadNeighbor;)i.push(n.preLoad()),n=n.previousSlide,i.push(r.preLoad()),r=r.nextSlide,s++;var o=t.Deferred();if("resolved"!=i[0].state()){var a=setTimeout(t.proxy(function(){this.slider.load.showSpinner("backgroundImage"+e[0].index),a=null},this),50);t.when.apply(t,i).done(t.proxy(function(){a?(clearTimeout(a),a=null):this.slider.load.removeSpinner("backgroundImage"+e[0].index),setTimeout(function(){o.resolve()},100)},this))}else setTimeout(function(){o.resolve()},100);return i.push(o),i},i.prototype.hack=function(){for(var t=0;t<this.slider.realSlides.length;t++)this.slider.realSlides[t].background&&this.slider.realSlides[t].background.hack()},i}),N2D("FontSize",function(t,e){function i(){return s===e&&(s=t('<div style="font-size:10rem;"></div>').appendTo("body")),parseFloat(s.css("fontSize"))/10}var s;return{toRem:function(t){return t/i()+"rem"}}}),N2D("SmartSliderLoad",function(t,e){function i(e,i){this.parameters=t.extend({fade:1,scroll:0},i),this.deferred=t.Deferred(),this.smartSlider=e,this.spinnerCouner=0,this.id=e.sliderElement.attr("id"),this.$window=t(window),this.spinner=t("#"+this.id+"-spinner")}return i.prototype.start=function(){if(this.parameters.scroll){var e=t(window);e.on("scroll."+this.id,t.proxy(this.onScroll,this)),this.onScroll()}else if(this.parameters.fade){this.loadingArea=t("#"+this.id+"-placeholder").eq(0),this.showSpinner("fadePlaceholder");var i=this.spinner.find(".n2-ss-spinner-counter");i.length&&(i.html("0%"),this.smartSlider.backgrounds.load.progress(t.proxy(function(t,e){i.html(Math.round(t/(e+1)*100)+"%")},this))),this.showSlider()}else this.showSlider()},i.prototype.onScroll=function(){this.$window.scrollTop()+this.$window.height()>this.smartSlider.sliderElement.offset().top+100&&(this.$window.off("scroll."+this.id),this.showSlider())},i.prototype.loadLayerImages=function(){var e=t.Deferred();return this.smartSlider.sliderElement.find(".n2-ss-layers-container").n2imagesLoaded().always(function(){e.resolve()}),e},i.prototype.showSlider=function(){t.when(this.smartSlider.responsive.ready,this.smartSlider.backgrounds.load,this.loadLayerImages()).always(t.proxy(function(){this._showSlider()},this))},i.prototype._showSlider=function(e){this.smartSlider.responsive.isReadyToResize=!0,t.when.apply(t,this.smartSlider.widgetDeferreds).done(t.proxy(function(){this.smartSlider.responsive.invalidateResponsiveState=!0,this.smartSlider.responsive.doResize(),this.smartSlider.mainAnimation&&this.smartSlider.mainAnimation.setToStarterSlide(this.smartSlider.starterSlide),this.smartSlider.starterSlide.setStarterSlide(),this.smartSlider.initLayerAnimations(),this.smartSlider.sliderElement.trigger("BeforeVisible"),this.smartSlider.responsive.alignElement.addClass("n2-ss-align-visible"),this.smartSlider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.spinner.find(".n2-ss-spinner-counter").html(""),this.removeSpinner("fadePlaceholder"),t("#"+this.id+"-placeholder").remove(),this.loadingArea=this.smartSlider.sliderElement,"function"==typeof e?e(this.deferred):this.deferred.resolve(),this.smartSlider.sliderElement.triggerHandler("Show")},this))},i.prototype.loaded=function(t){this.deferred.done(t)},i.prototype.showSpinner=function(t){0===this.spinnerCouner&&this.spinner.appendTo(this.loadingArea).css("display",""),this.spinnerCouner++},i.prototype.removeSpinner=function(t){this.spinnerCouner--,this.spinnerCouner<=0&&(this.spinner.detach(),this.spinnerCouner=0)},i}),N2D("ScrollTracker",function(t,e,i){function s(){this.started=!1,this.items=[]}return s.prototype.add=function(t,e,i,s){var n={$el:t,mode:e,onVisible:i,onHide:s,state:"unknown"};this.items.push(n),this._onScroll(n,Math.max(document.documentElement.clientHeight,window.innerHeight)),this.started||this.start()},s.prototype.start=function(){this.started||(t(window).on("scroll.scrollTracker",t.proxy(this.onScroll,this)),this.started=!0)},s.prototype.onScroll=function(t){for(var e=Math.max(document.documentElement.clientHeight,window.innerHeight),i=0;i<this.items.length;i++)this._onScroll(this.items[i],e)},s.prototype._onScroll=function(t,e){var i=t.$el[0].getBoundingClientRect(),s=i.height>.7*e,n=!0;"partly-visible"===t.mode?s&&(i.bottom<0||i.top>=i.height)?n=!1:!s&&(i.bottom-i.height<0||i.top-e+i.height>=0)&&(n=!1):"not-visible"===t.mode&&(n=i.top-e<0&&i.top+i.height>0),n===!1?"hidden"!==t.state&&("function"==typeof t.onHide&&t.onHide(),t.state="hidden"):"visible"!==t.state&&("function"==typeof t.onVisible&&t.onVisible(),t.state="visible")},new s}),N2D("SmartSliderApi",function(t,e){function i(){this.sliders={},this.readys={}}i.prototype.makeReady=function(t,e){if(this.sliders[t]=e,"undefined"!=typeof this.readys[t])for(var i=0;i<this.readys[t].length;i++)this.readys[t][i].call(e,e,e.sliderElement)},i.prototype.ready=function(t,e){"undefined"!=typeof this.sliders[t]?e.call(this.sliders[t],this.sliders[t],this.sliders[t].sliderElement):("undefined"==typeof this.readys[t]&&(this.readys[t]=[]),this.readys[t].push(e))},i.prototype.trigger=function(e,i,s){s&&s.preventDefault();var n=t(e),r=i.split(","),o=n.closest(".n2-ss-slide,.n2-ss-static-slide"),a=o.data("ss-last-event");n.data("ss-reset-events")||(n.data("ss-reset-events",1),o.on("layerAnimationPlayIn.resetCounter",t.proxy(function(t){t.data("ss-last-event","")},this,o)));for(var l=r.length-1,h=0;h<r.length;h++)r[h]===a&&(l=h);i=l===r.length-1?r[0]:r[l+1],o.data("ss-last-event",i),o.triggerHandler("ss"+i)},i.prototype.applyAction=function(e,i){if(this.isClickAllowed(e)){var s=e.currentTarget,n=t(s).closest(".n2-ss-slider").data("ss");n[i].apply(n,Array.prototype.slice.call(arguments,2))}},i.prototype.applyActionWithClick=function(t){this.isClickAllowed(t)&&(nextend.shouldPreventClick||(t.preventDefault(),this.applyAction.apply(this,arguments)))},i.prototype.isClickAllowed=function(e){return!t.contains(e.currentTarget,t(e.target).closest('a[href!="#"], *[onclick][onclick!=""], *[data-n2click][data-n2click!=""], *[n2-lightbox]').get(0))},i.prototype.openUrl=function(e,i){if(this.isClickAllowed(e)){var s=t(e.currentTarget),n=s.data("href");if("undefined"==typeof i&&(i=s.data("target")),"_blank"===i){var r=window.open();r.opener=null,r.location=n}else n2const.setLocation(n)}};var s={to:function(e){t("html, body").animate({scrollTop:e},window.n2ScrollSpeed||400)},top:function(){s.to(0)},bottom:function(){s.to(t(document).height()-t(window).height())},before:function(e){s.to(e.offset().top-t(window).height())},after:function(t){s.to(t.offset().top+t.height())},next:function(e,i){var n=t(i),r=-1;n.each(function(i,s){return t(e).is(s)||t.contains(s,e)?(r=i+1,!1):void 0}),-1!==r&&r<=n.length&&s.element(n.eq(r))},previous:function(e,i){var n=t(i),r=-1;n.each(function(i,s){return t(e).is(s)||t.contains(s,e)?(r=i-1,!1):void 0}),r>=0&&s.element(n.eq(r))},element:function(e){var i=t(window.n2ScrollOffsetSelector).height();s.to(t(e).offset().top-i)}};return i.prototype.scroll=function(t,e){this.isClickAllowed(t)&&(t.preventDefault(),s[e].apply(window,Array.prototype.slice.call(arguments,2)))},window.n2ss=new i,i}),N2D("SmartSliderAbstract",function($,undefined){function SmartSliderAbstract(t,e){this.editor=null,this.startedDeferred=$.Deferred(),this.visibleDeferred=$.Deferred(),t instanceof $&&(t="#"+t.attr("id"));var i=t.substr(1);if(this.elementID=i,window[i]&&window[i]instanceof SmartSliderAbstract)if(window[i].__$sliderElement&&!$.contains(document.body,window[i].__$sliderElement.get(0)));else{if(window[i].sliderElement===undefined)return void console.error("Slider [#"+i+"] inited multiple times");if($.contains(document.body,window[i].sliderElement.get(0)))return void console.error("Slider [#"+i+"] embedded multiple times")}this.readyDeferred=$.Deferred(),N2D(t,$.proxy(function(){return this},this)),this.isAdmin=!!e.admin,this.id=parseInt(i.replace("n2-ss-","")),window[i]=this,e.isDelayed!==undefined&&e.isDelayed?$(window).ready($.proxy(function(){this.waitForExists(i,e)},this)):this.waitForExists(i,e)}return SmartSliderAbstract.prototype.kill=function(){this.killed=!0;var t=this.sliderElement.attr("id"),e=$("#"+t+"-placeholder");e.length?e.remove():N2R("documentReady",function(e){e("#"+t+"-placeholder").remove()});var i=this.sliderElement.closest(".n2-ss-margin");i.length?i.remove():N2R("documentReady",$.proxy(function(t){this.sliderElement.closest(".n2-ss-margin").remove()},this));var s=this.sliderElement.closest(".n2-ss-align");s.length?s.remove():N2R("documentReady",$.proxy(function(t){this.sliderElement.closest(".n2-ss-align").remove()},this)),n2ss.makeReady(this.id,this),this.readyDeferred.resolve()},SmartSliderAbstract.prototype.waitForExists=function(t,e){var i=$.Deferred(),s=function(){var e=$("#"+t);e.length?i.resolve(e):setTimeout(s,500)};i.done($.proxy(this.onSliderExists,this,t,e)),s()},SmartSliderAbstract.prototype.onSliderExists=function(t,e,i){if(this.__$sliderElement=i,"TEMPLATE"===i.prop("tagName")){var s=i.data("dependency"),n=i.data("delay"),r=$.proxy(function(){var s=$(i.html());i.replaceWith(s),this.waitForDimension($("#"+t),e),$(window).triggerHandler("n2Rocket",[this.sliderElement])},this);s&&$("#n2-ss-"+s).length?n2ss.ready(s,$.proxy(function(t){t.ready(r)},this)):n?setTimeout(r,n):r()}else this.waitForDimension(i,e)},SmartSliderAbstract.prototype.waitForDimension=function(t,e){var i=$.Deferred(),s=function(){var e=t.is(":visible");e?i.resolve():setTimeout(s,200)};s(),i.done($.proxy(this.onSliderHasDimension,this,t,e))},SmartSliderAbstract.prototype.initCSS=function(){this.parameters.css&&$('<style type="text/css">'+this.parameters.css+"</style>").appendTo("head")},SmartSliderAbstract.prototype.onSliderHasDimension=function($sliderElement,parameters){if(this.killed=!1,n2const.isIE?$sliderElement.attr("data-ie",n2const.isIE):n2const.isEdge&&$sliderElement.attr("data-ie",n2const.isEdge),this.slideClass=this.slideClass||"FrontendSliderSlide",this.responsive=!1,this.mainAnimationLastChangeTime=0,this.currentSlide=null,this.currentRealSlide=null,this.staticSlide=!1,this.isShuffled=!1,this.slides=[],this.visibleSlides=1,this.sliderElement=$sliderElement.data("ss",this),this.needBackgroundWrap=!1,this.blockCarousel=!1,this.parameters=$.extend({admin:!1,playWhenVisible:1,playWhenVisibleAt:.5,perspective:1e3,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{touch:"horizontal",keyboard:!1,mousewheel:!1,blockCarouselInteraction:1},hardwareAcceleration:!0,layerMode:{playOnce:0,playFirstLayer:1,mode:"skippable",inAnimation:"mainInEnd"},foreverLayerAnimation:!1,parallax:{enabled:0,mobile:0,horizontal:"mouse",vertical:"mouse",origin:"enter"},load:{},mainanimation:{},randomize:{randomize:0,randomizeFirst:0},responsive:{},lazyload:{enabled:0},postBackgroundAnimations:!1,initCallbacks:[],dynamicHeight:0,lightbox:[],lightboxDeviceImages:[],titles:[],descriptions:[],allowBGImageAttachmentFixed:1,backgroundParallax:{strength:0,tablet:0,mobile:0},particlejs:0},parameters),this.disabled={layerAnimations:!1,layerSplitTextAnimations:!1,backgroundAnimations:!1,postBackgroundAnimations:!1},n2const.isSamsungBrowser&&(this.disabled.layerSplitTextAnimations=!0,this.disabled.postBackgroundAnimations=!0),!(this.isAdmin||parameters.responsive.desktop&&parameters.responsive.tablet&&parameters.responsive.mobile)){var md=new MobileDetect(window.navigator.userAgent,801),isTablet=!!md.tablet(),isMobile=!!md.phone();if(!parameters.responsive.mobile&&isMobile||!parameters.responsive.tablet&&isTablet||!parameters.responsive.desktop&&!isTablet&&!isMobile)return void this.kill()}this.initCSS(),this.firstSlideReady=$.Deferred();try{eval(this.parameters.callbacks)}catch(e){console.error(e)}this.startVisibilityCheck(),n2ss.makeReady(this.id,this),this.widgetDeferreds=[],this.sliderElement.on("addWidget",$.proxy(this.addWidget,this)),this.isAdmin&&(this.changeTo=function(){}),this.load=new N2Classes.SmartSliderLoad(this,this.parameters.load),this.backgrounds=new N2Classes.SmartSliderBackgrounds(this),this.__initSlides(),$.when(this.overrideFirstSlide()).done($.proxy(this.onFirstSlideInitialized,this)),navigator.userAgent.match("UCBrowser")&&$("html").addClass("n2-ucbrowser")},SmartSliderAbstract.prototype.overrideFirstSlide=function(){if("undefined"!=typeof window["ss"+this.id]){if("object"==typeof window["ss"+this.id])return window["ss"+this.id].done($.proxy(function(t){null!==t&&this.changeActiveBeforeLoad(t)},this));var t="undefined"!=typeof window["ss"+this.id]?parseInt(window["ss"+this.id]):null;null!==t&&this.changeActiveBeforeLoad(t)}else if(!this.isAdmin&&this.parameters.maintainSession&&"undefined"!=typeof sessionStorage){var e=sessionStorage.getItem("ss-"+this.id);null!==e&&this.changeActiveBeforeLoad(parseInt(e)),this.sliderElement.on("mainAnimationComplete",$.proxy(function(t,e,i,s){sessionStorage.setItem("ss-"+this.id,s)},this))}return!0},SmartSliderAbstract.prototype.changeActiveBeforeLoad=function(t){t>=0&&t<this.realSlides.length&&this.starterSlide!==this.realSlides[t]&&(this.unsetActiveSlide(this.starterSlide),this.starterSlide=this.realSlides[t],this.setActiveSlide(this.realSlides[t]))},SmartSliderAbstract.prototype.startCurrentSlideIndex=function(){this.currentRealSlide=this.currentSlide=this.starterSlide,this.setActiveSlide(this.currentSlide),parseInt(this.parameters.carousel)?this.initCarousel():this.initNotCarousel()},SmartSliderAbstract.prototype.onFirstSlideInitialized=function(){for(var i=0;i<this.realSlides.length;i++)this.realSlides[i].setNext(this.realSlides[i+1>this.realSlides.length-1?0:i+1]);this.startCurrentSlideIndex(),this.firstSlideReady.resolve(this.currentSlide);for(var j=0;j<this.parameters.initCallbacks.length;j++)new Function("$",this.parameters.initCallbacks[j]).call(this,$);this.disableLayerAnimations===!0&&(this.disabled.layerAnimations=!0),this.widgets=new N2Classes.SmartSliderWidgets(this);var isHover=!1,hoverTimeout;if(this.sliderElement.on({universalenter:$.proxy(function(t){$(t.target).closest(".n2-full-screen-widget").length||(clearTimeout(hoverTimeout),isHover=!0,this.sliderElement.addClass("n2-hover"),this.widgets.setState("hover",!0))},this),universalleave:$.proxy(function(t){t.stopPropagation(),hoverTimeout=setTimeout($.proxy(function(){isHover=!1,this.sliderElement.removeClass("n2-hover"),this.widgets.setState("hover",!1)},this),1e3)},this)}),this.controls={},this.initMainAnimationWithLayerAnimation(),!this.isAdmin&&this.parameters.parallax.enabled&&(this.parameters.parallax.mobile||!this.parameters.parallax.mobile&&!n2const.isMobile)){this.parallax=new N2Classes.LayerParallax(this,this.parameters.parallax);var parallaxSlide=this.currentSlide;this.sliderElement.on("sliderSwitchTo.parallax",$.proxy(function(t,e){parallaxSlide=this.slides[e]},this)),this.ready($.proxy(function(){this.parallax.start(parallaxSlide),this.sliderElement.off(".parallax").on("sliderSwitchTo",$.proxy(function(t,e){this.parallax.start(this.slides[e])},this))},this))}if(this.parameters.blockrightclick&&this.sliderElement.bind("contextmenu",function(t){t.preventDefault()}),this.initMainAnimation(),this.initResponsiveMode(),!this.killed){try{var removeHoverClassCB=$.proxy(function(){this.sliderElement.removeClass("n2-has-hover"),this.sliderElement[0].removeEventListener("touchstart",removeHoverClassCB,window.n2const.passiveEvents?{passive:!0}:!1)},this);this.sliderElement[0].addEventListener("touchstart",removeHoverClassCB,window.n2const.passiveEvents?{passive:!0}:!1)}catch(e){}if(this.initControls(),this.startedDeferred.resolve(this),!this.isAdmin){var event="click";this.hasTouch()&&(event="n2click"),this.sliderElement.find("[data-n2click]").each(function(i,el){var el=$(el);el.on(event,function(event){eval(el.data("n2click"))})}),this.sliderElement.find("[data-n2middleclick]").on("mousedown",function(event){var el=$(this);2!=event.which&&4!=event.which||(event.preventDefault(),eval(el.data("n2middleclick")))}),window.n2FocusAllowed===undefined&&(window.n2FocusAllowed=!1,$(window).on({keydown:function(){window.n2FocusAllowed=!0},keyup:function(){window.n2FocusAllowed=!1}})),this.sliderElement.find("a").on({focus:$.proxy(function(t){if(n2FocusAllowed){var e=this.findSlideByElement(t.currentTarget);e&&e!==this.currentRealSlide&&this.directionalChangeToReal(e.index)}},this)})}this.preReadyResolve(),this.isAdmin||this.startLightbox(),this.sliderElement.find('[role="button"],[tabindex]').not("input,select,textarea").keypress(function(t){32!==t.charCode&&13!==t.charCode||(t.preventDefault(),$(t.target).click().triggerHandler("n2Activate"))}).on("mouseleave",function(t){$(t.currentTarget).blur()})}},SmartSliderAbstract.prototype.__initSlides=function(){for(var t=this.sliderElement.find(".n2-ss-slide"),e=0;e<t.length;e++)this.slides.push(new N2Classes[this.slideClass](this,t.eq(e),e));this.starterSlide=this.slides[0];for(var e=0;e<this.slides.length;e++)this.slides[e].init(),1==this.slides[e].$element.data("first")&&(this.starterSlide=this.slides[e]);this.realSlides=this.slides,this.afterRawSlidesReady(),this.randomize(this.slides);var i=this.sliderElement.find(".n2-ss-static-slide");i.length&&(this.staticSlide=new N2Classes.FrontendSliderStaticSlide(this,i))},SmartSliderAbstract.prototype.afterRawSlidesReady=function(){},SmartSliderAbstract.prototype.setVisibleSlides=function(t){t!==this.visibleSlides&&(this.visibleSlides=t,this.sliderElement.triggerHandler("visibleSlidesChanged"))},SmartSliderAbstract.prototype.getVisibleSlides=function(t){return t===undefined&&(t=this.currentSlide),[t]},SmartSliderAbstract.prototype.getActiveSlidesCompat=function(t){return this.getVisibleSlides(t)},SmartSliderAbstract.prototype.findSlideBackground=function(t){return t.$element.find(".n2-ss-slide-background")},SmartSliderAbstract.prototype.getRealIndex=function(t){return t},SmartSliderAbstract.prototype.randomize=function(t){this.randomizeFirst(),this.parameters.randomize.randomize&&this.shuffleSlides(t)},SmartSliderAbstract.prototype.randomizeFirst=function(){this.parameters.randomize.randomizeFirst&&(this.unsetActiveSlide(this.starterSlide),this.starterSlide=this.realSlides[Math.floor(Math.random()*this.realSlides.length)],this.setActiveSlide(this.starterSlide))},SmartSliderAbstract.prototype.shuffleSlides=function(t){t.sort(function(){return.5-Math.random()});for(var e=t[0].$element.parent(),i=0;i<t.length;i++)t[i].$element.appendTo(e),t[i].setIndex(i);this.isShuffled=!0},SmartSliderAbstract.prototype.addWidget=function(t,e){this.widgetDeferreds.push(e)},SmartSliderAbstract.prototype.started=function(t){this.startedDeferred.done($.proxy(t,this))},SmartSliderAbstract.prototype.preReadyResolve=function(){setTimeout($.proxy(this._preReadyResolve,this),1)},SmartSliderAbstract.prototype._preReadyResolve=function(){this.load.start(),this.load.loaded($.proxy(this.readyResolve,this))},SmartSliderAbstract.prototype.readyResolve=function(){$(window).scroll(),this.readyDeferred.resolve()},SmartSliderAbstract.prototype.ready=function(t){this.readyDeferred.done($.proxy(t,this))},SmartSliderAbstract.prototype.startVisibilityCheck=function(){!this.isAdmin&&this.parameters.playWhenVisible?this.ready($.proxy(function(){$(window).on("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.checkIfVisible()},this)):this.ready($.proxy(function(){this.visibleDeferred.resolve()},this))},SmartSliderAbstract.prototype.checkIfVisible=function(){var t=this.parameters.playWhenVisibleAt,e=$(window).scrollTop(),i=$(window).height(),s=$(document).height(),n=this.sliderElement[0].getBoundingClientRect(),r=i*t/2,o=e+r,a=e+i-r;r>e&&(o*=e/r),e+i>s-r&&(a+=e+i-s+r);var l=e+n.top,h=e+n.bottom;(this.isAdmin||a>=l&&l>=o||h>=o&&a>=h||o>=l&&h>=a)&&($(window).off(".n2-ss-visible"+this.id),this.visibleDeferred.resolve())},SmartSliderAbstract.prototype.visible=function(t){this.visibleDeferred.done($.proxy(t,this))},SmartSliderAbstract.prototype.isPlaying=function(){return"ended"!==this.mainAnimation.getState()},SmartSliderAbstract.prototype.focus=function(t){var e=!1;if(this.responsive.parameters.focusUser&&!t&&(e=!0),e){var i=$(window).scrollTop(),s=this.responsive.focusOffsetTop,n=this.responsive.focusOffsetBottom,r=$(window).height(),o=this.sliderElement[0].getBoundingClientRect(),a=o.top-s,l=r-o.bottom-n;if(0>=a&&0>=l);else if(a>0&&l>0);else{var h=i;if(0>a?h=l>=-a?i-s+o.top:i+n+o.bottom-r:0>l&&(h=a>=-l?i+n+o.bottom-r:i-s+o.top),h!==i)return this._scrollTo(h,Math.abs(i-h))}}return!0},SmartSliderAbstract.prototype._scrollTo=function(t,e){var i=$.Deferred();return window.nextendScrollFocus=!0,$("html, body").animate({scrollTop:t},e,$.proxy(function(){i.resolve(),setTimeout(function(){window.nextendScrollFocus=!1},100)},this)),i},SmartSliderAbstract.prototype.isChangeCarousel=function(t){return"next"===t?this.currentSlide.index+1>=this.slides.length:"previous"===t?this.currentSlide.index-1<0:!1},SmartSliderAbstract.prototype.initNotCarousel=function(){this.next=function(t,e){var i=this.currentSlide.index+1;return i<this.slides.length?this.changeTo(i,!1,t,e):!1},this.previous=function(t,e){var i=this.currentSlide.index-1;return i>=0?this.changeTo(i,!0,t,e):!1},this.isChangePossible=function(t){var e=!1;return"next"===t?(e=this.currentSlide.index+1,e>=this.slides.length&&(e=!1)):"previous"===t&&(e=this.currentSlide.index-1,0>e&&(e=!1)),e!==!1&&e!==this.currentSlide.index};var t=$.proxy(function(t){0===t?this.widgets.setState("nonCarouselFirst",!0):this.widgets.setState("nonCarouselFirst",!1),t===this.slides.length-1?this.widgets.setState("nonCarouselLast",!0):this.widgets.setState("nonCarouselLast",!1)},this);this.startedDeferred.done($.proxy(function(){t(this.currentSlide.index)},this)),this.sliderElement.on("sliderSwitchTo",function(e,i){t(i)})},SmartSliderAbstract.prototype.isChangePossibleCarousel=function(t){var e=!1;return"next"===t?(e=this.currentSlide.index+1,e>=this.slides.length&&(e=0)):"previous"===t&&(e=this.currentSlide.index-1,0>e&&(e=this.slides.length-1)),e!==!1&&e!==this.currentSlide.index},SmartSliderAbstract.prototype.initCarousel=function(){this.next=this.nextCarousel,this.previous=this.previousCarousel,this.isChangePossible=this.isChangePossibleCarousel},SmartSliderAbstract.prototype.nextCarousel=function(t,e){var i=this.currentSlide.index+1;return i>=this.slides.length&&(i=0),this.changeTo(i,!1,t,e)},SmartSliderAbstract.prototype.previousCarousel=function(t,e){var i=this.currentSlide.index-1;return 0>i&&(i=this.slides.length-1),this.changeTo(i,!0,t,e)},SmartSliderAbstract.prototype.directionalChangeToReal=function(t){this.directionalChangeTo(t)},SmartSliderAbstract.prototype.directionalChangeTo=function(t){t>this.currentSlide.index?this.changeTo(t,!1):this.changeTo(t,!0)},SmartSliderAbstract.prototype.changeTo=function(t,e,i,s){if(t=parseInt(t),t!==this.currentSlide.index){this.sliderElement.trigger("sliderSwitchTo",[t,this.getRealIndex(t)]);var n=$.now();return $.when($.when.apply($,this.backgrounds.preLoadSlides(this.getVisibleSlides(this.slides[t]))),this.focus(i)).done($.proxy(function(){if(this.mainAnimationLastChangeTime<=n){this.mainAnimationLastChangeTime=n;var r=this.mainAnimation.getState();if("ended"===r){"undefined"==typeof i&&(i=!1);var o=this.mainAnimation;"undefined"!=typeof s&&(o=s),this._changeTo(t,e,i,s),o.changeTo(this.currentSlide,this.slides[t],e,i),this._changeCurrentSlide(t)}else"initAnimation"!==r&&"playing"!==r||(this.sliderElement.off(".fastChange").one("mainAnimationComplete.fastChange",$.proxy(function(){this.changeTo.call(this,t,e,i,s)},this)),this.mainAnimation.timeScale(2*this.mainAnimation.timeScale()))}},this)),!0}return!1},SmartSliderAbstract.prototype._changeCurrentSlide=function(t){this.currentRealSlide=this.currentSlide=this.slides[t],this.sliderElement.triggerHandler("sliderChangeCurrentSlide")},SmartSliderAbstract.prototype._changeTo=function(t,e,i,s){},SmartSliderAbstract.prototype.revertTo=function(t,e){this.unsetActiveSlide(this.slides[e]),this.setActiveSlide(this.slides[t]),this._changeCurrentSlide(t),this.sliderElement.trigger("sliderSwitchTo",[t,this.getRealIndex(t)])},SmartSliderAbstract.prototype.setActiveSlide=function(t){t.$element.addClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.unsetActiveSlide=function(t){t.$element.removeClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.initMainAnimationWithLayerAnimation=function(){"forced"===this.parameters.layerMode.mode&&this.sliderElement.on("preChangeToPlay",$.proxy(function(t,e,i,s,n){i.handled=!0,s.$element.on("layerAnimationCompleteOut.layers",function(){s.$element.off("layerAnimationCompleteOut.layers"),e.resolve()}),s.playOut()},this)),this.sliderElement.on("mainAnimationStart",$.proxy(this.onMainAnimationStartSyncLayers,this,this.parameters.layerMode)).on("reverseModeEnabled",$.proxy(this.onMainAnimationStartSyncLayersReverse,this,this.parameters.layerMode))},SmartSliderAbstract.prototype.onMainAnimationStartSyncLayers=function(t,e,i,s,n){var r=this.slides[n].$element,o=this.slides[s].$element;"mainInStart"===t.inAnimation?r.one("mainAnimationStartIn.layers",$.proxy(function(){r.off("mainAnimationStartInCancel.layers"),r.data("slide").playIn()},this)):"mainInEnd"===t.inAnimation&&r.one("mainAnimationCompleteIn.layers",$.proxy(function(){r.off("mainAnimationStartInCancel.layers"),r.data("slide").playIn()},this)),o.on("mainAnimationCompleteOut.layers",$.proxy(function(){o.off("mainAnimationCompleteOut.layers"),"skippable"===t.mode?t.playOnce?o.data("slide").suspend():o.data("slide").reset():"forced"===t.mode&&(t.playOnce||o.data("slide").reset())},this)),r.one("mainAnimationStartInCancel.layers",function(){r.off("mainAnimationStartIn.layers"),r.off("mainAnimationCompleteIn.layers")})},SmartSliderAbstract.prototype.onMainAnimationStartSyncLayersReverse=function(t,e,i){var s=this.slides[i].$element;"mainInStart"===t.inAnimation?s.one("mainAnimationStartIn.layers",$.proxy(function(){s.data("slide").playIn()},this)):"mainInEnd"===t.inAnimation&&s.one("mainAnimationCompleteIn.layers",$.proxy(function(){this.sliderElement.off("mainAnimationComplete.layers"),s.data("slide").playIn()},this)),this.sliderElement.one("mainAnimationComplete.layers",function(){s.off("mainAnimationStartIn.layers"),s.off("mainAnimationCompleteIn.layers")})},SmartSliderAbstract.prototype.findSlideByElement=function(t){t=$(t);for(var e=0;e<this.realSlides.length;e++)if(1===this.realSlides[e].$element.has(t).length)return this.realSlides[e];return!1},SmartSliderAbstract.prototype.findSlideIndexByElement=function(t){var e=this.findSlideByElement(t);return e?e:-1},SmartSliderAbstract.prototype.initMainAnimation=function(){this.mainAnimation=!1},SmartSliderAbstract.prototype.initResponsiveMode=function(){this.dimensions=this.responsive.responsiveDimensions},SmartSliderAbstract.prototype.hasTouch=function(){return"0"!=this.parameters.controls.touch&&this.slides.length>1},SmartSliderAbstract.prototype.initControls=function(){if(!this.parameters.admin){if(this.hasTouch())switch(this.parameters.controls.touch){case"vertical":new N2Classes.SmartSliderControlTouchVertical(this);break;case"horizontal":new N2Classes.SmartSliderControlTouchHorizontal(this)}this.parameters.controls.keyboard&&("undefined"!=typeof this.controls.touch?new N2Classes.SmartSliderControlKeyboard(this,this.controls.touch.axis):new N2Classes.SmartSliderControlKeyboard(this,"horizontal")),this.parameters.controls.mousewheel&&new N2Classes.SmartSliderControlMouseWheel(this),this.controlAutoplay=new N2Classes.SmartSliderControlAutoplay(this,this.parameters.autoplay),this.controlFullscreen=new N2Classes.SmartSliderControlFullscreen(this)}},SmartSliderAbstract.prototype.getSlideIndex=function(t){return t},SmartSliderAbstract.prototype.slideToID=function(t,e){for(var i=0;i<this.realSlides.length;i++)if(this.realSlides[i].id===t)return this.slide(this.getSlideIndex(i),e);var s=$('[data-id="'+t+'"]').closest(".n2-ss-slider");return s.length&&this.id===s.data("ss").id?!0:s.length?($("html, body").animate({scrollTop:s.offset().top},400),s.data("ss").slideToID(t,e)):void 0},SmartSliderAbstract.prototype.slide=function(t,e){return t>=0&&t<this.slides.length?e===undefined?parseInt(this.parameters.carousel)&&this.currentSlide.index===this.slides.length-1&&0===t?this.next():this.currentSlide.index>t?this.changeTo(t,!0):this.changeTo(t):this.changeTo(t,!e):!1},SmartSliderAbstract.prototype.startAutoplay=function(t){return"undefined"!=typeof this.controlAutoplay?(this.controlAutoplay.pauseAutoplayExtraPlayingEnded(t,"autoplayButton"),!0):!1},SmartSliderAbstract.prototype.initLayerAnimations=function(){this.staticSlide&&this.staticSlide.initLayerAnimations();for(var t=0;t<this.realSlides.length;t++)this.realSlides[t].initLayerAnimations();this.sliderElement.on("SliderResize",$.proxy(this._resizeSlides,this))},SmartSliderAbstract.prototype._resizeSlides=function(t,e,i,s){this.staticSlide&&this.staticSlide.resize.apply(this.staticSlide,arguments);for(var n=0;n<this.realSlides.length;n++)this.realSlides[n].resize.apply(this.realSlides[n],arguments)},SmartSliderAbstract.prototype.startLightbox=function(){if(N2R(["litebox","windowLoad"],$.proxy(function(){n2Lightbox(this.sliderElement,{blockrightclick:this.parameters.blockrightclick})},this)),this.parameters.lightbox.length>0){if(this.isShuffled){for(var t=[],e=0;this.realSlides.length>e;e++)t.push(this.parameters.lightbox[this.realSlides[e].originalIndex]);
this.parameters.lightbox=t}for(var i=[],s=0,n=this,e=0;e<this.parameters.lightbox.length;e++)i.push($('<a href="'+this.parameters.lightbox[e]+'" n2-lightbox="" data-litebox-group="'+this.id+'" class="nolightbox" style="display:none;"></a>').data({title:this.parameters.titles[e],description:this.parameters.descriptions[e]}).on("click",function(t){t.stopPropagation()}).appendTo(this.realSlides[e].$element));this.parameters.lightboxDeviceImages&&this.sliderElement.on("SliderDevice",$.proxy(function(t,e){for(var s=0;s<this.parameters.lightbox.length;s++){var n=this.parameters.lightbox[s];if(this.parameters.lightboxDeviceImages[n]){var r=this.parameters.lightbox[s];"mobile"===e.device?this.parameters.lightboxDeviceImages[n]["mobile"+(n2const.isRetina?"-retina":"")]?r=this.parameters.lightboxDeviceImages[n]["mobile"+(n2const.isRetina?"-retina":"")]:this.parameters.lightboxDeviceImages[n]["tablet"+(n2const.isRetina?"-retina":"")]&&(r=this.parameters.lightboxDeviceImages[n]["tablet"+(n2const.isRetina?"-retina":"")]):"tablet"===e.device&&this.parameters.lightboxDeviceImages[n]["tablet"+(n2const.isRetina?"-retina":"")]&&(r=this.parameters.lightboxDeviceImages[n]["tablet"+(n2const.isRetina?"-retina":"")]),i[s].attr("href",r)}}},this)),N2R("litebox",$.proxy(function(){this.sliderElement.find("a[n2-lightbox]").liteBox({blockrightclick:this.parameters.blockrightclick,callbackBeforeOpen:function(t){s=n.currentRealSlide.index,this.$element.trigger("mediaStarted",this)},callbackAfterClose:function(){this.$element.trigger("mediaEnded",this)},callbackPrev:$.proxy(function(){var t=s-1;0>t&&(t=n.realSlides.length-1),this.directionalChangeToReal(t),s=t},this),callbackNext:$.proxy(function(){var t=s+1;t>=n.realSlides.length&&(t=0),this.directionalChangeToReal(t),s=t},this)})},this));var r="click";this.hasTouch()&&(r="n2click");for(var e=0;e<this.realSlides.length;e++)this.realSlides[e].$element.css("cursor","zoom-in").on(r,$.proxy(function(t,e){n2ss.isClickAllowed(e)&&!$(e.target).hasClass("smart-slider-overlay")&&setTimeout($.proxy(function(){"ended"===this.mainAnimation.state&&i[t].trigger("click")},this),10)},this,e))}},SmartSliderAbstract.prototype.getSlideBackgroundContainer=function(){},SmartSliderAbstract.prototype.getPerspective=function(){return this.parameters.perspective},SmartSliderAbstract.prototype.startParticleJS=function(t){if(this.pJS&&this.pJS.pJS.fn.vendors.destroypJS(),t.mobile||!n2const.isPhone){var e=this.getSlideBackgroundContainer(),i=N2Classes.particlesJS(e,$.extend(!0,t,{interactivity:{detect_on:this.sliderElement[0]}}));return this.sliderElement.on("SliderResize",function(){i.pJS.fn.resize()}),this.pJS=i,this.pJS}},SmartSliderAbstract.prototype.getAnimationAxis=function(){return"horizontal"},SmartSliderAbstract.prototype.getDirectionPrevious=function(){return n2const.isRTL()&&"horizontal"===this.getAnimationAxis()?"next":"previous"},SmartSliderAbstract.prototype.getDirectionNext=function(){return n2const.isRTL()&&"horizontal"===this.getAnimationAxis()?"previous":"next"},SmartSliderAbstract.prototype.previousWithDirection=function(){return this[this.getDirectionPrevious()]()},SmartSliderAbstract.prototype.nextWithDirection=function(){return this[this.getDirectionNext()]()},SmartSliderAbstract}),N2D("SmartSliderWidgets",function($,undefined){function SmartSliderWidgets(t){this.slider=t,this.sliderElement=t.sliderElement.on("BeforeVisible",$.proxy(this.onReady,this)),this.widgets={},this.excludedSlides={},this.states={hover:!1,nonCarouselFirst:!1,nonCarouselLast:!1,currentSlideIndex:-1,singleSlide:!1},this.widgets={previous:this.sliderElement.find(".nextend-arrow-previous"),next:this.sliderElement.find(".nextend-arrow-next"),bullet:this.sliderElement.find(".n2-ss-control-bullet"),autoplay:this.sliderElement.find(".nextend-autoplay"),indicator:this.sliderElement.find(".nextend-indicator"),bar:this.sliderElement.find(".nextend-bar"),thumbnail:this.sliderElement.find(".nextend-thumbnail"),shadow:this.sliderElement.find(".nextend-shadow"),fullscreen:this.sliderElement.find(".nextend-fullscreen"),html:this.sliderElement.find(".nextend-widget-html")}}return SmartSliderWidgets.prototype.setState=function(t,e){if(this.states[t]!=e){this.states[t]=e;var i=t.split(".");switch(i[0]){case"hide":this.onStateChangeSingle(i[1]);break;case"nonCarouselFirst":this.onStateChangeSingle(this.slider.getDirectionPrevious());break;case"nonCarouselLast":this.onStateChangeSingle(this.slider.getDirectionNext());break;default:this.onStateChangeAll()}}},SmartSliderWidgets.prototype.onStateChangeAll=function(){for(var t in this.widgets)this.onStateChangeSingle(t)},SmartSliderWidgets.prototype.onStateChangeSingle=function(t){if(this.widgets[t].length){var e=!0;if(this.widgets[t].hasClass("n2-ss-widget-display-hover")&&(e=this.states.hover),e&&(t===this.slider.getDirectionPrevious()&&this.states.nonCarouselFirst?e=!1:t===this.slider.getDirectionNext()&&this.states.nonCarouselLast&&(e=!1)),e){var i=t+"-"+(this.states.currentSlideIndex+1);this.excludedSlides[i]&&(e=!1)}e&&this.states["hide."+t]!==undefined&&this.states["hide."+t]&&(e=!1),e&&this.states.singleSlide&&("previous"!==t&&"next"!==t&&"bullet"!==t&&"autoplay"!==t&&"indicator"!==t||(e=!1)),this.widgets[t].toggleClass("n2-ss-widget-hidden",!e)}},SmartSliderWidgets.prototype.onReady=function(){this.slider.sliderElement.on("slideCountChanged",$.proxy(function(){this.setState("singleSlide",this.slider.slides.length<=1)},this)),this.dimensions=this.slider.dimensions,this.$vertical=this.sliderElement.find('[data-position="above"],[data-position="below"]').not(".nextend-shadow");var t=!1;for(var e in this.widgets){var i=this.widgets[e].attr("data-exclude-slides");if(i!==undefined){for(var s=i.split(","),n=s.length-1;n>=0;n--){var r=s[n].split("-");if(2===r.length){var o=parseInt(r[0]),a=parseInt(r[1]);if(a>=o)for(var l=o;a>=l;l++)s.push(l)}else s[n]=parseInt(s[n])}if(s.length>0){for(var n=0;n<s.length;n++)this.excludedSlides[e+"-"+s[n]]=!0;t=!0}}}if(t){var h=$.proxy(function(t,e){this.setState("currentSlideIndex",e)},this);h(null,this.slider.currentRealSlide.index),this.slider.sliderElement.on({sliderSwitchTo:h})}this.variableElementsDimension={width:this.sliderElement.find("[data-sswidth]"),height:this.sliderElement.find("[data-ssheight]")},this.variableElements={top:this.sliderElement.find("[data-sstop]"),right:this.sliderElement.find("[data-ssright]"),bottom:this.sliderElement.find("[data-ssbottom]"),left:this.sliderElement.find("[data-ssleft]")},this.slider.sliderElement.on("SliderAnimatedResize",$.proxy(this.onAnimatedResize,this)),this.slider.sliderElement.on("SliderResize",$.proxy(this.onResize,this)),this.slider.sliderElement.one("slideCountChanged",$.proxy(function(){this.onResize(this.slider.responsive.lastRatios)},this)),this.onResize(this.slider.responsive.lastRatios),this.onStateChangeAll()},SmartSliderWidgets.prototype.onAnimatedResize=function(e,ratios,timeline,duration){for(var key in this.widgets){var el=this.widgets[key],visible=el.is(":visible");this.dimensions[key+"width"]=visible?el.outerWidth(!1):0,this.dimensions[key+"height"]=visible?el.outerHeight(!1):0}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)"number"==typeof value[key2]&&(variableText+="var "+key+key2+" = "+value[key2]+";");else"number"==typeof value&&(variableText+="var "+key+" = "+value+";")}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible")){var to={};try{to[k]=eval(el.data("ss"+k))+"px";for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}timeline.to(el,duration,to,0)}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var to={};to[k]=eval(el.data("ss"+k))+"px",timeline.to(el,duration,to,0)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}},SmartSliderWidgets.prototype.onResize=function(e,ratios,responsive,timeline){if(!timeline){for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,0)}for(var key in this.widgets){var el=this.widgets[key],visible=el.length&&el.is(":visible");el.length&&el.is(":visible")?(this.dimensions[key+"width"]=el.outerWidth(!1),this.dimensions[key+"height"]=el.outerHeight(!1)):(this.dimensions[key+"width"]=0,this.dimensions[key+"height"]=0)}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,last)}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)"number"==typeof value[key2]&&(variableText+="var "+key+key2+" = "+value[key2]+";");else"number"==typeof value&&(variableText+="var "+key+" = "+value+";")}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible"))try{el.css(k,eval(el.data("ss"+k))+"px");for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var value=eval(el.data("ss"+k));el.css(k,value+"px"),el.data("n2Last"+k,value)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}this.slider.responsive.refreshStaticSizes()}},SmartSliderWidgets}),N2D("SmartSliderMainAnimationAbstract",function(t,e){function i(e,i){this.state="ended",this.isTouch=!1,this.isReverseAllowed=!0,this.isReverseEnabled=!1,this.reverseSlideIndex=null,this.isNoAnimation=!1,this.slider=e,this.parameters=t.extend({duration:1500,ease:"easeInOutQuint"},i),this.parameters.duration/=1e3,this.sliderElement=e.sliderElement,this.timeline=new NextendTimeline({paused:!0}),this.sliderElement.on("mainAnimationStart",t.proxy(function(t,e,i,s){this._revertCurrentSlideIndex=i,this._revertNextSlideIndex=s},this))}return i.prototype.setToStarterSlide=function(t){},i.prototype.enableReverseMode=function(){this.isReverseEnabled=!0,this.reverseTimeline=new NextendTimeline({paused:!0}),this.sliderElement.triggerHandler("reverseModeEnabled",this.reverseSlideIndex)},i.prototype.disableReverseMode=function(){this.isReverseEnabled=!1},i.prototype.setTouch=function(t){this.isTouch=t},i.prototype.setTouchProgress=function(t){"ended"!==this.state&&(this.isReverseEnabled?0===t?(this.reverseTimeline.progress(0),this.timeline.progress(t,!1)):t>=0&&1>=t?(this.reverseTimeline.progress(0),this.timeline.progress(t)):0>t&&t>=-1&&(this.timeline.progress(0),this.reverseTimeline.progress(Math.abs(t))):0>=t?this.timeline.progress(Math.max(t,1e-6),!1):t>=0&&1>=t&&this.timeline.progress(t))},i.prototype.setTouchEnd=function(t,e,i){"ended"!=this.state&&(this.isReverseEnabled?this._setTouchEndWithReverse(t,e,i):this._setTouchEnd(t,e,i))},i.prototype._setTouchEnd=function(t,e,i){t&&e>0?(this.fixTouchDuration(this.timeline,e,i),this.timeline.play()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-e,i),this.timeline.reverse(),this.willRevertTo(this._revertCurrentSlideIndex,this._revertNextSlideIndex))},i.prototype._setTouchEndWithReverse=function(t,e,i){t?0>e&&this.reverseTimeline.totalDuration()>0?(this.fixTouchDuration(this.reverseTimeline,e,i),this.reverseTimeline.play(),this.willRevertTo(this.reverseSlideIndex,this._revertNextSlideIndex)):(this.willCleanSlideIndex(this.reverseSlideIndex),this.fixTouchDuration(this.timeline,e,i),this.timeline.play()):(0>e?(this.revertCB(this.reverseTimeline),this.fixTouchDuration(this.reverseTimeline,1-e,i),this.reverseTimeline.reverse()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-e,i),this.timeline.reverse()),this.willCleanSlideIndex(this.reverseSlideIndex),this.willRevertTo(this._revertCurrentSlideIndex,this._revertNextSlideIndex))},i.prototype.fixTouchDuration=function(t,e,i){var s=t.totalDuration(),n=Math.max(s/3,Math.min(s,i/Math.abs(e)/1e3));n!==s&&t.totalDuration(n)},i.prototype.getState=function(){return this.state},i.prototype.timeScale=function(){return arguments.length>0?(this.timeline.timeScale(arguments[0]),this):this.timeline.timeScale()},i.prototype.preChangeToPlay=function(t,e,i){var s={handled:!1};this.sliderElement.trigger("preChangeToPlay",[t,s,e,i]),s.handled||t.resolve()},i.prototype.changeTo=function(e,i,s,n){if(this._initAnimation(e,i,s),this.state="initAnimation",this.timeline.paused(!0),this.timeline.eventCallback("onStart",this.onChangeToStart,[e,i,n],this),this.timeline.eventCallback("onComplete",this.onChangeToComplete,[e,i,n],this),this.timeline.eventCallback("onReverseComplete",null),this.revertCB=t.proxy(function(t){t.eventCallback("onReverseComplete",this.onReverseChangeToComplete,[i,e,n],this)},this),this.slider.parameters.dynamicHeight){var r=new NextendTimeline;this.slider.responsive.doResize(null,r,i,.6),this.timeline.add(r)}if(this.isTouch)e.onOutAnimationsPlayed();else{var o=t.Deferred();o.done(t.proxy(function(){this.play()},this.timeline)),this.preChangeToPlay(o,e,i)}},i.prototype.willRevertTo=function(e,i){this.sliderElement.triggerHandler("mainAnimationWillRevertTo",[e,i]),this.sliderElement.one("mainAnimationComplete",t.proxy(this.revertTo,this,e,i))},i.prototype.revertTo=function(t,e){this.slider.revertTo(t,e),this.slider.slides[e].triggerHandler("mainAnimationStartInCancel")},i.prototype.willCleanSlideIndex=function(e){this.sliderElement.one("mainAnimationComplete",t.proxy(this.cleanSlideIndex,this,e))},i.prototype.cleanSlideIndex=function(){},i.prototype._initAnimation=function(t,e,i){},i.prototype.onChangeToStart=function(t,e,i){this.state="playing";var s=[this,t.index,e.index,i];this.sliderElement.trigger("mainAnimationStart",s),this.slider.slides[t.index].trigger("mainAnimationStartOut",s),this.slider.slides[e.index].trigger("mainAnimationStartIn",s)},i.prototype.onChangeToComplete=function(t,e,i){var s=[this,t.index,e.index,i];this.clearTimelines(),this.disableReverseMode(),this.slider.slides[t.index].trigger("mainAnimationCompleteOut",s),this.slider.slides[e.index].trigger("mainAnimationCompleteIn",s),this.state="ended",this.sliderElement.trigger("mainAnimationComplete",s)},i.prototype.onReverseChangeToComplete=function(t,e,s){i.prototype.onChangeToComplete.apply(this,arguments)},i.prototype.clearTimelines=function(){this.revertCB=function(){},this.timeline.clear(),this.timeline.timeScale(1)},i.prototype.getEase=function(){return this.isTouch?"linear":this.parameters.ease},i}),N2D("SmartSliderPostBackgroundAnimation",function(t,e){function i(e,i){this.tween=null,this.lastTween=null,this.slider=e,this.mainAnimation=i,this.isFirst=!0,this.visibleAddedButNotPlayed=!1,this.parameters=t.extend({data:0,speed:"default",strength:"default"},e.parameters.postBackgroundAnimations),this.backgrounds=e.backgrounds,this.tweens=[],this.images=this.backgrounds.getBackgroundImages();for(var s=0;s<this.images.length;s++)this.images[s]&&this.images[s].hasImage()?(this.tweens[s]=this.images[s].loadDeferred,this.images[s].loadDeferred.done(t.proxy(function(t){this.tweens[t]=this.getAnimation(t,this.images[t],{slideW:1,slideH:1})},this,s))):this.tweens[s]=!1;this.playOnce=e.parameters.layerMode.playOnce,this.playFirst=e.parameters.layerMode.playFirstLayer;var n=e.currentSlide.index;this.tweens[n]&&t.when(this.tweens[n]).done(t.proxy(function(){this.tween=this.tweens[n],this.playFirst?this.addVisiblePlay():this.tween&&this.tween.progress(1,!1)},this)),e.sliderElement.on({mainAnimationStart:t.proxy(this.onMainAnimationStart,this),mainAnimationComplete:t.proxy(this.stop,this),SliderResize:t.proxy(this.onResize,this),mainAnimationWillRevertTo:t.proxy(this.onMainAnimationWillRevertTo,this)})}function s(t,e,i,s){this.startTime=-1,this.currentProgress=0,this.$el=t,this.duration=e,this.from=i,this.from.immediateRender=!0,this.to=s,this.playTimeout=null,this.pause(0)}var n={"default":5,superSlow:20,slow:10,normal:5,fast:3,superFast:1.5},r={"default":1,superSoft:.3,soft:.6,normal:1,strong:1.5,superStrong:2};return i.prototype.addVisiblePlay=function(){this.visibleAddedButNotPlayed||(this.visibleAddedButNotPlayed=!0,this.slider.visible(t.proxy(this.play,this)))},i.prototype.onMainAnimationStart=function(){this.isFirst=!1,this.mainAnimation.hasBackgroundAnimation()||this.mainAnimation.isTouch?this.slider.sliderElement.one("mainAnimationComplete",t.proxy(this.play,this)):this.play()},i.prototype.onMainAnimationWillRevertTo=function(t,e,i){this.lastTween=this.tween,this.tween=!1},i.prototype.onResize=function(t,e){for(var i=0;i<this.tweens.length;i++){var s=this.tweens[i];s&&(s==this.tween?(s.pause(0),this.tween=this.tweens[i]=this.getAnimation(i,this.images[i],e),this.playFirst||!this.isFirst?this.addVisiblePlay():this.tween.progress(1)):this.tweens[i]=this.getAnimation(i,this.images[i],e))}},i.prototype.getAnimation=function(i,o,a){if(!o.elements.image)return!1;var l=this.parameters.data,h=this.parameters.speed,d=this.parameters.strength;if(this.slider.slides[i].postBackgroundAnimation){var p=this.slider.slides[i].postBackgroundAnimation;l=p.data,h=p.speed,d=p.strength}if(!l)return!1;var c=t.extend(!0,{},l.animations[Math.floor(Math.random()*l.animations.length)]);c.from.transformOrigin===e&&(c.from.transformOrigin=l.transformOrigin),(n2const.isFirefox||n2const.isIE<=11)&&NextendTween.set(o.elements.image.$background.parent(),{rotationZ:"0.001deg"}),NextendTween.set(o.elements.image.$background,{transformOrigin:c.from.transformOrigin,backfaceVisibility:"hidden",transformStyle:"flat",overflow:"hidden"}),c.to.paused=!0;for(var i=0;i<c.strength.length;i++){var u=c.strength[i];"scale"===u?(c.from.scale=1+(c.from.scale-1)*r[d],c.to.scale=1+(c.to.scale-1)*r[d]):(c.from[u]*=r[d],c.to[u]*=r[d])}return"undefined"!=typeof c.from.x&&(c.from.x*=a.slideW),"undefined"!=typeof c.from.y&&(c.from.y*=a.slideH),"undefined"!=typeof c.to.x&&(c.to.x*=a.slideW),"undefined"!=typeof c.to.y&&(c.to.y*=a.slideH),n2const.isFirefox||n2const.isIOS||n2const.isMobile?NextendTween.fromTo(o.elements.image.$background,n[h],c.from,c.to):new s(o.elements.image.$background,n[h],c.from,c.to)},i.prototype.prepareToSwitchSlide=function(t,e){this.tweens[t.index]?(this.mainAnimation.hasBackgroundAnimation()&&this.tweens[t.index].pause(),this.lastTween=this.tweens[t.index]):this.lastTween=!1,this.tweens[e.index]?this.tween=this.tweens[e.index]:this.tween=!1},i.prototype.play=function(){this.visibleAddedButNotPlayed=!1,!this.tween||this.playOnce&&0!==this.tween.progress()||this.tween.play()},i.prototype.stop=function(){!this.playOnce&&this.lastTween&&this.lastTween.pause(0)},s.prototype.forceReFlow=function(){for(var t=0;t<this.$el.length;t++)this.$el[t].getBoundingClientRect()},s.prototype.pause=function(t){if(0===t){null!==this.playTimeout&&(clearTimeout(this.playTimeout),this.playTimeout=null);for(var e=0;e<this.$el.length;e++)this.$el[e].style.setProperty("transition","none 0s","important");NextendTween.set(this.$el,this.from),this.forceReFlow()}},s.prototype.play=function(){for(var e=0;e<this.$el.length;e++)this.$el[e].style.setProperty("transition","all "+this.duration+"s","important");this.forceReFlow(),this.startTime=t.now(),null!==this.playTimeout&&(clearTimeout(this.playTimeout),this.playTimeout=null),this.playTimeout=setTimeout(t.proxy(function(){NextendTween.set(this.$el,this.to)},this),50)},s.prototype.progress=function(e){return-1===this.startTime?0:(t.now()-this.startTime)/this.duration/1e3},i}),N2D("SmartSliderControlAutoplay",function(t,e){"use strict";function i(e,i){this._paused=!0,this._wait=!1,this._disabled=!1,this._currentCount=0,this._progressEnabled=!1,this.timeline=null,this.hasButton=!1,this.deferredsMediaPlaying=null,this.deferredMouseLeave=null,this.deferredMouseEnter=null,this.mainAnimationDeferred=!0,this.autoplayDeferred=null,this.slider=e,this.parameters=t.extend({enabled:0,start:1,duration:8e3,autoplayToSlide:0,autoplayToSlideIndex:-1,allowReStart:0,pause:{mouse:"enter",click:!0,mediaStarted:!0},resume:{click:0,mouse:0,mediaEnded:!0}},i),this.parameters.enabled?(this.parameters.duration/=1e3,e.controls.autoplay=this,this.deferredsExtraPlaying={},this.slider.visible(t.proxy(this.onReady,this))):this.disable(),this.clickHandled=!1,e.controls.autoplay=this}var s=!1;return i.prototype.preventClickHandle=function(){this.clickHandled=!0,setTimeout(t.proxy(function(){this.clickHandled=!1},this),300)},i.prototype.onReady=function(){this.autoplayDeferred=t.Deferred();var e={_progress:0};this.timeline=NextendTween.to(e,this.getSlideDuration(this.slider.currentSlide.index),{_progress:1,paused:!0,onComplete:t.proxy(this.next,this)}),this._progressEnabled&&this.enableProgress();var i=this.slider.sliderElement;if(this.parameters.start?this.continueAutoplay():this.pauseAutoplayExtraPlaying(null,"autoplayButton"),i.on("mainAnimationStart.autoplay",t.proxy(this.onMainAnimationStart,this)),"0"!=this.parameters.pause.mouse)switch(i.on("touchend.autoplay",function(){s=!0,setTimeout(function(){s=!1},300)}),this.parameters.pause.mouse){case"enter":i.on("mouseenter.autoplay",t.proxy(this.pauseAutoplayMouseEnter,this)),i.on("mouseleave.autoplay",t.proxy(this.pauseAutoplayMouseEnterEnded,this));break;case"leave":i.on("mouseleave.autoplay",t.proxy(this.pauseAutoplayMouseLeave,this)),i.on("mouseenter.autoplay",t.proxy(this.pauseAutoplayMouseLeaveEnded,this))}if(this.parameters.pause.click&&!this.parameters.resume.click?i.on("universalclick.autoplay",t.proxy(function(t){this.clickHandled||this.pauseAutoplayUniversal(t)},this)):!this.parameters.pause.click&&this.parameters.resume.click?i.on("universalclick.autoplay",t.proxy(function(t){this.clickHandled||this.pauseAutoplayExtraPlayingEnded(t,"autoplayButton")},this)):this.parameters.pause.click&&this.parameters.resume.click&&i.on("universalclick.autoplay",t.proxy(function(t){this.clickHandled||(this._paused?this.pauseAutoplayExtraPlayingEnded(t,"autoplayButton"):this.pauseAutoplayUniversal(t))},this)),this.parameters.pause.mediaStarted&&(this.deferredsMediaPlaying={},i.on("mediaStarted.autoplay",t.proxy(this.pauseAutoplayMediaPlaying,this)),i.on("mediaEnded.autoplay",t.proxy(this.pauseAutoplayMediaPlayingEnded,this))),"0"!=this.parameters.resume.mouse)switch(this.parameters.resume.mouse){case"enter":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseenter.autoplay",t.proxy(this.continueAutoplay,this)):i.on("mouseenter.autoplay",t.proxy(function(t){this.pauseAutoplayExtraPlayingEnded(t,"autoplayButton")},this));break;case"leave":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseleave.autoplay",t.proxy(this.continueAutoplay,this)):i.on("mouseleave.autoplay",t.proxy(function(t){this.pauseAutoplayExtraPlayingEnded(t,"autoplayButton")},this))}this.parameters.resume.mediaEnded&&i.on("mediaEnded.autoplay",t.proxy(this.continueAutoplay,this)),i.on("autoplayExtraWait.autoplay",t.proxy(this.pauseAutoplayExtraPlaying,this)),i.on("autoplayExtraContinue.autoplay",t.proxy(this.pauseAutoplayExtraPlayingEnded,this)),this.slider.sliderElement.on("mainAnimationComplete.autoplay",t.proxy(this.onMainAnimationComplete,this))},i.prototype.enableProgress=function(){this.timeline&&this.timeline.eventCallback("onUpdate",t.proxy(this.onUpdate,this)),this._progressEnabled=!0},i.prototype.onMainAnimationStart=function(e,i,s,n,r){this.mainAnimationDeferred=t.Deferred(),this.deActivate(0,"wait");for(var o in this.deferredsMediaPlaying)this.deferredsMediaPlaying[o].resolve()},i.prototype.onMainAnimationComplete=function(t,e,i,s){this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentRealSlide.index+1&&this.limitAutoplay(),this.timeline.duration(this.getSlideDuration(s)),this.mainAnimationDeferred.resolve(),this.continueAutoplay()},i.prototype.getSlideDuration=function(t){var e=this.slider.realSlides[this.slider.getRealIndex(t)],i=e.minimumSlideDuration;return 0==i&&(i=this.parameters.duration),i},i.prototype.continueAutoplay=function(e){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.reject();var i=[];for(var s in this.deferredsExtraPlaying)i.push(this.deferredsExtraPlaying[s]);for(var s in this.deferredsMediaPlaying)i.push(this.deferredsMediaPlaying[s]);this.deferredMouseEnter&&i.push(this.deferredMouseEnter),this.deferredMouseLeave&&i.push(this.deferredMouseLeave),i.push(this.mainAnimationDeferred),this.autoplayDeferred=t.Deferred(),this.autoplayDeferred.done(t.proxy(this._continueAutoplay,this)),t.when.apply(t,i).done(t.proxy(function(){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.resolve()},this))},i.prototype._continueAutoplay=function(){!this._paused&&!this._wait||this._disabled||(this._paused=!1,this._wait=!1,this.slider.sliderElement.triggerHandler("autoplayStarted"),1==this.timeline.progress()&&this.timeline.pause(0,!1),this.startTimeout(null))},i.prototype.pauseAutoplayUniversal=function(t){this.pauseAutoplayExtraPlaying(t,"autoplayButton"),this.deActivate(null,"pause")},i.prototype.pauseAutoplayMouseEnter=function(){s||(this.autoplayDeferred.reject(),this.deferredMouseEnter=t.Deferred(),this.deActivate(null,"leave"==this.parameters.resume.mouse?"wait":"pause"))},i.prototype.pauseAutoplayMouseEnterEnded=function(){this.deferredMouseEnter&&this.deferredMouseEnter.resolve()},i.prototype.pauseAutoplayMouseLeave=function(){this.autoplayDeferred.reject(),this.deferredMouseLeave=t.Deferred(),this.deActivate(null,"enter"==this.parameters.resume.mouse?"wait":"pause")},i.prototype.pauseAutoplayMouseLeaveEnded=function(){this.deferredMouseLeave&&this.deferredMouseLeave.resolve()},i.prototype.pauseAutoplayMediaPlaying=function(e,i){"undefined"!=typeof this.deferredsMediaPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsMediaPlaying[i]=t.Deferred(),this.deActivate(null,"wait")},i.prototype.pauseAutoplayMediaPlayingEnded=function(t,e){"undefined"!=typeof this.deferredsMediaPlaying[e]&&(this.autoplayDeferred.reject(),this.deferredsMediaPlaying[e].resolve(),delete this.deferredsMediaPlaying[e])},i.prototype.pauseAutoplayExtraPlaying=function(e,i){"undefined"!=typeof this.deferredsExtraPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsExtraPlaying[i]=t.Deferred(),this.deActivate(null,"pause")},i.prototype.pauseAutoplayExtraPlayingEnded=function(t,e){"undefined"!=typeof this.deferredsExtraPlaying[e]&&(this.autoplayDeferred.reject(),this.deferredsExtraPlaying[e].resolve(),delete this.deferredsExtraPlaying[e]),this.continueAutoplay()},i.prototype.deActivate=function(t,e){"pause"==e?this._paused||(this._paused=!0,0!==t&&this.slider.sliderElement.triggerHandler("autoplayPaused")):"wait"==e&&(this._wait||(this._wait=!0,0!==t&&this.slider.sliderElement.triggerHandler("autoplayWait"))),this.timeline&&this.timeline.pause(t,!1)},i.prototype.disable=function(){this.deActivate(0,"pause"),this.slider.sliderElement.triggerHandler("autoplayPaused"),this.slider.sliderElement.triggerHandler("autoplayDisabled"),this.slider.sliderElement.off(".autoplay"),this._disabled=!0},i.prototype.startTimeout=function(t){this._paused||this._disabled||this.timeline.play(t)},i.prototype.next=function(){this.timeline.pause(),this._currentCount++,(this.parameters.autoplayToSlide>0&&this._currentCount>=this.parameters.autoplayToSlide||this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentRealSlide.index+2)&&this.limitAutoplay(),this.slider.nextCarousel(!0)},i.prototype.limitAutoplay=function(){this.parameters.allowReStart?(this._currentCount=0,this.slider.sliderElement.triggerHandler("autoplayExtraWait","autoplayButton")):this.disable()},i.prototype.onUpdate=function(){this.slider.sliderElement.triggerHandler("autoplay",this.timeline.progress())},i}),N2D("SmartSliderControlFullscreen",function(t,e){"use strict";function i(e,i,s){this.slider=e,this.responsive=this.slider.responsive,this._type=this.responsive.parameters.type,this._forceFull=this.responsive.parameters.forceFull,this.forceFullpage="auto"==this._type||"fullwidth"==this._type||"fullpage"==this._type,this.forceFullpage&&(this._upscale=this.responsive.parameters.upscale,this._minimumHeightRatio=t.extend({},this.responsive.parameters.minimumHeightRatio),this._maximumHeightRatio=t.extend({},this.responsive.parameters.maximumHeightRatio)),this.isFullScreen=!1,this.fullParent=this.slider.sliderElement.closest(".n2-ss-align"),this.browserSpecific={};var n=this.slider.sliderElement[0];n.requestFullscreen?(this.browserSpecific.requestFullscreen="requestFullscreen",this.browserSpecific.event="fullscreenchange"):n.msRequestFullscreen?(this.browserSpecific.requestFullscreen="msRequestFullscreen",this.browserSpecific.event="MSFullscreenChange"):n.mozRequestFullScreen?(this.browserSpecific.requestFullscreen="mozRequestFullScreen",this.browserSpecific.event="mozfullscreenchange"):n.webkitRequestFullscreen?(this.browserSpecific.requestFullscreen="webkitRequestFullscreen",this.browserSpecific.event="webkitfullscreenchange"):(this.browserSpecific.requestFullscreen="nextendRequestFullscreen",this.browserSpecific.event="nextendfullscreenchange",this.fullParent[0][this.browserSpecific.requestFullscreen]=t.proxy(function(){this.fullParent.css({position:"fixed",left:0,top:0,width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e6}),document.fullscreenElement=this.fullParent[0],this.triggerEvent(document,this.browserSpecific.event),t(window).trigger("resize")},this)),document.exitFullscreen?this.browserSpecific.exitFullscreen="exitFullscreen":document.msExitFullscreen?this.browserSpecific.exitFullscreen="msExitFullscreen":document.mozCancelFullScreen?this.browserSpecific.exitFullscreen="mozCancelFullScreen":document.webkitExitFullscreen?this.browserSpecific.exitFullscreen="webkitExitFullscreen":(this.browserSpecific.exitFullscreen="nextendExitFullscreen",this.fullParent[0][this.browserSpecific.exitFullscreen]=t.proxy(function(){this.fullParent.css({position:"",left:"",top:"",width:"",height:"",backgroundColor:"",zIndex:""}),document.fullscreenElement=null,this.triggerEvent(document,this.browserSpecific.event);
},this)),document.addEventListener(this.browserSpecific.event,t.proxy(this.fullScreenChange,this))}return i.prototype.switchState=function(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this._fullScreen():this._normalScreen()},i.prototype.requestFullscreen=function(){return this.isFullScreen?!1:(this.isFullScreen=!0,this._fullScreen(),!0)},i.prototype.exitFullscreen=function(){return this.isFullScreen?(this.isFullScreen=!1,this._normalScreen(),!0):!1},i.prototype.triggerEvent=function(t,e){var i;document.createEvent?(i=document.createEvent("HTMLEvents"),i.initEvent(e,!0,!0)):document.createEventObject&&(i=document.createEventObject(),i.eventType=e),i.eventName=e,t.dispatchEvent?t.dispatchEvent(i):t.fireEvent&&htmlEvents["on"+e]?t.fireEvent("on"+i.eventType,i):t[e]?t[e]():t["on"+e]&&t["on"+e]()},i.prototype._fullScreen=function(){this.forceFullpage&&(this.responsive.isFullScreen=!0,this.responsive.parameters.type="fullpage",this.responsive.parameters.upscale=!0,this.responsive.parameters.forceFull=!1,this._marginLeft=this.responsive.containerElement[0].style.marginLeft,this.responsive.containerElement.css(n2const.rtl.marginLeft,0)),this.fullParent.css({width:"100%",height:"100%",backgroundColor:t("body").css("background-color")}).addClass("n2-ss-in-fullscreen"),this.fullParent.get(0)[this.browserSpecific.requestFullscreen]()},i.prototype._normalScreen=function(){document[this.browserSpecific.exitFullscreen]?document[this.browserSpecific.exitFullscreen]():this.fullParent[0][this.browserSpecific.exitFullscreen]&&this.fullParent[0][this.browserSpecific.exitFullscreen]()},i.prototype.fullScreenChange=function(){this.isDocumentInFullScreenMode()?(this.slider.sliderElement.triggerHandler("n2FullScreen"),t("html").addClass("n2-in-fullscreen"),this.isFullScreen=!0,t(window).trigger("resize")):this.forceFullpage&&(this.responsive.isFullScreen=!1,this.responsive.parameters.type=this._type,this.responsive.parameters.upscale=this._upscale,this.responsive.parameters.forceFull=this._forceFull,this.responsive.parameters.minimumHeightRatio=this._minimumHeightRatio,this.responsive.parameters.maximumHeightRatio=this._maximumHeightRatio,this.responsive.containerElement.css(n2const.rtl.marginLeft,this._marginLeft),this.fullParent.css({width:"",height:"",backgroundColor:""}).removeClass("n2-ss-in-fullscreen"),t("html").removeClass("n2-in-fullscreen"),t(window).trigger("resize"),this.isFullScreen=!1,this.slider.sliderElement.triggerHandler("n2ExitFullScreen"))},i.prototype.isDocumentInFullScreenMode=function(){return document.fullscreenElement&&null!==document.fullscreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement||document.mozFullScreen||document.webkitIsFullScreen},i}),N2D("SmartSliderControlKeyboard",function(t,e){"use strict";function i(){this.controls=[],document.addEventListener("keydown",this.onKeyDown.bind(this)),document.addEventListener("mousemove",this.onMouseMove.bind(this),{capture:!0})}function s(e,r,o){this.slider=e,this.parameters=t.extend({},o),"vertical"===r?this.parseEvent=s.prototype.parseEventVertical:this.parseEvent=s.prototype.parseEventHorizontal,n||(n=new i),n.addControl(this),this.slider.sliderElement.on("SliderKeyDown",this.onKeyDown.bind(this)),e.controls.keyboard=this}var n;return i.prototype.onMouseMove=function(t){this.mouseEvent=t},i.prototype.addControl=function(t){this.controls.push(t)},i.prototype.onKeyDown=function(t){if(t.target.tagName.match(/BODY|DIV|IMG/)&&!t.target.isContentEditable){var e;if(this.mouseEvent&&(e=this.findSlider(document.elementFromPoint(this.mouseEvent.clientX,this.mouseEvent.clientY))))return void e.trigger("SliderKeyDown",t);if(document.activeElement!==document.body&&(e=this.findSlider(document.activeElement)))return void e.trigger("SliderKeyDown",t);for(var i=0;i<this.controls.length;i++)this.controls[i].onKeyDown(!1,t)}},i.prototype.findSlider=function(e){var i,s=t(e);return i=s.hasClass("n2-ss-slider")?s:s.closest(".n2-ss-slider"),i.length?i:!1},s.prototype.isSliderOnScreen=function(){var e=this.slider.sliderElement.offset(),i=t(window).scrollTop(),s=this.slider.sliderElement.height();return e.top+.5*s>=i&&e.top-.5*s<=i+t(window).height()},s.prototype.onKeyDown=function(t,e){!e.defaultPrevented&&this.isSliderOnScreen()&&this.parseEvent.call(this,e)&&e.preventDefault()},s.prototype.parseEventHorizontal=function(t){switch(t.keyCode){case 39:return this.slider[n2const.isRTL()?"previous":"next"](),!0;case 37:return this.slider[n2const.isRTL()?"next":"previous"](),!0;default:return!1}},s.prototype.parseEventVertical=function(t){switch(t.keyCode){case 40:return this.slider.isChangeCarousel("next")&&this.slider.parameters.controls.blockCarouselInteraction?!1:(this.slider.next(),!0);case 38:return this.slider.isChangeCarousel("previous")&&this.slider.parameters.controls.blockCarouselInteraction?!1:(this.slider.previous(),!0);default:return!1}},s}),N2D("SmartSliderControlMouseWheel",function(t,e){"use strict";function i(e){this.preventScroll={local:!1,global:!1,localTimeout:!1,globalTimeout:!1},this.slider=e,document.addEventListener("wheel",t.proxy(this.onGlobalMouseWheel,this),{passive:!1}),e.controls.mouseWheel=this}return i.prototype.hasScrollableParentRecursive=function(e,i){if(i===this.slider.sliderElement[0])return!1;if(i.scrollHeight>i.clientHeight){var s=t(i).css("overflow");if("hidden"!==s&&"visible"!==s)if(e){if(i.scrollTop>0)return!0}else if(i.scrollTop+i.clientHeight<i.scrollHeight)return!0}return this.hasScrollableParentRecursive(e,i.parentNode)},i.prototype.onGlobalMouseWheel=function(e){this.preventScroll.local?e.preventDefault():(this.preventScroll.global&&e.preventDefault(),(this.slider.sliderElement[0]===e.target||t.contains(this.slider.sliderElement[0],e.target))&&(e.shiftKey||this.hasScrollableParentRecursive(e.deltaY<0,e.target)||this.onMouseWheel(e)))},i.prototype.onMouseWheel=function(t){var e=t.deltaY<0;e?this.slider.isChangeCarousel("previous")&&this.slider.parameters.controls.blockCarouselInteraction||(this.slider.previous(),t.preventDefault(),this.local1(),this.global()):this.slider.isChangeCarousel("next")&&this.slider.parameters.controls.blockCarouselInteraction||(this.slider.next(),t.preventDefault(),this.local1(),this.global())},i.prototype.local1=function(){this.preventScroll.local!==!1&&clearTimeout(this.preventScroll.localTimeout),this.preventScroll.local=!0,this.preventScroll.localTimeout=setTimeout(t.proxy(function(){this.preventScroll.local=!1},this),1e3)},i.prototype.global=function(){this.preventScroll.global!==!1&&clearTimeout(this.preventScroll.globalTimeout),this.preventScroll.global=!0,this.preventScroll.globalTimeout=setTimeout(t.proxy(function(){this.preventScroll.global=!1},this),2e3)},i}),N2D("SmartSliderControlTouch",function(t,e){"use strict";function i(e){if(this.slider=e,this.minDistance=10,this.interactiveDrag=!0,this.preventMultipleTap=!1,this._animation=e.mainAnimation,this.swipeElement=this.slider.sliderElement.find("> .n2-ss-swipe-element"),this.$window=t(window),navigator.userAgent.toLowerCase().indexOf("android")>-1){var i=this.swipeElement.parent();"1"!==i.css("opacity")?this.swipeElement.parent().one("transitionend",t.proxy(this.initTouch,this)):this.initTouch()}else this.initTouch();this.slider.sliderElement.on("sliderChangeCurrentSlide",t.proxy(this.updatePanDirections,this)),this.swipeElement.addClass("n2-grab"),e.controls.touch=this}return i.prototype.initTouch=function(){this._animation.isNoAnimation&&(this.interactiveDrag=!1),this.eventBurrito=N2Classes.EventBurrito(this.swipeElement.get(0),{mouse:!0,axis:"horizontal"===this.axis?"x":"y",start:t.proxy(this._start,this),move:t.proxy(this._move,this),end:t.proxy(this._end,this)}),this.updatePanDirections(),this.cancelKineticScroll=t.proxy(function(){this.kineticScrollCancelled=!0},this)},i.prototype._start=function(e){this.currentInteraction={type:"pointerdown"===e.type?"pointer":"touchstart"===e.type?"touch":"mouse",state:t.extend({},this.state),action:"unknown",distance:[],distanceY:[],percent:0,progress:0,scrollTop:this.$window.scrollTop(),animationStartDirection:"unknown",hadDirection:!1},this.logDistance(0,0)},i.prototype._move=function(t,e,i,s){if(!s||"unknown"!==this.currentInteraction.action){this.currentInteraction.direction=this.measure(i);var n=this.get(i);if((this.currentInteraction.hadDirection||Math.abs(n)>this.minDistance||Math.abs(i.y)>this.minDistance)&&(this.logDistance(n,i.y),this.currentInteraction.percent<1&&this.setTouchProgress(n,i.y),"touch"===this.currentInteraction.type&&t.cancelable&&("switch"===this.currentInteraction.action||"hold"===this.currentInteraction.action)))return this.currentInteraction.hadDirection=!0,!0}return!1},i.prototype._end=function(t,e,i,s){if("switch"===this.currentInteraction.action){var n=s?0:this.measureRealDirection();if(this.interactiveDrag){var r=this._animation.timeline.progress();1>r&&this._animation.setTouchEnd(n,this.currentInteraction.progress,i.time),this._animation.setTouch(!1)}else n&&this.callAction(this.currentInteraction.animationStartDirection);this.swipeElement.removeClass("n2-grabbing")}this.onEnd(),delete this.currentInteraction,Math.abs(i.x)<10&&Math.abs(i.y)<10?this.onTap(t):nextend.preventClick()},i.prototype.onEnd=function(){if("scroll"===this.currentInteraction.action&&"pointer"===this.currentInteraction.type){var e=this.currentInteraction.distanceY[0],i=this.currentInteraction.distanceY[this.currentInteraction.distanceY.length-1],s=(e.d-i.d)/(i.t-e.t)*10,n=Date.now(),r=t.proxy(function(){requestAnimationFrame(t.proxy(function(){var t,e;return!this.kineticScrollCancelled&&s&&(t=Date.now()-n,e=s*Math.exp(-t/325),e>1||-1>e)?(this.$window.scrollTop(this.$window.scrollTop()+e),void r()):(delete this.kineticScrollCancelled,void document.removeEventListener("pointerdown",this.cancelKineticScroll))},this))},this);this.kineticScrollCancelled=!1,r(),document.addEventListener("pointerdown",this.cancelKineticScroll)}},i.prototype.setTouchProgress=function(t,e){this.recognizeSwitchInteraction();var i,s=this.getPercent(t);if(this.currentInteraction.percent=s,"switch"===this.currentInteraction.action){if(this.interactiveDrag){switch(this.currentInteraction.animationStartDirection){case"up":i=-1*s;break;case"down":i=s;break;case"left":i=-1*s;break;case"right":i=s}this.currentInteraction.progress=i,this._animation.setTouchProgress(i)}}else"unknown"!==this.currentInteraction.action&&"scroll"!==this.currentInteraction.action||this.startScrollInteraction(e)},i.prototype.startScrollInteraction=function(t){("vertical"===this.axis||n2const.isEdge)&&(this.slider.controlFullscreen.isFullScreen||(this.currentInteraction.action="scroll","pointer"===this.currentInteraction.type&&this.$window.scrollTop(Math.max(0,this.currentInteraction.scrollTop-t))))},i.prototype.recognizeSwitchInteraction=function(){if("unknown"===this.currentInteraction.action)if("ended"===this._animation.state){var t=this.currentInteraction.direction;if("unknown"!==t&&this.currentInteraction.state[t]){if(this.currentInteraction.animationStartDirection=t,this.interactiveDrag){this._animation.setTouch(this.axis);this.callAction(t,!1)}this.currentInteraction.action="switch",this.swipeElement.addClass("n2-grabbing")}}else"playing"===this._animation.state&&(this.currentInteraction.action="hold")},i.prototype.logDistance=function(t,e){this.currentInteraction.distance.length>3&&(this.currentInteraction.distance.shift(),this.currentInteraction.distanceY.shift()),this.currentInteraction.distance.push({d:t,t:Date.now()}),this.currentInteraction.distanceY.push({d:e,t:Date.now()})},i.prototype.measureRealDirection=function(){var t=this.currentInteraction.distance[0],e=this.currentInteraction.distance[this.currentInteraction.distance.length-1];return e.d>=0&&t.d>e.d||e.d<0&&t.d<e.d?0:1},i.prototype.onTap=function(e){this.preventMultipleTap||(t(e.target).trigger("n2click"),this.preventMultipleTap=!0,setTimeout(t.proxy(function(){this.preventMultipleTap=!1},this),500))},i.prototype.updatePanDirections=function(){},i.prototype.setState=function(t,e){"object"!=typeof arguments[0]&&(t={},t[arguments[0]]=arguments[1],e=arguments[2]);var i=!1;for(var s in t)this.state[s]!==t[s]&&(this.state[s]=t[s],i=!0);i&&e&&this.eventBurrito.supportsPointerEvents&&this.syncTouchAction()},i}),N2D("SmartSliderControlTouchHorizontal","SmartSliderControlTouch",function(t,e){"use strict";function i(){this.state={left:!1,right:!1},this.axis="horizontal",N2Classes.SmartSliderControlTouch.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(N2Classes.SmartSliderControlTouch.prototype),i.prototype.constructor=i,i.prototype.callAction=function(t,e){switch(t){case"left":return this.slider[n2const.isRTL()?"previous":"next"].call(this.slider,e);case"right":return this.slider[n2const.isRTL()?"next":"previous"].call(this.slider,e)}return!1},i.prototype.measure=function(t){return!this.currentInteraction.hadDirection&&Math.abs(t.x)<10||0===t.x||Math.abs(t.x)<Math.abs(t.y)?"unknown":t.x<0?"left":"right"},i.prototype.get=function(t){return t.x},i.prototype.getPercent=function(t){return Math.max(-.99999,Math.min(.99999,t/this.slider.dimensions.slider.width))},i.prototype.updatePanDirections=function(){var t=this.slider.currentSlide.index,e=t+1<this.slider.slides.length,i=t-1>=0;this.slider.parameters.carousel&&(e=!0,i=!0),n2const.isRTL()&&"vertical"!==this.slider.getAnimationAxis()?this.setState({right:e,left:i},!0):this.setState({right:i,left:e},!0)},i.prototype.syncTouchAction=function(){var t={"pan-y":!1,none:!1};n2const.isEdge?t.none=!0:(this.state.left&&(t["pan-y"]=!0),this.state.right&&(t["pan-y"]=!0));var e=[];for(var i in t)t[i]&&e.push(i);this.swipeElement.css("touch-action",e.join(" ")),window.PointerEventsPolyfill&&this.swipeElement.attr("touch-action",e.join(" "))},i}),N2D("SmartSliderControlTouchVertical","SmartSliderControlTouch",function(t,e){"use strict";function i(){this.state={up:!1,down:!1},this.action={up:"next",down:"previous"},this.axis="vertical",N2Classes.SmartSliderControlTouch.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(N2Classes.SmartSliderControlTouch.prototype),i.prototype.constructor=i,i.prototype.callAction=function(t,e){switch(t){case"up":return this.slider.next.call(this.slider,e);case"down":return this.slider.previous.call(this.slider,e)}return!1},i.prototype.measure=function(t){return!this.currentInteraction.hadDirection&&Math.abs(t.y)<1||0==t.y||Math.abs(t.y)<Math.abs(t.x)?"unknown":t.y<0?"up":"down"},i.prototype.get=function(t){return t.y},i.prototype.getPercent=function(t){return Math.max(-.99999,Math.min(.99999,t/this.slider.dimensions.slider.height))},i.prototype.updatePanDirections=function(){this.setState({down:!this.slider.isChangeCarousel("previous")||!this.slider.parameters.controls.blockCarouselInteraction,up:!this.slider.isChangeCarousel("next")||!this.slider.parameters.controls.blockCarouselInteraction},!0)},i.prototype.syncTouchAction=function(){var t={"pan-x":!1,none:!1};n2const.isEdge?t.none=!0:(this.state.up&&(t["pan-x"]=!0),this.state.down&&(t["pan-x"]=!0));var e=[];for(var i in t)t[i]&&e.push(i);this.swipeElement.css("touch-action",e.join(" ")),window.PointerEventsPolyfill&&this.swipeElement.attr("touch-action",e.join(" "))},i.prototype._start=function(t){this.slider.blockCarousel=!0,N2Classes.SmartSliderControlTouch.prototype._start.apply(this,arguments)},i.prototype.onEnd=function(t){N2Classes.SmartSliderControlTouch.prototype.onEnd.apply(this,arguments),this.slider.blockCarousel=!1},i}),N2D("SmartSliderSlideBackgroundColor",function(t,e){function i(t,e){this.$el=e}return i.prototype.getLoadedDeferred=function(){return!0},i}),N2D("SmartSliderSlideBackgroundImage",function(t,e){function i(e,i,s,n){if(this.loadStarted=!1,this.loadAllowed=!1,this.slide=e,this.manager=i,this.background=s,this.deferred=t.Deferred(),this.$background=n,this.blur=n.data("blur"),"blurfit"===s.mode&&(window.n2FilterProperty?(this.$background=this.$background.add(this.$background.clone().insertAfter(this.$background)),this.$background.first().css({margin:"-14px",padding:"14px"}).css(window.n2FilterProperty,"blur(7px)")):(s.element.attr("data-mode","fill"),s.mode="fill")),window.n2FilterProperty&&(this.blur>0?this.$background.last().css({margin:"-"+2*this.blur+"px",padding:2*this.blur+"px"}).css(window.n2FilterProperty,"blur("+this.blur+"px)"):this.$background.last().css({margin:"",padding:""}).css(window.n2FilterProperty,"")),n2const.isWaybackMachine())this.mobileSrc=this.tabletSrc=this.desktopSrc=n.data("desktop");else if(this.desktopSrc=n.data("desktop")||"",this.tabletSrc=n.data("tablet")||"",this.mobileSrc=n.data("mobile")||"",n2const.isRetina){var r=n.data("desktop-retina");r&&(this.desktopSrc=r),r=n.data("tablet-retina"),r&&(this.tabletSrc=r),r=n.data("mobile-retina"),r&&(this.mobileSrc=r)}}return i.prototype.getLoadedDeferred=function(){return this.deferred},i.prototype.preLoad=function(){this.loadAllowed=!0,this.manager.deviceDeferred.done(t.proxy(function(){this.updateBackgroundToDevice(this.manager.device),this.waitForImage()},this))},i.prototype.waitForImage=function(){this.$background.n2imagesLoaded({background:!0},t.proxy(function(e){if(e.images.length>0){var i=e.images[0].img;switch(this.width=i.naturalWidth,this.height=i.naturalHeight,this.background.mode){case"tile":case"center":n2const.devicePixelRatio>1&&this.$background.css("background-size",this.width/n2const.devicePixelRatio+"px "+this.height/n2const.devicePixelRatio+"px")}this.deferred.resolve()}else setTimeout(t.proxy(this.waitForImage,this),100)},this))},i.prototype.updateBackgroundToDevice=function(t){var e=this.desktopSrc;"mobile"===t.device?this.mobileSrc?e=this.mobileSrc:this.tabletSrc&&(e=this.tabletSrc):"tablet"===t.device&&this.tabletSrc&&(e=this.tabletSrc),e?this.setSrc(e):this.setSrc("")},i.prototype.setSrc=function(t){this.loadAllowed&&t!==this.currentSrc&&(""===t?this.$background.css("background-image",""):this.$background.css("background-image",'url("'+t+'")'),this.currentSrc=t)},i.prototype.fadeOut=function(){NextendTween.to(this.$background,.3,{opacity:0})},i}),N2D("SmartSliderSlideBackgroundVideo",function(t,e){function i(e,i,n){!e.slider.parameters["background.video.mobile"]&&n2const.isPhone?n.remove():n2const.isVideoAutoplayAllowed()?(this.counter=s++,this.slide=e,this.slider=e.slider,this.background=i,this.isResized=!1,this.$video=n,this.isReady=!1,this.state={ready:!1,scroll:!1,slide:!1,ended:!1},this.promise=!1,i.elements.image?this.slider.visible(t.proxy(this.load,this)):this.load()):n.remove()}var s=1;return i.prototype.load=function(){if(this.$video[0].videoWidth>0)this.onReady();else{this.$video[0].addEventListener("error",t.proxy(this.onError,this),!0),this.$video[0].addEventListener("canplay",t.proxy(this.onReady,this)),this.$video[0].addEventListener("loadedmetadata",t.proxy(this.onReady,this),!1),this.$video[0].loop||this.$video[0].addEventListener("ended",t.proxy(this.onEnded,this),!1);var i=t.proxy(function(){setTimeout(t.proxy(function(){0===this.$video[0].networkState&&this.onError()},this),100)},this);this.$video[0].n2LoadStarted===e?this.$video[0].addEventListener("loadstart",i,!0):i(),this.$video[0].load(),this.safePlay()}},i.prototype.getLoadedDeferred=function(){return!0},i.prototype.onReady=function(e){if(!this.isReady){this.isReady=!0;var i=this.$video;this.safePause(),i.data("ratio")||(i[0].videoWidth>0?i.data("ratio",i[0].videoWidth/i[0].videoHeight):i.data("ratio",i[0].offsetWidth/i[0].offsetHeight),i.addClass("n2-active"),this.slider.sliderElement.one("BeforeVisible",t.proxy(this.onResize,this)),this.slider.ready(t.proxy(function(){this.slider.sliderElement.on("SliderResize",t.proxy(this.onResize,this)),this.isResized||this.onResize(),this.setState("ready",!0,!0)},this))),-1!==t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.starterSlide))&&this.setState("slide",!0,!0),this.slider.sliderElement.on({mainAnimationStart:t.proxy(function(e,i,s,n){-1===t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[n]))?this.setState("slide",!1,!0):this.setState("slide",!0,!0)},this),mainAnimationComplete:t.proxy(function(e,i,s,n){-1===t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[n]))?this.setState("slide",!1,!0):this.setState("slide",!0,!0)},this)}),i.data("reset-slide-change")&&this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(e,i,s,n,r){this.$video[0].currentTime>0&&-1===t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[n]))&&(this.$video[0].currentTime=0,this.setState("ended",!1,!0))},this)),N2Classes.ScrollTracker.add(this.slide.$element,"not-visible",t.proxy(function(){this.setState("scroll",!0,!0)},this),t.proxy(function(){this.setState("scroll",!1,!0)},this))}e&&"canplay"!==e.type||this.background.fadeOut()},i.prototype.onError=function(){this.$video.remove()},i.prototype.onResize=function(){if(!this.isResized){var e=this.$video.data("background");e&&""!==e&&t('<div class="n2-ss-slide-bg-video-color-overlay" style="position:absolute;left:0;top:0;width:100%;height:100%;z-index:3;'+e+';"/>').insertAfter(this.$video),this.isResized=!0}this.resizeVideo()},i.prototype.resizeVideo=function(){var t=this.$video,e=t.data("mode"),i=t.data("ratio"),s=this.slider.dimensions.slideouter||this.slider.dimensions.slide,n=s.width/s.height;"fill"===e?n>i?t.css({width:"100%",height:"auto"}):t.css({width:"auto",height:"100%"}):"fit"===e?i>n?t.css({width:"100%",height:"auto"}):t.css({width:"auto",height:"100%"}):t.css({width:"",height:""}),t.css({marginTop:0,marginLeft:0}),this.center()},i.prototype.center=function(){var t=this.$video,e=t.parent();t.css({marginTop:Math.round((e.height()-t.height())/2),marginLeft:Math.round((e.width()-t.width())/2)})},i.prototype.safeCallback=function(t){this.promise&&Promise!==e?this.promise.then(t)["catch"](t):t()},i.prototype.safePlay=function(){this.safeCallback(t.proxy(function(){this.promise=this.$video[0].play(),this.promise&&Promise!==e&&this.promise["catch"](t.proxy(function(e){if("NotAllowedError"===e.name){var i=".ssBackgroundVideo"+this.counter;t("body").off(i).one("click"+i+" touchend"+i,t.proxy(function(){t("body").off(i),this.promise!==!1&&this.safePlay()},this))}},this))},this))},i.prototype.safePause=function(){this.safeCallback(t.proxy(function(){this.$video[0].pause(),this.promise=!1},this))},i.prototype.onEnded=function(){this.setState("ended",!0,!0)},i.prototype.setState=function(t,e,i){i=i||!1,this.state[t]=e,i&&(this.state.ready&&!this.state.ended&&this.state.slide&&this.state.scroll?(this.safePlay(),this.$video.triggerHandler("n2playvideo")):this.safePause())},i}),N2D("SmartSliderSlideBackground",function(t,e){function i(e,i,s){if(this.loadStarted=!1,this.types=this.types||{color:"SmartSliderSlideBackgroundColor",image:"SmartSliderSlideBackgroundImage",video:"SmartSliderSlideBackgroundVideo"},this.width=0,this.height=0,this.slide=e,this.element=i,e.slider.needBackgroundWrap){var n=i.find("> *");this.$wrapElement=t('<div class="n2-ss-slide-background-wrap n2-ow" />').appendTo(i).append(n)}else this.$wrapElement=this.element;this.manager=s,this.loadDeferred=t.Deferred(),this.elements={color:!1,image:!1,video:!1},this.currentSrc="",this.mode=i.data("mode"),this.opacity=i.data("opacity");var r=this.element.find(".n2-ss-slide-background-image");r.length&&(this.elements.image=new N2Classes[this.types.image](e,s,this,r));var o=this.element.find(".n2-ss-slide-background-color");o.length&&(this.elements.color=new N2Classes[this.types.color](this,o));var a=this.element.find(".n2-ss-slide-background-video");a.length&&(this.elements.video=new N2Classes[this.types.video](this.slide,this,a));var l=this.slide.slider.parameters.backgroundParallax;l.strength>0&&!(n2const.isPhone&&!l.mobile||n2const.isTablet&&!l.tablet)&&(n2const.isEdge||n2const.isIE||this.hasBackground()&&(this.slide.slider.sliderElement.one("BeforeVisible",t.proxy(function(){this.startFixed(l)},this)),this.manager.hasFixed=!0));var h=[];for(var d in this.elements)this.elements[d]&&h.push(this.elements[d].getLoadedDeferred());t.when.apply(t,h).then(t.proxy(function(){this.loadDeferred.resolve()},this))}return i.prototype.preLoad=function(){return this.loadStarted||(this.slide.$element.find("[data-lazysrc]").each(function(){var e=t(this);e.attr("src",e.data("lazysrc"))}),this.loadStarted=!0),"pending"===this.loadDeferred.state()&&this.elements.image&&this.elements.image.preLoad(),this.loadDeferred},i.prototype.fadeOut=function(){this.elements.image&&this.elements.image.fadeOut()},i.prototype.hack=function(){NextendTween.set(this.element,{rotation:1e-4})},i.prototype.hasColor=function(){return this.elements.color},i.prototype.hasImage=function(){return this.elements.image},i.prototype.hasVideo=function(){return this.elements.video},i.prototype.hasBackground=function(){return this.elements.color||this.elements.image||this.elements.video},i.prototype.updateBackgroundToDevice=function(t){this.hasImage()&&this.elements.image.updateBackgroundToDevice(t)},i.prototype.startFixed=function(e){this.slide.slider.startedDeferred.done(t.proxy(function(){N2Classes.FixedBackground.addElement(this.$wrapElement,e)},this))},i}),N2D("FrontendComponent",function($,undefined){function FrontendComponent(t,e,i,s){this.wraps={},this.isVisible=!0,this.device="",this.children=[],this.slide=t,this.parent=e,this.$layer=i.data("layer",this),this.skipSelfAnimation=!1,this.stateCBs=[],this.state={InComplete:!1};var n=this.$layer.find("> .n2-ss-layer-mask");n.length&&(this.wraps.mask=n);var r=this.$layer.find("> .n2-ss-layer-parallax");switch(r.length&&(this.wraps.parallax=r),i.data("pm")){case"absolute":this.placement=new N2Classes.FrontendPlacementAbsolute(this);break;case"normal":this.placement=new N2Classes.FrontendPlacementNormal(this);break;case"content":this.placement=new N2Classes.FrontendPlacementContent(this);break;default:this.placement=new N2Classes.FrontendPlacementDefault(this)}if(this.animations=i.data("animv2"),this.parallax=i.data("parallax"),this.baseSize=this.baseSize||100,this.isAdaptiveFont=this.get("adaptivefont"),this.refreshBaseSize(this.getDevice("fontsize")),s)for(var o=0;o<s.length;o++)switch(s.eq(o).data("sstype")){case"content":this.children.push(new N2Classes.FrontendComponentContent(this.slide,this,s.eq(o)));break;case"row":this.children.push(new N2Classes.FrontendComponentRow(this.slide,this,s.eq(o)));break;case"col":this.children.push(new N2Classes.FrontendComponentCol(this.slide,this,s.eq(o)));break;case"group":this.children.push(new N2Classes.FrontendComponentGroup(this.slide,this,s.eq(o)));break;default:this.children.push(new N2Classes.FrontendComponentLayer(this.slide,this,s.eq(o)))}this.slide.slider.isAdmin||this.initEvents()}return FrontendComponent.prototype.setState=function(t,e){this.state[t]=e;for(var i=0;i<this.stateCBs.length;i++)this.stateCBs[i].call(this,this.state)},FrontendComponent.prototype.addStateCallback=function(t){this.stateCBs.push(t),t.call(this,this.state)},FrontendComponent.prototype.refreshBaseSize=function(t){this.isAdaptiveFont?this.baseSize=16*t/100:this.baseSize=this.parent.baseSize*t/100},FrontendComponent.prototype.start=function(){this.placement.start();for(var t=0;t<this.children.length;t++)this.children[t].start();var e=this.get("rotation")||0;if(e/360!=0){var i=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(i[0],{rotationZ:e})}},FrontendComponent.prototype.onDeviceChange=function(t){this.device=t;var e=this.isVisible;if(this.isVisible=this.getDevice(""),this.isVisible===undefined&&(this.isVisible=1),e&&!this.isVisible?(this.$layer.data("shows",0),this.$layer.css("display","none"),this.$layer.triggerHandler("visibilityChange",[0])):!e&&this.isVisible&&(this.$layer.data("shows",1),this.$layer.css("display",""),this.$layer.triggerHandler("visibilityChange",[1])),this.isVisible){var i=this.getDevice("fontsize");this.refreshBaseSize(i),this.isAdaptiveFont?this.$layer.css("font-size",N2Classes.FontSize.toRem(16*i/100)):this.$layer.css("font-size",i+"%");for(var s=0;s<this.children.length;s++)this.children[s].onDeviceChange(t);this.placement.onDeviceChange(t),this.onAfterDeviceChange(t)}},FrontendComponent.prototype.onAfterDeviceChange=function(t){},FrontendComponent.prototype.onResize=function(t,e,i){if(this.isVisible||this.placement.alwaysResize){if(this.isAdaptiveFont){var s=this.getDevice("fontsize");this.$layer.css("font-size",N2Classes.FontSize.toRem(16*s/100))}for(var n=0;n<this.children.length;n++)this.children[n].onResize(t,e,i);this.placement.onResize(t,e,i)}},FrontendComponent.prototype.getDevice=function(t,e){var i=this.$layer.data(this.device+t);return i!=undefined?i:"desktopportrait"!=this.device?this.$layer.data("desktopportrait"+t):e!==undefined?e:0},FrontendComponent.prototype.get=function(t){return this.$layer.data(t)},FrontendComponent.prototype.hasLayerAnimation=function(){return this.animationManager!==undefined},FrontendComponent.prototype.initEvents=function(){this.initEvent("click","click"),this.initEvent("mouseenter","mouseenter"),this.initEvent("mouseleave","mouseleave"),this.initEvent("play","n2play"),this.initEvent("pause","n2pause"),this.initEvent("stop","n2stop")},FrontendComponent.prototype.initEvent=function(name,event){var value=this.$layer.data(name);if(value){var $el=this.$layer,selector=$el.data("animatableselector");selector&&($el=$el.find(selector)),$el.on(event,$.proxy(function(value,e){eval(value)},this,value)),"click"===event&&$el.css("cursor","pointer")}},FrontendComponent.prototype.createLayerAnimations=function(t,e){var i=[];if(!n2const.isBot){if(!this.skipSelfAnimation){var s=new N2Classes.FrontendLayerAnimationManager(this,this.$layer,this.slide.getPerspective());s.setEventBased(this.slide,t,e),s.hasAnimation()?(this.animationManager=s,i.push(s)):this.setState("InComplete",!0)}for(var n=0;n<this.children.length;n++)i.push.apply(i,this.children[n].createLayerAnimations(t,e))}return i},FrontendComponent.prototype.getParallaxNodes=function(){var t=[];if(this.isVisible){this.parallax&&t.push(this.$layer[0]);for(var e=0;e<this.children.length;e++)t.push.apply(t,this.children[e].getParallaxNodes())}return t},FrontendComponent.prototype.addWrap=function(t,e){if(this.wraps[t]===undefined){var i=$(e);switch(t){case"rotation":this.wraps.mask!==undefined?i.appendTo(this.wraps.mask):this.wraps.parallax!==undefined?i.appendTo(this.wraps.parallax):i.appendTo(this.$layer),i.append(this.getContents())}this.wraps[t]=i}return i},FrontendComponent.prototype.getContents=function(){return!1},FrontendComponent}),N2D("FixedBackground",function(t,e){var i=function(){if(!navigator.userAgent.match(/iphone|ipod|ipad|android/i))return(i=function(){return window.innerHeight})();var t=Math.abs(window.orientation),e={w:0,h:0},s=function(){var i=document.createElement("div");i.style.position="fixed",i.style.height="100vh",i.style.width=0,i.style.top=0,document.documentElement.appendChild(i),e.w=90===t?i.offsetHeight:window.innerWidth,e.h=90===t?window.innerWidth:i.offsetHeight,document.documentElement.removeChild(i),i=null};return s(),(i=function(){return 90!==Math.abs(window.orientation)?e.h:e.w})()},s={_windowHeight:0,$window:null,isStarted:!1,elements:[],start:function(){return this.isStarted?!1:(this.$window=t(window),navigator.userAgent.match(/iphone|ipod|ipad/i)&&(this.setY=this.setYRAF),this.resize(),this.$window.on({"load.n2-ss-bg-parallax":t.proxy(this.resize,this),"resize.n2-ss-bg-parallax":t.proxy(this.resize,this),"orientationchange.n2-ss-bg-parallax":t.proxy(this.resize,this)}),this.onScroll=t.proxy(this.render,this),document.addEventListener("scroll",this.onScroll,{passive:!0}),this.$extraScrollables=t(".n2-scrollable"),this.$extraScrollables.length&&this.$extraScrollables.on("scroll.FixedBackground",t.proxy(this.onScroll,this)),this.isStarted=!0,!0)},end:function(){this.isStarted&&(this.$window.off(".n2-ss-bg-parallax"),document.removeEventListener("scroll",this.onScroll,{
passive:!0}),this.$extraScrollables.length&&this.$extraScrollables.off(".FixedBackground"),this.isStarted=!1)},addElement:function(t,e){var i={$animated:t,$parent:t.parent(),data:e,y:0};this.elements.push(i),NextendTween.set(t,{backfaceVisibility:"hidden",force3D:"true","will-change":"transform"}),this.start()||this.renderElement(i)},removeElement:function(t){for(var e=0;e<this.elements.length;e++)if(this.elements[e].$animated===t){this.elements.splice(e,1);break}0===this.elements.length&&this.end()},resize:function(){this.windowHeight=i(),this.render()},render:function(){for(var t=0;t<this.elements.length;t++)this.renderElement(this.elements[t])},renderElement:function(t){var e=t.$parent[0].getBoundingClientRect(),i=0;if(e.top<0||e.height>this.windowHeight?i=e.top/e.height:e.bottom>this.windowHeight&&(i=(e.bottom-this.windowHeight)/e.height),1>=i&&i>=-1){var s=Math.round(i*(-t.data.strength*e.height))||0;t.y!==s&&(this.setY(t.$animated,s),t.y=s)}},setY:function(t,e){var i=0;NextendTween.to(t,i,{y:e+"px"})},setYRAF:function(t,e){window.requestAnimationFrame(function(){t.css("transform","translate3D(0,"+e+"px,0)")})}};return s}),N2D("LayerParallax",function(t,e){function i(e,i){this.ticking=!1,this.active=!1,this.mouseOrigin=!1,this.parallaxedNodes=null,this.parallaxedStaticSlideNodes=[],this.parallaxedSlideNodes=null,this._scrollCallback=!1,this.firstStart=!0,this.parameters=t.extend({mode:"scroll",origin:"slider",is3D:!1,animate:!0,scrollmove:"both"},i),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&(this.parameters.is3D=!1,e.sliderElement.find(".n2-ss-layers-container").css({perspective:"none"})),this.x=this.y=0,this.levels={1:.01,2:.02,3:.05,4:.1,5:.2,6:.3,7:.4,8:.5,9:.6,10:.7},this.parameters.is3D&&(this.rotationX=this.rotationY=0,this.levelsDeg={1:2,2:6,3:10,4:15,5:20,6:25,7:30,8:35,9:40,10:45}),this.parameters.animate&&(this.render=this.animateRender),this.window=t(window),this.slider=e,this.sliderElement=e.sliderElement}var s=function(t){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return function(t,i){return e.call(t,i)}}(Element.prototype);return i.prototype.resize=function(){this.refreshSliderDimension()},i.prototype.refreshSliderDimension=function(){var t=this.sliderElement[0].getBoundingClientRect();this.dimensions={w2:t.width/2,h2:t.height/2,x:(t.x||t.left)+t.width/2,y:(t.y||t.top)+t.height/2}},i.prototype.enable=function(){this.active=!0,this.resize(),this.sliderElement.on({"SliderResize.n2-ss-parallax":t.proxy(this.resize,this)});var e=-1,i=-1;switch(this.mouseX=!1,this.mouseY=!1,this.scrollY=!1,this.parameters.horizontal){case"mouse":this.mouseX=!0;break;case"mouse-invert":this.mouseX=!0,e=1}switch(this.parameters.vertical){case"mouse":this.mouseY=!0;break;case"mouse-invert":this.mouseY=!0,i=1;break;case"scroll":this.scrollY=!0,i=1;break;case"scroll-invert":this.scrollY=!0,i=-1}if((this.mouseX||this.mouseY)&&(this.sliderElement.on({"mouseenter.n2-ss-parallax":t.proxy(this.mouseEnter,this),"mousemove.n2-ss-parallax":t.proxy(this.mouseMove,this,e,i),"mouseleave.n2-ss-parallax":t.proxy(this.mouseLeave,this,!1)}),s(this.sliderElement[0],":hover")&&this.mouseEnter(!1)),this.scrollY){var n=-1,r=1;switch(this.parameters.scrollmove){case"bottom":i>0?r=0:n=0;break;case"top":i>0?n=0:r=0}this._scrollCallback=t.proxy(this.scroll,this,i,n,r),window.addEventListener("scroll",this._scrollCallback,{capture:!0,passive:!0}),this.window.on({"resize.n2-ss-parallax":this._scrollCallback})}},i.prototype.disable=function(){this.sliderElement.off(".n2-ss-parallax"),this._scrollCallback&&(window.removeEventListener("scroll",this._scrollCallback,{capture:!0,passive:!0}),this.window.off("resize.n2-ss-parallax",this._scrollCallback)),this.active=!1},i.prototype.start=function(e){if(null!==this.parallaxedSlideNodes&&this.end(),this.firstStart&&(this.slider.staticSlide&&(this.parallaxedStaticSlideNodes=this.slider.staticSlide.getParallaxNodes()),this.firstStart=!1),this.parallaxedSlideNodes=e.getParallaxNodes(),this.parallaxedNodes=t.merge(t.merge([],this.parallaxedSlideNodes),this.parallaxedStaticSlideNodes),this.parallaxedNodes.length){if(this.parameters.is3D){var i=this.slider.getPerspective();t.each(this.parallaxedNodes,t.proxy(function(t,e){i>0&&(n2const.isEdge?NextendTween.set(e.parentElement,{transformPerspective:i}):NextendTween.set(e.parentElement,{perspective:i}))},this))}this.active||this.enable(),this._scrollCallback&&this._scrollCallback()}else this.parallaxedNodes=null,this.parallaxedSlideNodes=null,this.active&&this.disable()},i.prototype.end=function(){switch(this.parameters.mode){case"mouse-scroll":this.mouseLeave(null,!0);break;case"scroll":break;default:this.mouseLeave(null,!0)}this.parallaxedNodes=null},i.prototype.mouseEnter=function(t){this.ticking||(NextendTween.ticker.addEventListener("tick",this.tick,this),this.ticking=!0),this.refreshSliderDimension(),t&&"enter"===this.parameters.origin?this.mouseOrigin={x:t.clientX,y:t.clientY}:this.mouseOrigin=this.dimensions},i.prototype.mouseMove=function(t,e,i){this.mouseOrigin!==!1&&(this.mouseX&&(this.x=t*(i.clientX-this.mouseOrigin.x),this.parameters.is3D&&(this.rotationY=-this.x/this.dimensions.w2)),this.mouseY&&(this.y=e*(i.clientY-this.mouseOrigin.y),this.parameters.is3D&&(this.rotationX=this.y/this.dimensions.h2)))},i.prototype.mouseLeave=function(t,e){this.ticking&&(NextendTween.ticker.removeEventListener("tick",this.tick,this),this.ticking=!1);var i={};this.mouseX&&(i.x=0),this.mouseY&&(i.y=0),this.parameters.is3D&&(i.rotationX=i.rotationY=0),NextendTween.to(e?this.parallaxedSlideNodes:this.parallaxedNodes,2,i)},i.prototype.getScrollTopRecursive=function(t,i){return null===t||t.scrollTop===e?i:(i+=t.scrollTop,this.getScrollTopRecursive(t.parentNode,i))},i.prototype.scroll=function(t,e,i){this.refreshSliderDimension();var s=this.window.height(),n=this.getScrollTopRecursive(this.sliderElement[0],0);0<this.dimensions.y+this.dimensions.h2&&s>this.dimensions.y-this.dimensions.h2&&(this.y=Math.max(e,Math.min(i,-1+2*(this.dimensions.y+this.dimensions.h2)/(s+2*this.dimensions.h2))),this.dimensions.y+n<s&&(this.y=Math.min(0,this.y)),this.y*=-t*this.dimensions.h2*4,this.parameters.is3D&&(this.rotationX=this.y/this.dimensions.h2),this.draw(!1,!0))},i.prototype.draw=function(e,i){if(this.parallaxedNodes)for(var s=0;s<this.parallaxedNodes.length;s++){var n=t(this.parallaxedNodes[s]).data("parallax"),r=this.levels[n],o={};if(this.parameters.is3D){var a=this.levelsDeg[n];o.rotationX=this.rotationX*a,o.rotationY=this.rotationY*a}o.x=this.x*r,o.y=this.y*r,this.render(this.parallaxedNodes[s],o)}},i.prototype.render=function(t,e){NextendTween.set(t,e)},i.prototype.animateRender=function(t,e){NextendTween.to(t,.6,e)},i.prototype.tick=function(){this.draw(this.mouseX,this.mouseY)},i}),N2D("FrontendPlacement",function(t,e){function i(t){this.layer=t,this.alwaysResize=!1}return i.prototype.start=function(){},i.prototype.onDeviceChange=function(t){},i.prototype.onResize=function(t,e,i){},i}),N2D("FrontendSliderSlide",["FrontendComponentSlideAbstract"],function(t,e){function i(e,i,s){this.isStaticSlide=!1,this.originalIndex=s,this.index=s,this.localIndex=s,this.$element=i.data("slide",this),this.id=this.$element.data("id"),this.background=!1,this.slides=[this],e.parameters.admin?this.minimumSlideDuration=0:(this.minimumSlideDuration=i.data("slide-duration"),t.isNumeric(this.minimumSlideDuration)||(this.minimumSlideDuration=0));var n=i.find(".n2-ss-layers-container");N2Classes.FrontendComponentSlideAbstract.prototype.constructor.call(this,e,n)}return i.prototype=Object.create(N2Classes.FrontendComponentSlideAbstract.prototype),i.prototype.constructor=i,i.prototype.init=function(){N2Classes.FrontendComponentSlideAbstract.prototype.init.call(this);var t=this.slider.findSlideBackground(this);t.length>0&&(this.slider.isAdmin?this.background=new N2Classes.SmartSliderSlideBackgroundAdmin(this,t,this.slider.backgrounds):this.background=new N2Classes.SmartSliderSlideBackground(this,t,this.slider.backgrounds)),this.$element.data("slideBackground",this.background)},i.prototype.setStarterSlide=function(){N2Classes.FrontendComponentSlideAbstract.prototype.setStarterSlide.call(this)},i.prototype.setIndex=function(t){this.localIndex=this.index=t},i.prototype.preLoad=function(){return this.background?this.background.preLoad():!0},i.prototype.setPrevious=function(t){this.previousSlide=t},i.prototype.setNext=function(t){this.nextSlide=t,t.setPrevious(this)},i.prototype.hasBackgroundVideo=function(){return this.background.hasVideo()},i.prototype.getTitle=function(){return this.$element.data("title")},i.prototype.getDescription=function(){return this.$element.data("description")},i.prototype.getThumbnail=function(){return this.$element.data("thumbnail")},i.prototype.getThumbnailType=function(){return this.$element.data("thumbnail-type")},i.prototype.hasLink=function(){return!!this.$element.data("haslink")},i}),N2D("FrontendComponentSlideAbstract",["FrontendComponent"],function(t,e){function i(e,i){this.baseSize=16,this.slider=e,this.isCurrentlyEdited()||(this.status=s.NOT_INITIALIZED,N2Classes.FrontendComponent.prototype.constructor.call(this,this,this,i,i.find("> .n2-ss-layer, > .n2-ss-layer-group")),this.skipSelfAnimation=!0,this.slider.sliderElement.on({SliderDeviceOrientation:t.proxy(function(t,e){this.onDeviceChange(e.device+e.orientation.toLowerCase())},this),SliderResize:t.proxy(function(t,e,i){this.onResize(e,i.responsiveDimensions)},this)}),N2Classes.FrontendComponent.prototype.start.call(this))}var s={NOT_INITIALIZED:-1,INITIALIZED:0,READY_TO_START:1,PLAYING:2,ENDED:3,SUSPENDED:4};return i.prototype=Object.create(N2Classes.FrontendComponent.prototype),i.prototype.constructor=i,i.prototype.is=function(t){return this===t},i.prototype.isCurrentlyEdited=function(){return this.slider.parameters.admin&&this.$element.hasClass("n2-ss-currently-edited-slide")},i.prototype.trigger=function(){this.$element.trigger.apply(this.$element,[].slice.call(arguments))},i.prototype.triggerHandler=function(){return this.$element.triggerHandler.apply(this.$element,[].slice.call(arguments))},i.prototype.init=function(){if(!this.isCurrentlyEdited()){var e=this.$element.find('[data-device="1"]');this.slider.sliderElement.on("SliderDeviceOrientation",t.proxy(function(t,i){for(var s=0;s<e.length;s++){var n=e.eq(s);n.attr("src",n.data(i.device))}},this))}},i.prototype.refreshBaseSize=function(t){},i.prototype.onResize=function(t,e){for(var i=0;i<this.children.length;i++)this.children[i].onResize(t,e,this.isStaticSlide)},i.prototype.hasLayers=function(){return this.children.length>0},i.prototype.onDeviceChange=function(t){this.device=t;for(var e=0;e<this.children.length;e++)this.children[e].onDeviceChange(t);this.placement.onDeviceChange(t)},i.prototype.setStarterSlide=function(){this.setStarterSlideAnimation()},i.prototype.initLayerAnimations=function(){this.isCurrentlyEdited()||(this.status=s.INITIALIZED,this.playOnce=!this.slider.isAdmin&&this.slider.parameters.layerMode.playOnce,this.refreshTimelines(),this.isStaticSlide?this.slider.visible(t.proxy(function(){this.playIn()},this)):this.playOnce||this.$element.on("mainAnimationStartInCancel",t.proxy(this.reset,this)))},i.prototype.setStarterSlideAnimation=function(){this.slider.isAdmin||this.slider.visible(t.proxy(function(){this.slider.parameters.layerMode.playFirstLayer?this.playIn():this.playSpecialEventOnly()},this))},i.prototype.resize=function(t,e,i,s){s!==!1||this.isCurrentlyEdited()||this.animationsRefreshRatios(e)},i.prototype.animationsRefreshRatios=function(t){for(var e=0;e<this.layerAnimations.length;e++)this.layerAnimations[e].refreshRatio(t.slideW,t.slideH)},i.prototype.refreshTimelines=function(){this.slider.isAdmin||this.slider.disabled.layerAnimations===!1?this.layerAnimations=this.createLayerAnimations(this.slider.responsive.lastRatios.slideW,this.slider.responsive.lastRatios.slideH):this.layerAnimations=[]},i.prototype.playIn=function(){if(this.status===s.INITIALIZED){this.status=s.PLAYING;for(var t=0;t<this.layerAnimations.length;t++)this.layerAnimations[t].play();this.$element.trigger("layerAnimationPlayIn")}else this.status===s.SUSPENDED&&this.unsuspend()},i.prototype.playSpecialEventOnly=function(){if(this.status===s.INITIALIZED){this.status=s.PLAYING;for(var t=0;t<this.layerAnimations.length;t++)this.layerAnimations[t].playSpecialEventOnly();this.$element.trigger("layerAnimationPlayIn")}},i.prototype.playOut=function(){if(this.status===s.PLAYING){for(var e=[],i=0;i<this.layerAnimations.length;i++)this.layerAnimations[i].beforeMainSwitch(e);t.when.apply(t,e).done(t.proxy(function(){this.onOutAnimationsPlayed()},this))}else this.onOutAnimationsPlayed()},i.prototype.onOutAnimationsPlayed=function(){this.playOnce?this.status=s.ENDED:this.status=s.INITIALIZED,this.$element.trigger("layerAnimationCompleteOut")},i.prototype.suspend=function(){for(var t=0;t<this.layerAnimations.length;t++)this.layerAnimations[t].suspend();this.status=s.SUSPENDED},i.prototype.unsuspend=function(){if(this.status===s.SUSPENDED){for(var t=0;t<this.layerAnimations.length;t++)this.layerAnimations[t].unsuspend();this.status=s.PLAYING}},i.prototype.reset=function(){for(var t=0;t<this.layerAnimations.length;t++)this.layerAnimations[t].reset();this.status=s.INITIALIZED},i.prototype.getTimeline=function(){for(var t=new NextendTimeline({paused:1}),e=0;e<this.layerAnimations.length;e++){var i=this.layerAnimations[e];t.add(i.linearTimeline,0),i.linearTimeline.paused(!1)}return t},i.prototype.getPerspective=function(){return this.slider.getPerspective()},i}),N2D("FrontendSliderStaticSlide",["FrontendComponentSlideAbstract"],function(t,e){function i(t,e){this.isStaticSlide=!0,this.$element=e.data("slide",this),N2Classes.FrontendComponentSlideAbstract.prototype.constructor.call(this,t,e),this.init()}return i.prototype=Object.create(N2Classes.FrontendComponentSlideAbstract.prototype),i.prototype.constructor=i,i}),N2D("FrontendPlacementAbsolute",["FrontendPlacement"],function(t,e){function i(t){return{left:t.prop("offsetLeft"),top:t.prop("offsetTop")}}function s(t){this.linked=[],this.parentLayer=!1,this.$parent=!1,N2Classes.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(N2Classes.FrontendPlacement.prototype),s.prototype.constructor=s,s.prototype.start=function(){var e=this.layer.get("parentid");e&&(this.$parent=t("#"+e),0==this.$parent.length?this.$parent=!1:(this.parentLayer=this.$parent.data("layer"),this.parentLayer.placement.addLinked(this),this.onResize=function(){}))},s.prototype.addLinked=function(t){this.linked.push(t),this.alwaysResize=!0},s.prototype.onResize=s.prototype.onResizeLinked=function(t,e,s){var n=this.layer.$layer,r=t.slideW,o=r,a=t.slideH,l=a;parseInt(this.layer.get("responsivesize"))||(o=l=1),n.css("width",this.getWidth(o)),n.css("height",this.getHeight(l)),parseInt(this.layer.get("responsiveposition"))||(r=a=1);var h=this.layer.getDevice("left")*r,d=this.layer.getDevice("top")*a,p=this.layer.getDevice("align"),c=this.layer.getDevice("valign"),u={left:"auto",top:"auto",right:"auto",bottom:"auto"};if(this.$parent&&this.$parent.data("layer").isVisible){var m=i(this.$parent),f={left:0,top:0};switch(this.layer.getDevice("parentalign")){case"right":f.left=m.left+this.$parent.width();break;case"center":f.left=m.left+this.$parent.width()/2;break;default:f.left=m.left}switch(p){case"right":u.right=n.parent().width()-f.left-h+"px";break;case"center":u.left=f.left+h-n.width()/2+"px";break;default:u.left=f.left+h+"px"}switch(this.layer.getDevice("parentvalign")){case"bottom":f.top=m.top+this.$parent.height();break;case"middle":f.top=m.top+this.$parent.height()/2;break;default:f.top=m.top}switch(c){case"bottom":u.bottom=n.parent().height()-f.top-d+"px";break;case"middle":u.top=f.top+d-n.height()/2+"px";break;default:u.top=f.top+d+"px"}}else{switch(p){case"right":u.right=-h+"px";break;case"center":u.left=(s?n.parent().width():e.slide.width)/2+h-n.width()/2+"px";break;default:u.left=h+"px"}switch(c){case"bottom":u.bottom=-d+"px";break;case"middle":u.top=(s?n.parent().height():e.slide.height)/2+d-n.height()/2+"px";break;default:u.top=d+"px"}}n.css(u);for(var y=0;y<this.linked.length;y++)this.linked[y].onResizeLinked(t,e,s)},s.prototype.getWidth=function(t){var e=this.layer.getDevice("width");return this.isDimensionPropertyAccepted(e)?e:e*t+"px"},s.prototype.getHeight=function(t){var e=this.layer.getDevice("height");return this.isDimensionPropertyAccepted(e)?e:e*t+"px"},s.prototype.isDimensionPropertyAccepted=function(t){return!(!(t+"").match(/[0-9]+%/)&&"auto"!=t)},s}),N2D("FrontendPlacementContent",["FrontendPlacement"],function(t,e){function i(t){N2Classes.FrontendPlacement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(N2Classes.FrontendPlacement.prototype),i.prototype.constructor=i,i}),N2D("FrontendPlacementDefault",["FrontendPlacement"],function(t,e){function i(t){N2Classes.FrontendPlacement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(N2Classes.FrontendPlacement.prototype),i.prototype.constructor=i,i}),N2D("FrontendPlacementNormal",["FrontendPlacement"],function(t,e){function i(t){N2Classes.FrontendPlacement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(N2Classes.FrontendPlacement.prototype),i.prototype.constructor=i,i.prototype.onDeviceChange=function(){this.updateMargin(),this.updateHeight(),this.updateMaxWidth(),this.updateSelfAlign()},i.prototype.updateMargin=function(){var t=this.layer.getDevice("margin").split("|*|"),e=t.pop(),i=this.layer.baseSize;if("px+"==e&&i>0){e="em";for(var s=0;s<t.length;s++)t[s]=parseInt(t[s])/i}this.layer.$layer.css("margin",t.join(e+" ")+e)},i.prototype.updateHeight=function(){var t=this.layer.getDevice("height"),e="px";if(t>0){var i=this.layer.baseSize;i>0&&(e="em",t=parseInt(t)/i),this.layer.$layer.css("height",t+e)}else this.layer.$layer.css("height","")},i.prototype.updateMaxWidth=function(){var t=parseInt(this.layer.getDevice("maxwidth"));0>=t||isNaN(t)?this.layer.$layer.css("maxWidth","").attr("data-has-maxwidth","0"):this.layer.$layer.css("maxWidth",t+"px").attr("data-has-maxwidth","1")},i.prototype.updateSelfAlign=function(){this.layer.$layer.attr("data-cssselfalign",this.layer.getDevice("selfalign"))},i}),N2D("FrontendComponentCol",["FrontendComponent"],function(t,e){function i(t,e,i){this.$content=i.find(".n2-ss-layer-col:first"),N2Classes.FrontendComponent.prototype.constructor.call(this,t,e,i,this.$content.find("> .n2-ss-layer"))}return i.prototype=Object.create(N2Classes.FrontendComponent.prototype),i.prototype.constructor=i,i.prototype.onDeviceChange=function(t){N2Classes.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updateOrder(),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth()},i.prototype.updatePadding=function(){var t=this.getDevice("padding").split("|*|"),e=t.pop(),i=this.baseSize;if("px+"===e&&i>0){e="em";for(var s=0;s<t.length;s++)t[s]=parseInt(t[s])/i}this.$content.css("padding",t.join(e+" ")+e)},i.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},i.prototype.updateMaxWidth=function(){var t=parseInt(this.getDevice("maxwidth"));0>=t||isNaN(t)?this.$layer.css("maxWidth","").attr("data-has-maxwidth","0"):this.$layer.css("maxWidth",t+"px").attr("data-has-maxwidth","1")},i.prototype.getWidthPercentage=function(){return parseFloat(this.$layer.data("colwidthpercent"))},i.prototype.getRealOrder=function(){var t=this.getDevice("order");return 0==t?10:t},i.prototype.updateOrder=function(){var t=this.getDevice("order");0==t?this.$layer.css("order",""):this.$layer.css("order",t)},i.prototype.getContents=function(){return this.$content},i}),N2D("FrontendComponentContent",["FrontendComponent"],function(t,e){function i(t,e,i){this.$content=i.find(".n2-ss-section-main-content:first"),N2Classes.FrontendComponent.prototype.constructor.call(this,t,e,i,this.$content.find("> .n2-ss-layer"))}return i.prototype=Object.create(N2Classes.FrontendComponent.prototype),i.prototype.constructor=i,i.prototype.onDeviceChange=function(t){N2Classes.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth(),this.updateSelfAlign()},i.prototype.updatePadding=function(){var t=this.getDevice("padding").split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var s=0;s<t.length;s++)t[s]=parseInt(t[s])/i}this.$content.css("padding",t.join(e+" ")+e)},i.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},i.prototype.updateMaxWidth=function(){var t=parseInt(this.getDevice("maxwidth"));0>=t||isNaN(t)?this.$layer.css("maxWidth","").attr("data-has-maxwidth","0"):this.$layer.css("maxWidth",t+"px").attr("data-has-maxwidth","1")},i.prototype.updateSelfAlign=function(){this.$layer.attr("data-cssselfalign",this.getDevice("selfalign"))},i.prototype.getContents=function(){return this.$content},i}),N2D("FrontendComponentGroup",["FrontendComponent"],function(t,e){function i(t,e,i){N2Classes.FrontendComponent.prototype.constructor.call(this,t,e,i,i.find("> .n2-ss-layer"))}return i.prototype=Object.create(N2Classes.FrontendComponent.prototype),i.prototype.constructor=i,i}),N2D("FrontendComponentLayer",["FrontendComponent"],function(t,e){function i(t,i,s){N2Classes.FrontendComponent.prototype.constructor.call(this,t,i,s),this.wraps.mask!==e?this.$item=this.wraps.mask.children():this.wraps.parallax!==e?this.$item=this.wraps.parallax.children():this.$item=s.children()}return i.prototype=Object.create(N2Classes.FrontendComponent.prototype),i.prototype.constructor=i,i.prototype.getContents=function(){return this.$item},i}),N2D("FrontendComponentRow",["FrontendComponent"],function(t,e){function i(t,e,i){this.$row=i.find(".n2-ss-layer-row:first"),this.$rowInner=this.$row.find(".n2-ss-layer-row-inner:first"),N2Classes.FrontendComponent.prototype.constructor.call(this,t,e,i,this.$rowInner.find("> .n2-ss-layer"))}return i.prototype=Object.create(N2Classes.FrontendComponent.prototype),i.prototype.constructor=i,i.prototype.onDeviceChange=function(t){N2Classes.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateGutter(),this.updateInnerAlign()},i.prototype.onAfterDeviceChange=function(t){this.updateWrapAfter()},i.prototype.updatePadding=function(){var t=this.getDevice("padding").split("|*|"),e=t.pop(),i=this.baseSize;if("px+"===e&&i>0){e="em";for(var s=0;s<t.length;s++)t[s]=parseInt(t[s])/i}this.$row.css("padding",t.join(e+" ")+e)},i.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},i.prototype.updateGutter=function(){var t=this.getDevice("gutter"),e=t/2;if(this.children.length>0)for(var i=this.children.length-1;i>=0;i--)this.children[i].$layer.css("margin",e+"px");this.$rowInner.css({width:"calc(100% + "+(t+1)+"px)",margin:-e+"px"})},i.prototype.getSortedColumns=function(){for(var e=t.extend([],this.children).sort(function(t,e){return t.getRealOrder()-e.getRealOrder()}),i=e.length-1;i>=0;i--)e[i].isVisible||e.splice(i,1);return e},i.prototype.updateWrapAfter=function(){var t=parseInt(this.getDevice("wrapafter")),e=this.getSortedColumns(),i=e.length,s=!1;if(0===i)return!1;t>0&&i>t&&(s=!0),this.$row.attr("row-wrapped",s?1:0);var n;if(s){var r=[];for(n=0;i>n;n++){var o=Math.floor(n/t);"undefined"==typeof r[o]&&(r[o]=[]),r[o].push(e[n]),e[n].$layer.attr("data-r",o).toggleClass("n2-ss-last-in-row",(n+1)%t===0||n===i-1)}var a=this.getDevice("gutter");for(n=0;n<r.length;n++){var l,h=r[n],d=0;for(l=0;l<h.length;l++)d+=h[l].getWidthPercentage();for(l=0;l<h.length;l++)h[l].$layer.css("width","calc("+h[l].getWidthPercentage()/d*100+"% - "+(n2const.isIE||n2const.isEdge?a+1:a)+"px)")}}else{var d=0;for(n=0;i>n;n++)d+=e[n].getWidthPercentage();for(n=0;i>n;n++)e[n].$layer.css("width",e[n].getWidthPercentage()/d*100+"%").removeClass("n2-ss-last-in-row").attr("data-r",0);e[i-1].$layer.addClass("n2-ss-last-in-row")}},i.prototype.getContents=function(){return this.$row},i}),N2D("FrontendLayerAnimationManager",function(t,e){function i(t,e,s){this.status=new N2Classes.AnimationStatus,this.inStatus=!1,this.loopStatus=!1,this.outStatus=!1,this.namespace="n2-ss-animations-"+i.index++,this.hasSpecialEvent=!1,this.linear=!1,this.layer=t,this.$layer=e,this.options={repeatable:0,startDelay:0,endDelay:0,loopRepeatSelfOnly:0,inPlayEvent:"",loopPlayEvent:"",loopPauseEvent:"",loopStopEvent:"",outPlayEvent:""},this.promises={"in":new N2Classes.AnimationPromise(this,"IN"),loop:new N2Classes.AnimationPromise(this,"LOOP"),out:new N2Classes.AnimationPromise(this,"OUT"),reset:function(){this["in"].reset(),this.loop.reset(),this.out.reset()}},this.$animatableElement=e;var n=e.data("animatableselector");n&&(this.$animatableElement=e.find(n)),this.perspective=s,e.data("LayerAnimation",this),this.perspective>0&&(n2const.isEdge?NextendTween.set(this.$layer.parent(),{transformPerspective:this.perspective}):NextendTween.set(this.$layer.parent(),{perspective:this.perspective})),this.plugins={basic:!1,reveal:!1}}return i.index=1,i.optimize=function(t){return t.opacity!==e&&(t.n2AutoAlpha=t.opacity,delete t.opacity),t},i.optimizeTweenTo=function(t,e,s){NextendTween.to(t,e,i.optimize(s))},i.optimizeTo=function(t,e,s,n,r){t.to(e,s,i.optimize(n),r)},i.optimizeFromTo=function(t,e,s,n,r,o){t.fromTo(e,s,i.optimize(n),i.optimize(r),o)},i.prototype.hasAnimation=function(){return this.inStatus||this.loopStatus||this.outStatus},i.prototype.collectRelatedAnimations=function(){this.relatedAnimations={updateRatios:[],"in":[],loop:[],out:[]};for(var t in this.plugins)if(this.options[t]){if(this.plugins[t]===!1)switch(t){case"basic":this.plugins[t]=new N2Classes.FrontendLayerAnimationsBasic(this.$layer);break;case"reveal":this.plugins[t]=new N2Classes.FrontendLayerAnimationsReveal(this.$layer)}this.plugins[t].collectRelatedAnimations(this.relatedAnimations,this,this.options[t])}this.$layer.triggerHandler("collectRelatedAnimations",[this.relatedAnimations,this])},i.prototype.onStageReached=function(t){"loop"===t&&this.loopStatus&&this.loop.play(),this.$layer.triggerHandler(t.charAt(0).toUpperCase()+t.slice(1)+"Started")},i.prototype.setEventBased=function(i,s,n){this.slide=i,this.horizontalRatio=s,this.verticalRatio=n;var r=this.$layer.data("animv2");r&&("object"!=typeof r?this.setOptions(t.parseJSON(r)):this.setOptions(r)),this.collectRelatedAnimations(),this.options.repeatable&&""===this.options.inPlayEvent&&(this.options.inPlayEvent="layerAnimationPlayIn,OutComplete",""===this.options.loopPlayEvent&&(this.options.loopPlayEvent="InComplete"),""===this.options.outPlayEvent&&(this.options.outPlayEvent="LoopComplete")),""===this.options.outPlayEvent?"forced"===this.slide.slider.parameters.layerMode.mode?this.options.outPlayEvent="OutForced":this.options.outPlayEvent="LoopComplete":this.options.outPlayEvent.match(/OutForced/)?this.options.outPlayEvent="OutForced":this.options.outPlayEvent.match(/^(.*?,|.*? )?InstantOut(,.*?| .*?)?$/)&&(this.options.outPlayEvent="LoopComplete"),""===this.options.inPlayEvent&&(this.options.inPlayEvent="layerAnimationPlayIn"),""===this.options.loopPlayEvent&&(this.options.loopPlayEvent="InComplete"),this.buildTimeline(),this.updateRatios(s,n),this.inStatus?(this.hasSpecialEvent||this.options.inPlayEvent.match("layerAnimationPlayIn")||(this.hasSpecialEvent=!0),this.options.inPlayEvent.match("OutComplete")?this.promises["in"].forceResolve():this.subscribeEvent(this.options.inPlayEvent,t.proxy(function(){this.status.suspended()||(this.status.is("INITIALIZED_PLAYING")||this.status.is("IN_WAIT")?(this.promises["in"].resolveAndCheck(),delete this.targetStage):(this.status.isLoop()||this.status.isOut()||this.targetStage!==e&&"in"!==this.targetStage)&&(this.status.isIn()?delete this.targetStage:this.targetStage="in"))},this))):this.promises["in"].forceResolve(),this.loopStatus?(this.options.loopPlayEvent.match("InComplete")?this.promises.loop.forceResolve():(this.hasSpecialEvent||(this.hasSpecialEvent=!0),this.subscribeEvent(this.options.loopPlayEvent,t.proxy(function(){this.status.suspended()||(this.status.is("LOOP_WAIT")?this.promises.loop.resolveAndCheck():this.status.is("LOOP_PAUSED")&&this.loop.resume())},this))),""!==this.options.loopPauseEvent&&this.subscribeEvent(this.options.loopPauseEvent+".n2-ss-loop",t.proxy(this.loop.pause,this.loop)),""!==this.options.loopStopEvent&&this.subscribeEvent(this.options.loopStopEvent+".n2-ss-loop",t.proxy(this.loop.requestEnd,this.loop,!1))):(this.promises.loop.forceResolve(),this.subscribeEvent("InComplete",t.proxy(this.loopComplete,this))),this.outStatus?this.options.outPlayEvent.match("LoopComplete")?this.promises.out.forceResolve():"OutForced"===this.options.outPlayEvent||(this.hasSpecialEvent=!0,this.subscribeEvent(this.options.outPlayEvent,t.proxy(function(){this.status.suspended()||(this.status.is("OUT_WAIT")?(this.promises.out.resolveAndCheck(),delete this.targetStage):this.status.is("LOOP_WAIT")?(this.promises.loop.resolve(),this.promises.out.resolve(),this.status.set("OUT_WAIT"),this.timeline.seek("OUT").play()):this.status.is("LOOP_PLAYING")||this.status.is("LOOP_PAUSED")?(this.promises.out.resolve(),this.loop.requestEnd(!0)):(this.status.isIn()||this.status.isLoop()||this.targetStage!==e&&"out"!==this.targetStage)&&(this.status.isOut()?delete this.targetStage:this.targetStage="out"))},this))):this.promises.out.forceResolve(),this.status.set("INITIALIZED")},i.prototype.play=function(){!this.status.suspended()&&this.status.is("INITIALIZED")&&this.status.set("INITIALIZED_PLAYING"),this.timeline.play()},i.prototype.playSpecialEventOnly=function(){this.hasSpecialEvent?this.play():"OutForced"===this.options.outPlayEvent?(this.status.set("LOOP_WAIT"),this.timeline.seek("ZERO",!0)):(this.status.set("DISABLED"),this.timeline.progress(1,!0))},i.prototype.setOptions=function(e){this.options=t.extend(this.options,e)},i.prototype.buildTimeline=function(){var e;this.timeline=new NextendTimeline({paused:!0});var i=this.options.repeatable?this.options.startDelay:0;this.timeline.addLabel("IN",i),this.linear?this.timeline.set({},{},i):(this.timeline.addPause("+="+(.001+i),t.proxy(this.promises["in"].wait,this.promises["in"])),this.promises["in"].addPauseTween(this.timeline.recent()));var s=new NextendTimeline;for(e=0;e<this.relatedAnimations["in"].length;e++)this.relatedAnimations["in"][e].extendTimeline(s);s.totalDuration()?(this.linear||s.eventCallback("onComplete",this.inComplete,null,this),this.inStatus=!0,this.timeline.add(s)):(s.kill(),this.inStatus=!1),this.timeline.addLabel("ZERO","+=0.001"),this.loop=new N2Classes.AnimationsControllerLoop(this,this.$layer),this.loopStatus=this.loop.buildTimeline(this.timeline);var n=new NextendTimeline;for(e=0;e<this.relatedAnimations.out.length;e++)this.relatedAnimations.out[e].extendTimeline(n);var r=this.options.repeatable?this.options.endDelay:0;n.totalDuration()?(this.linear?n.set({},{},"+="+r):(this.timeline.addLabel("OUT","+=0.001"),this.timeline.addPause("+=0.002",t.proxy(this.promises.out.wait,this.promises.out)),this.promises.out.addPauseTween(this.timeline.recent()),n.set({},{},"+="+r),n.eventCallback("onComplete",this.outComplete,null,this)),this.outStatus=!0,this.timeline.add(n)):(n.kill(),this.outStatus=!1,this.timeline.set({},{onComplete:t.proxy(this.outComplete,this)},"+="+r))},i.prototype.updateRatios=function(t,e){if(this.horizontalRatio=t,this.verticalRatio=e,this.relatedAnimations.updateRatios.length>0){for(var i=0;i<this.relatedAnimations.updateRatios.length;i++)this.relatedAnimations.updateRatios[i].updateRatios(t,e);return!0}return!1},i.prototype.refreshRatio=function(t,e){if(this.updateRatios(t,e)){var i=this.timeline.time();this.timeline.time(0),this.timeline.invalidate(),this.timeline.time(i,!0)}},i.prototype.setLinear=function(t,e,i){return this.linear=!0,this.horizontalRatio=e,
this.verticalRatio=i,this.setOptions(t.animations.getData()),this.collectRelatedAnimations(),this.buildTimeline(),this.updateRatios(e,i),this.hasAnimation()},i.prototype.resetToEditor=function(){for(var t in this.plugins)this.plugins[t]&&this.plugins[t].resetToEditor();this.$layer.triggerHandler("AnimationSetZero")},i.prototype.inComplete=function(){this.status.set("IN_ENDED"),this.layer.setState("InComplete",!0),this.outStatus&&this.targetStage!==e&&(this.promises.loop.resolve(),this.promises.out.resolve(),this.status.set("OUT_WAIT"),this.timeline.seek("OUT").play()),this.$layer.triggerHandler("InComplete")},i.prototype.loopComplete=function(){1!==this.options.loopRepeatSelfOnly||this.status.is("LOOP_ENDING_FORCED")?(this.status.set("LOOP_ENDED"),this.targetStage!==e&&(this.promises[this.targetStage].resolve(),delete this.targetStage),this.$layer.triggerHandler("LoopComplete")):(this.promises.loop.reset(),this.loop.resetForReplay(),this.status.set("IN_ENDED"),this.timeline.seek("ZERO"))},i.prototype.outComplete=function(){this.options.repeatable&&this.hasAnimation()?this.status.set("INITIALIZED"):this.status.set("OUT_ENDED"),this.$layer.triggerHandler("OutComplete"),this.status.is("INITIALIZED")&&this.repeat()},i.prototype.repeat=function(){this.loopStatus&&this.loop.resetForReplay(),this.promises.reset(),this.targetStage!==e&&(this.promises[this.targetStage].resolve(),delete this.targetStage),this.timeline.seek("IN"),this.timeline.timeScale(1)},i.prototype.beforeMainSwitch=function(e){if(this.status.is("DISABLED")||this.status.is("INITIALIZED")||this.status.is("INITIALIZED_PLAYING")||this.status.is("OUT_ENDED"))this.status.set("DISABLED");else if(this.hasSpecialEvent)this.$layer.triggerHandler("OutForced");else{var i=t.Deferred();this.$layer.one("OutComplete",t.proxy(function(){this.$layer.off(".n2-instant-in"),this.status.set("DISABLED"),i.resolve()},this)),this.forcePlayOut(),e.push(i)}},i.prototype.forcePlayOut=function(){this.status.isIn()?this.$layer.one("InComplete.n2-instant-out",t.proxy(function(){this.promises.out.resolve(),this.outStatus&&this.timeline.seek("OUT")},this)):this.status.is("LOOP_WAIT")?(this.promises.out.resolve(),this.timeline.play("OUT")):this.status.isLoop()?(this.promises.out.resolve(),this.loop.requestEnd(!0)):this.status.is("OUT_WAIT")?this.promises.out.resolveAndCheck():this.status.is("OUT_PAUSED")&&this.timeline.play()},i.prototype.reset=function(){this.loop&&this.loop.reset(),this.layer.setState("InComplete",!1),this.promises.reset(),this.status.suspended()&&this.status.suspended(!1),this.status.set("INITIALIZED"),this.timeline.pause(0)},i.prototype.suspend=function(){this.status.suspended()||(this.status.isPlaying()&&(this.status.isLoop()&&this.loop.suspend(),this.timeline.pause()),this.status.suspended(!0))},i.prototype.unsuspend=function(){this.status.suspended()&&(this.status.suspended(!1),this.status.isPlaying()&&(this.status.isLoop()&&this.loop.unsuspend(),this.timeline.play()))},i.prototype.subscribeEvent=function(e,i){for(var s=e.split(","),n=0;n<s.length;n++)if(s[n].length){var r=s[n].replace(/\s/g,"").split("."),o=s[n];switch(r[0]){case"InComplete":case"LoopComplete":case"OutComplete":case"LoopRoundComplete":case"LayerClick":case"LayerMouseEnter":case"LayerMouseLeave":o.match(/^Layer/)&&(o=o.replace(/^Layer/,"").toLowerCase()),this.$layer.on(o,i);break;case"mainAnimationStartIn":case"layerAnimationPlayIn":case"SlideMouseEnter":case"SlideMouseLeave":case"SlideClick":o.match(/^Slide/)&&(o=o.replace(/^Slide/,"").toLowerCase()),this.slide.$element.on(o,i);break;case"SliderMouseEnter":case"SliderMouseLeave":case"SliderClick":o.match(/^Slider/)&&(o=o.replace(/^Slider/,"").toLowerCase()),this.slide.slider.sliderElement.on(o,t.proxy(function(e){t.inArray(this.slide,this.slide.slider.getVisibleSlides())>=0&&i()},this));break;case"OutForced":this.$layer.on(o,i);break;default:var a={killed:!1,"do":0,cancel:0};this.slide.$element.on("ss"+o,t.proxy(function(t){t["do"]&&clearTimeout(t["do"]),t["do"]=setTimeout(function(){t.killed||i(),t.killed=!1},50)},this,a)),this.slide.$element.on("sscancel-"+o,t.proxy(function(t){t.killed=!0,t.cancel&&clearTimeout(t.cancel),t.cancel=setTimeout(function(){t.killed=!1},70)},this,a))}}},i}),N2D("AnimationPromise",function(t,e){function i(t,e){this.manager=t,this.status=t.status,this.stack=e,this._done=!1,this._resolved=!1,this._forced=!1,this.pauseTween=null,this.position=null}return i.prototype.addPauseTween=function(e){e.stack=this.stack,this.pauseTween=e,Object.defineProperty(this.pauseTween,"data",{get:t.proxy(function(){return this._resolved?"":"isPause"},this)}),this.position=e.startTime()},i.prototype.resolve=function(){this._resolved=!0},i.prototype.forceResolve=function(){this._forced=!0,this.resolve()},i.prototype.resolved=function(){return this._resolved},i.prototype.reset=function(){this._done=!1,this._forced||(this._resolved=!1)},i.prototype.wait=function(){this._done||(this._done=!0,this._resolved?(this.status.set(this.stack+"_PLAYING"),this.manager.onStageReached(this.stack)):(this.status.set(this.stack+"_WAIT"),this.manager.timeline.seek(this.position)))},i.prototype.resolveAndCheck=function(){this.resolve(),this._done&&!this.status.suspended()&&this.status.is(this.stack+"_WAIT")&&(this.status.set(this.stack+"_PLAYING"),this.manager.onStageReached(this.stack),this.manager.timeline._paused&&this.manager.timeline.play())},i}),N2D("AnimationsRelated",function(t,e){function i(t,e){this._context=t,this._extendName=e}return i.prototype.extendTimeline=function(t,e,i){this._context[this._extendName].apply(this._context,arguments)},i}),N2D("AnimationStatus",function(t,e){function i(){this._suspended=!1,this.status=0}var s={DISABLED:-1,NOT_INITIALIZED:0,INITIALIZED:1,INITIALIZED_PLAYING:10,IN_WAIT:100,IN_PLAYING:110,IN_PAUSED:120,IN_ENDED:190,LOOP_WAIT:200,LOOP_PLAYING:210,LOOP_PAUSED:220,LOOP_ENDING:230,LOOP_ENDING_FORCED:240,LOOP_ENDED:290,OUT_WAIT:300,OUT_PLAYING:310,OUT_PAUSED:320,OUT_ENDED:390};return i.prototype.set=function(t){this.status=s[t]},i.prototype.is=function(t){return this.status===s[t]},i.prototype.isIn=function(){return this.status>=100&&this.status<200},i.prototype.isLoop=function(){return this.status>=200&&this.status<300},i.prototype.isOut=function(){return this.status>=300&&this.status<400},i.prototype.isPlaying=function(){return this.status%100===10},i.prototype.suspended=function(){return arguments.length&&(this._suspended=arguments[0]),this._suspended},i}),N2D("FrontendLayerAnimationsBasic",function(t,e){function i(t){return t.split("|*|").join("% ")+"px"}function s(e){this.hasAnimation=!1,this.$layer=e,this.startValues=t.extend({},n),this.hadImmediateRender=!1,this.horizontalRatio=this.verticalRatio=1,this._requireUpdateRatios=!1}var n={n2AutoAlpha:1,x:0,y:0,z:0,rotationX:0,rotationY:0,rotationZ:0,scaleX:1,scaleY:1,skewX:0,n2blur:0};return s.prototype.updateRatios=function(t,e){this.horizontalRatio=t,this.verticalRatio=e},s.prototype.optimizeFromTo=function(t,e,i,s,n,r){this.hadImmediateRender?n.immediateRender=!1:this.hadImmediateRender=!0,N2Classes.FrontendLayerAnimationManager.optimizeFromTo(t,e,i,s,n,r)},s.prototype.resetToEditor=function(){this.hasAnimation&&this.setZero()},s.prototype.setStartValues=function(e){t.extend(this.startValues,e),delete this.startValues.duration,delete this.startValues.delay,delete this.startValues.ease},s.prototype.setZero=function(){this.hasAnimation&&NextendTween.set(this.$animatableElement,t.extend({clearProps:"transform,n2blur"},n))},s.prototype.collectRelatedAnimations=function(e,i,s){this.animationManager=i,this.hasAnimation=!0;var r=this.$layer.data("animatableselector");if(r?this.$animatableElement=this.$layer.find(r):this.$animatableElement=this.$layer,this.currentZero=n,this.options={"in":t.extend({specialZero:0,transformOrigin:"50|*|50|*|0",keyFrames:[]},s["in"]),loop:t.extend({repeatCount:0,repeatStartDelay:0,transformOrigin:"50|*|50|*|0",keyFrames:[]},s.loop),out:t.extend({transformOrigin:"50|*|50|*|0",keyFrames:[]},s.out)},this._fillAnimations(this.options["in"].keyFrames),this._fillAnimations(this.options.loop.keyFrames),this._fillAnimations(this.options.out.keyFrames),this.options["in"].keyFrames.length&&e["in"].push(new N2Classes.AnimationsRelated(this,"extendTimelineIn")),this.options.loop.keyFrames.length){var o=new N2Classes.AnimationsLayerLoop(this,i,this.$layer,this.$animatableElement,this.options.loop);e.loop.push(o)}this.options.out.keyFrames.length&&e.out.push(new N2Classes.AnimationsRelated(this,"extendTimelineOut"))},s.prototype.requireUpdateRatios=function(){this._requireUpdateRatios||(this._requireUpdateRatios=!0,this.animationManager.relatedAnimations.updateRatios.push(this),this.updateRatios(this.animationManager.horizontalRatio,this.animationManager.verticalRatio))},s.prototype._fillAnimations=function(e){for(var i=0;i<e.length;i++)e[i]=t.extend({duration:.8,delay:0,ease:"easeOutCubic",opacity:1,x:0,y:0,z:0,rotationX:0,rotationY:0,rotationZ:0,scaleX:1,scaleY:1,skewX:0,n2blur:0},e[i])},s.prototype.extendTimelineIn=function(t){NextendTween.set(this.$animatableElement,{transformOrigin:i(this.options["in"].transformOrigin)}),this.buildTimelineIn(t,this.options["in"].keyFrames)},s.prototype.setCurrentZero=function(){var e=t.extend({},this.currentZero);delete e.delay,delete e.duration,NextendTween.set(this.$animatableElement,e)},s.prototype.buildTimelineIn=function(e,i){var s=0;if(i=t.extend(!0,[],i),this.options["in"].specialZero&&i.length>0){this.currentZero=i.pop(),delete this.currentZero.name,delete this.currentZero.duration,delete this.currentZero.delay,delete this.currentZero.ease;var n=this.currentZero.x;0===n?this.currentZero.x=0:(this.requireUpdateRatios(),this.currentZero.x=t.proxy(function(t){return t*this.horizontalRatio},this,n));var r=this.currentZero.y;0===r?this.currentZero.y=0:(this.requireUpdateRatios(),this.currentZero.y=t.proxy(function(t){return t*this.verticalRatio},this,r)),this.currentZero.rotationX=-this.currentZero.rotationX,this.currentZero.rotationY=-this.currentZero.rotationY,this.currentZero.rotationZ=-this.currentZero.rotationZ,this.setCurrentZero(),this.setStartValues(this.currentZero)}if(i.length>0){var o=this._buildAnimationChainIn(i);if(o.length>0)for(var a=0;a<o.length;a++)this.optimizeFromTo(e,this.$animatableElement,o[a].duration,o[a].from,o[a].to,s),s+=o[a].duration+o[a].to.delay;this.setStartValues(o[0].from)}},s.prototype._buildAnimationChainIn=function(e){for(var i=[{from:this.currentZero}],s=e.length-1;s>=0;s--){var n=t.extend(!0,{},e[s]),r=n.delay,o=n.duration,a=n.ease;delete n.delay,delete n.duration,delete n.ease,delete n.name;var l=i[0].from,h=-n.x;0===h?n.x=0:(this.requireUpdateRatios(),n.x=t.proxy(function(t){return t*this.horizontalRatio},this,h));var d=-n.y;0===d?n.y=0:(n.y=d,this.requireUpdateRatios(),n.y=t.proxy(function(t){return t*this.verticalRatio},this,d)),n.z=-n.z,n.rotationX=-n.rotationX,n.rotationY=-n.rotationY,n.rotationZ=-n.rotationZ,i.unshift({duration:o,from:n,to:t.extend({},l,{ease:a,delay:r})})}return i.pop(),i},s.prototype.extendTimelineOut=function(t){t.set(this.$animatableElement,{transformOrigin:i(this.options.out.transformOrigin),immediateRender:!1}),this.buildTimelineOut(t,this.options.out.keyFrames)},s.prototype.buildTimelineOut=function(e,i){var s=0;i=t.extend(!0,[],i);var n=this._buildAnimationChainOut(i);if(n.length>0)for(var r=0;r<n.length;r++)this.optimizeFromTo(e,this.$animatableElement,n[r].duration,n[r].from,n[r].to,s),s+=n[r].duration+n[r].to.delay},s.prototype._buildAnimationChainOut=function(e){for(var i=[{to:this.currentZero}],s=0;s<e.length;s++){var n=t.extend(!0,{},e[s]),r=n.duration;delete n.duration,delete n.name;var o=t.extend({},i[i.length-1].to);delete o.delay,delete o.ease;var a=n.x;0===a?n.x=0:(this.requireUpdateRatios(),n.x=t.proxy(function(t){return t*this.horizontalRatio},this,a));var l=n.y;0===l?n.y=0:(this.requireUpdateRatios(),n.y=t.proxy(function(t){return t*this.verticalRatio},this,l)),i.push({duration:r,from:o,to:n})}return i.shift(),i},s}),N2D("FrontendLayerAnimationsReveal",function(t,e){function i(t){this.hasAnimation=!1,this.$layer=t}var s={from:"top",fromease:"easeOutCubic",to:"bottom",toease:"easeOutCubic",content:"",duration:2,delay:0,color:"ffffff"};return i.prototype.resetToEditor=function(){this.hasAnimation&&(this["in"]||this.out)&&(this._destroyGroup("in"),this._destroyGroup("out"),NextendTween.set(this.$revealedElements,{clearProps:"transform, opacity"}),this.$revealedElements.removeAttr("data-force-hidden"))},i.prototype.setZero=function(){this.hasAnimation&&(this["in"]||this.out)&&(this["in"]&&this["in"].$clip.css("visibility","hidden"),this.out&&this.out.$clip.css("visibility","hidden"),NextendTween.set(this.$revealedElements,{clearProps:"transform, opacity"}),this.$revealedElements.removeAttr("data-force-hidden"))},i.prototype.collectRelatedAnimations=function(t,i,s){if(this.animationManager=i,this["in"]=!1,this.out=!1,s["in"]!==e||s.out!==e){this.hasAnimation=!0;var n=this.$layer.data("animatableselector");n?this.$animatableElement=this.$layer.find(n):this.$animatableElement=this.$layer,this.$revealedElements=this.$animatableElement.find(".n2-ss-layer-content,.n2-ss-layer-row,.n2-ss-item,.n2-ss-item-content").eq(0),s["in"]!==e&&(this["in"]=this._initGroup("in",s),t["in"].push(new N2Classes.AnimationsRelated(this,"extendTimelineIn"))),s.out!==e&&(this.out=this._initGroup("out",s),t.out.push(new N2Classes.AnimationsRelated(this,"extendTimelineOut")))}},i.prototype._initGroup=function(e,i){var n={$revealedElements:this.$revealedElements,options:t.extend({},s,i[e]),$clip:t('<div class="n2-ss-reveal-clip"></div>').appendTo(this.$animatableElement)};return n},i.prototype._destroyGroup=function(t){this[t]&&(this[t].$clip.remove(),delete this[t])},i.prototype.extendTimelineIn=function(t,e,i){N2Classes.FrontendLayerAnimationsRevealAnimation["in"](t,this["in"])},i.prototype.extendTimelineOut=function(t,e,i){N2Classes.FrontendLayerAnimationsRevealAnimation.out(t,this.out)},i}),N2D("FrontendLayerAnimationsRevealAnimation",function(t,e){var i=function(e,i,s,n){switch(e){case"curtains-horizontal":var r=t("<div></div>").css({width:"50%",background:"#"+s}).appendTo(i),o=r.clone().css("left","50%").appendTo(i);return r=r.add(o);case"curtains-vertical":var r=t("<div></div>").css({height:"50%",background:"#"+s}).appendTo(i),o=r.clone().css("top","50%").appendTo(i);return r=r.add(o);case"curtains-diagonal-1":var a=t('<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><polygon points="0,0 33,0 0,33" /><polygon points="32,32 32,-1 -1,32" /></svg>').appendTo(i);return a.find("polygon").attr("fill","#"+s);case"curtains-diagonal-2":var a=t('<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><polygon points="0,32 33,32 0,-1" /><polygon points="32,0 32,33 -1,0" /></svg>').appendTo(i);return a.find("polygon").attr("fill","#"+s);case"circle-top":case"circle-right":case"circle-bottom":case"circle-left":var l;switch(e){case"circle-top":case"circle-bottom":l=2*Math.ceil(Math.sqrt(n.width*n.width/4+n.height*n.height));break;case"circle-right":case"circle-left":l=2*Math.ceil(Math.sqrt(n.width*n.width+n.height*n.height/4))}var r=t("<div></div>").css({marginTop:-l/2,marginLeft:-l/2,borderRadius:"100%",width:l,height:l,background:"#"+s}).appendTo(i);switch(e){case"circle-top":r.css({left:"50%"});break;case"circle-right":r.css({left:"100%",top:"50%"});break;case"circle-bottom":r.css({left:"50%",top:"100%"});break;case"circle-left":r.css({top:"50%"})}return r}return t("<div></div>").css({background:"#"+s}).appendTo(i)},s=function(t,i,s,n,o,a){var l=r(o,a),h=t.totalDuration();l.length===e&&(l=[l]);for(var d=0;d<l.length;d++)l[d].b.ease=n,t.fromTo(i.eq(d),s,l[d].a,l[d].b,h)},n=function(t,i,s,n,o,a,l){var h=r(a,l);h.length===e&&(h=[h]);for(var d=0;d<h.length;d++)h[d].a.ease=o,t.fromTo(i.eq(d),s,h[d].b,h[d].a,n)},r=function(t,e){var i,s;switch(t){case"top":return{a:{y:"-100.1%"},b:{y:"0%"}};case"right":return{a:{x:"100.1%"},b:{x:"0%"}};case"bottom":return{a:{y:"100.1%"},b:{y:"0%"}};case"left":return{a:{x:"-100.1%"},b:{x:"0%"}};case"skew-top":return i=20,s=Math.cos((90-i)*Math.PI/180)*e.width,{a:{y:-1*(e.height+s),skewY:-i+"deg",skewType:"simple"},b:{y:0,skewY:"0deg"}};case"skew-right":return i=20,s=Math.cos((90-i)*Math.PI/180)*e.height,{a:{x:e.width+s,skewX:-i+"deg",skewType:"simple"},b:{x:0,skewX:"0deg"}};case"skew-bottom":return i=20,s=Math.cos((90-i)*Math.PI/180)*e.width,{a:{y:e.height+s,skewY:i+"deg",skewType:"simple"},b:{y:0,skewY:"0deg"}};case"skew-left":return i=20,s=Math.cos((90-i)*Math.PI/180)*e.height,{a:{x:-1*(e.width+s),skewX:i+"deg",skewType:"simple"},b:{x:0,skewX:"0deg"}};case"rotate-top-left":return{a:{rotationZ:"-90deg",transformOrigin:"0 0"},b:{rotationZ:0}};case"rotate-top-left-":return{a:{rotationZ:"90deg",transformOrigin:"0 0"},b:{rotationZ:0}};case"rotate-top-right":return{a:{rotationZ:"90deg",transformOrigin:"100% 0"},b:{rotationZ:0}};case"rotate-top-right-":return{a:{rotationZ:"-90deg",transformOrigin:"100% 0"},b:{rotationZ:0}};case"rotate-bottom-left":return{a:{rotationZ:"90deg",transformOrigin:"0 100%"},b:{rotationZ:0}};case"rotate-bottom-left-":return{a:{rotationZ:"-90deg",transformOrigin:"0 100%"},b:{rotationZ:0}};case"rotate-bottom-right":return{a:{rotationZ:"-90deg",transformOrigin:"100% 100%"},b:{rotationZ:0}};case"rotate-bottom-right-":return{a:{rotationZ:"90deg",transformOrigin:"100% 100%"},b:{rotationZ:0}};case"circle-top":return{a:{scale:0,transformOrigin:"50% 50%",y:"-5%"},b:{y:"0%",scale:1}};case"circle-right":return{a:{scale:0,transformOrigin:"50% 50%",x:"5%"},b:{x:"0%",scale:1}};case"circle-bottom":return{a:{scale:0,transformOrigin:"50% 50%",y:"5%"},b:{y:"0%",scale:1}};case"circle-left":return{a:{scale:0,transformOrigin:"50% 50%",x:"-5%"},b:{x:"0%",scale:1}};case"curtains-horizontal":return[{a:{x:"-100%"},b:{x:"0%"}},{a:{x:"100%"},b:{x:"0%"}}];case"curtains-vertical":return[{a:{y:"-100%"},b:{y:"0%"}},{a:{y:"100%"},b:{y:"0%"}}];case"curtains-diagonal-1":case"curtains-diagonal-2":return[{a:{x:"-100%"},b:{x:"0%"}},{a:{x:"100%"},b:{x:"0%"}}]}},o=function(t,e){var i={},s={};switch(t){case"fade":i={n2AutoAlpha:0},s={n2AutoAlpha:1};break;case"scale-up":i={scale:.7},s={scale:1};break;case"scale-down":i={scale:1.3},s={scale:1};break;case"top":i={y:"-100.1%"},s={y:"0%"};break;case"right":i={x:"100.1%"},s={x:"0%"};break;case"bottom":i={y:"100.1%"},s={y:"0%"};break;case"left":i={x:"-100.1%"},s={x:"0%"};break;default:return!1}return"out"===e?{from:s,to:i}:{from:i,to:s}},a={"in":function(t,r){"no"!==r.options.from&&t.fromTo(r.$revealedElements,1e-8,{n2AutoAlpha:0},{n2AutoAlpha:0},0);var a=new NextendTimeline,l="no"===r.options.from?1:2,h=r.options.duration/l;t.add(a),t.set(r.$clip,{visibility:"visible"},0);var d=r.$clip[0].getBoundingClientRect(),p=i(r.options.from,r.$clip,r.options.color,d),c=i(r.options.to,r.$clip,r.options.color,d);p.css("display","none"),a.set({},{},r.options.delay),"no"!==r.options.from?(c.css("display","none"),a.set(p,{display:"block"}),s(a,p,h,r.options.fromease,r.options.from,d),a.set(p,{display:"none"}),a.set(c,{display:"block"})):r.$clip.css("visibility","visible");var u=a.totalDuration(),m=o(r.options.content,"in");m?(m.from.n2AutoAlpha===e&&a.set(r.$revealedElements,{n2AutoAlpha:1}),m.to.ease="easeOutCubic",a.fromTo(r.$revealedElements,h,m.from,m.to)):a.set(r.$revealedElements,{n2AutoAlpha:1}),n(a,c,h,u,r.options.toease,r.options.to,d),a.set(c,{display:"none"}),a.set(r.$clip,{visibility:"hidden"})},out:function(t,r){var a=new NextendTimeline,l="no"===r.options.to?1:2,h=r.options.duration/l;t.add(a),t.set(r.$clip,{visibility:"visible"},0);var d=r.$clip[0].getBoundingClientRect(),p=i(r.options.from,r.$clip,r.options.color,d),c=i(r.options.to,r.$clip,r.options.color,d);p.css("display","none"),c.css("display","none"),a.set({},{},r.options.delay),a.set(p,{display:"block"}),s(a,p,h,r.options.fromease,r.options.from,d),a.set(p,{display:"none"});var u=a.totalDuration(),m=o(r.options.content,"out");m?(m.from.n2AutoAlpha===e&&a.set(r.$revealedElements,{n2AutoAlpha:0}),m.to.ease="easeOutCubic",a.fromTo(r.$revealedElements,h,m.from,m.to,u-h)):a.set(r.$revealedElements,{n2AutoAlpha:0}),u=a.totalDuration(),a.set(c,{display:"block"},u),n(a,c,h,u,r.options.toease,r.options.to,d),a.set(c,{display:"none"}),a.set(r.$clip,{visibility:"hidden"})}};return a}),N2D("AnimationsControllerLoop","FrontendLayerAnimationManager",function(t,e){function i(t,e){this.animationManager=t,this.status=this.animationManager.status,this.$layer=e}return i.prototype.reset=function(){for(var t=0;t<this.animations.length;t++)this.animations[t].reset()},i.prototype.play=function(){if(!this.status.suspended()&&this.status.is("LOOP_PLAYING"))for(var t=0;t<this.animations.length;t++)this.animations[t].play()},i.prototype.resume=function(){for(var t=0;t<this.animations.length;t++)this.animations[t].resume();this.status.set("LOOP_PLAYING")},i.prototype.pause=function(){if(!this.status.suspended()&&this.status.is("LOOP_PLAYING")){for(var t=0;t<this.animations.length;t++)this.animations[t].pause();this.status.set("LOOP_PAUSED")}},i.prototype.suspend=function(){if(!this.status.suspended()&&this.status.is("LOOP_PLAYING"))for(var t=1;t<this.animations.length;t++)this.animations[t].suspend()},i.prototype.unsuspend=function(){if(!this.status.suspended()&&this.status.is("LOOP_PLAYING"))for(var t=1;t<this.animations.length;t++)this.animations[t].unsuspend()},i.prototype.requestEnd=function(t){if(!this.status.suspended()&&(this.status.is("LOOP_PLAYING")||this.status.is("LOOP_PAUSED"))){for(var e=0;e<this.animations.length;e++)this.animations[e].requestEnd();t?this.status.set("LOOP_ENDING_FORCED"):this.status.set("LOOP_ENDING")}},i.prototype.markSingleAnimationEnded=function(){for(var t=0;t<this.animations.length;t++)if(!this.animations[t].isEnded())return;this.ended()},i.prototype.ended=function(){this.animationManager.loopComplete()},i.prototype.resetForReplay=function(){for(var t=0;t<this.animations.length;t++)this.animations[t].resetForReplay()},i.prototype.invalidate=function(){for(var t=1;t<this.animations.length;t++)this.animations[t].invalidate()},i.prototype.buildTimeline=function(e){this.animations=[];for(var i=0;i<this.animationManager.relatedAnimations.loop.length;i++)this.animationManager.relatedAnimations.loop[i].setController(this,i),this.animations.push(this.animationManager.relatedAnimations.loop[i]);if(this.animations.length>0){this.animationManager.linear||(e.addPause("+=0.002",t.proxy(this.animationManager.promises.loop.wait,this.animationManager.promises.loop)),this.animationManager.promises.loop.addPauseTween(e.recent()));var s=e.totalDuration();this.animations[0].buildTimeline(e,s);for(var i=1;i<this.animations.length;i++)this.animations[i].buildTimeline(this.animationManager.linear?e:!1,this.animationManager.linear?s:0)}return this.animations.length},i}),N2D("AnimationsLayerLoop",["AnimationsLoopAbstract"],function(t,e){function i(t,e,i,s,n){this.layerAnimations=t,this.animationManager=e,this.$layer=i,this.$animatableElement=s,this.animationData=n.keyFrames,this.transformOrigin=n.transformOrigin.split("|*|").join("% ")+"px",this.repeatCount=n.repeatCount,this.repeatStartDelay=Math.max(0,n.repeatStartDelay),this.single=!1,N2Classes.AnimationsLoopAbstract.prototype.constructor.call(this,parseInt(this.repeatCount))}return i.prototype=Object.create(N2Classes.AnimationsLoopAbstract.prototype),i.prototype.constructor=i,i.prototype.playLoopAgain=function(){N2Classes.AnimationsLoopAbstract.prototype.playLoopAgain.call(this),this.$layer.triggerHandler("LoopRoundComplete")},i.prototype.buildTimeline=function(e,i){var s=this.animationManager.linear?"linear":"event";this.timeline=e||new NextendTimeline({paused:!0}),i+=.001,this.timeline.set(this.$animatableElement,{transformOrigin:this.transformOrigin,immediateRender:!1},i),this.repeatStartDelay>0&&(i+=this.repeatStartDelay,this.timeline.set({},{},i)),this.buildTimelineLoop(i,s,t.extend(!0,[],this.animationData)),this.animationManager.linear||this.timeline.set({},{onComplete:t.proxy(this.onComplete,this)})},i.prototype.buildTimelineLoop=function(e,i,s){var n=this._buildAnimationChainLoop(s);if(this.zero=t.extend(!0,{ease:n[0].to.ease},n[0]),!this.single){var r=this.zero.duration/2;N2Classes.FrontendLayerAnimationManager.optimizeFromTo(this.timeline,this.$animatableElement,r,t.extend({},this.layerAnimations.currentZero),t.extend({immediateRender:!1,ease:this.zero.ease},this.zero.from),e),e+=r}if("linear"===i){var o=this.repeatCount;1>o&&(o=1);for(var a=0;o>a;a++)for(var l=0;l<n.length;l++)N2Classes.FrontendLayerAnimationManager.optimizeFromTo(this.timeline,this.$animatableElement,n[l].duration,t.extend({},n[l].from),t.extend({immediateRender:!1},n[l].to),e),e+=n[l].duration}else if("event"===i){this.timeline.addLabel("LOOP",e);for(var l=0;l<n.length;l++)n[l].to.immediateRender=!1,N2Classes.FrontendLayerAnimationManager.optimizeFromTo(this.timeline,this.$animatableElement,n[l].duration,n[l].from,n[l].to,e),e+=n[l].duration;this.timeline.set({},{onComplete:t.proxy(this.repeat,this)},e)}this.single||N2Classes.FrontendLayerAnimationManager.optimizeFromTo(this.timeline,this.$animatableElement,this.zero.duration/2,t.extend({},this.zero.from),t.extend({immediateRender:!1,ease:this.zero.ease},this.layerAnimations.currentZero),e)},i.prototype._buildAnimationChainLoop=function(e){if(1===e.length){this.single=!0;var i=t.extend(!0,{},e[0]),s=t.extend({},this.layerAnimations.currentZero);s.duration=i.duration,s.ease=i.ease,360!==Math.abs(i.rotationX)&&360!==Math.abs(i.rotationY)&&360!==Math.abs(i.rotationZ)||1!=i.opacity||0!=i.x||0!=i.y||0!=i.z||1!=i.scaleX||1!=i.scaleY||0!=i.skewX||0!=i.n2blur?e.push(s):(360===+i.rotationX?i.rotationX="+=360":-360===+i.rotationX&&(i.rotationX="-=360"),360===+i.rotationY?i.rotationY="+=360":-360===+i.rotationY&&(i.rotationY="-=360"),360===+i.rotationZ?i.rotationZ="+=360":-360===+i.rotationZ&&(i.rotationZ="-=360"))}var n=0;delete e[n].name,0!==+e[n].x&&(this.layerAnimations.requireUpdateRatios(),e[n].x=t.proxy(function(t){return t*this.layerAnimations.horizontalRatio},this,e[n].x)),0!==+e[n].y&&(this.layerAnimations.requireUpdateRatios(),e[n].y=t.proxy(function(t){return t*this.layerAnimations.verticalRatio},this,e[n].y));var r=[{duration:e[n].duration,from:t.extend({},this.layerAnimations.currentZero),to:e[n]}];for(n++;n<e.length;n++){var s=e[n],o=s.duration;delete s.duration,delete s.name;var a=t.extend({},r[r.length-1].to);delete a.delay,delete a.ease,0!==+s.x&&(this.layerAnimations.requireUpdateRatios(),s.x=t.proxy(function(t){return t*this.layerAnimations.horizontalRatio},this,s.x)),0!==+s.y&&(this.layerAnimations.requireUpdateRatios(),s.y=t.proxy(function(t){return t*this.layerAnimations.verticalRatio},this,s.y)),r.push({duration:o,from:a,to:s})}return this.single||(r.push({duration:r[0].duration,from:t.extend({},r[r.length-1].to),to:t.extend({},r[0].to)}),r.shift(),delete r[0].from.duration),r},i}),N2D("AnimationsLoopTimeline",["AnimationsLoopAbstract"],function(t,e){function i(t,e){this.manager=t,N2Classes.AnimationsLoopAbstract.prototype.constructor.call(this,e)}N2Classes.AnimationsLoopAbstract.status;return i.prototype=Object.create(N2Classes.AnimationsLoopAbstract.prototype),i.prototype.constructor=i,i.prototype.buildTimeline=function(t,e){this.timeline=t||new NextendTimeline({paused:!0}),this.controller.animationManager.linear?this.repeatCount=0:this.timeline.addLabel("LOOP",e);var i=this.manager.getLoopTimeline();this.timeline.add(i.paused(0),e),this.controller.animationManager.linear||i.eventCallback("onComplete",function(){this.repeat()||this.onComplete()},null,this)},i.prototype.invalidate=function(){var t=this.timeline.time();this.timeline.invalidate().time(t,!0)},i}),N2D("AnimationsLoopAbstract",function(t,e){function i(t){this.controller=null,this.ending=!1,this.ended=!1,this._counter=0,this.repeatCount=t,this.timeline=null}return i.prototype.setController=function(t,e){this.controller=t,this.index=e},i.prototype.repeat=function(){return this._counter++,this.isInfinite()&&this.ending===!1||this._counter<this.repeatCount?(this.playLoopAgain(),!0):!1},i.prototype.playLoopAgain=function(){this.timeline.seek("LOOP")},i.prototype.resetCounter=function(){this._counter=0},i.prototype.isInfinite=function(){return 0===this.repeatCount},i.prototype.buildTimeline=function(t,e){},i.prototype.refresh=function(){},i.prototype.reset=function(){this.resetForReplay(),this.index>0&&this.timeline.pause(0)},i.prototype.resetForReplay=function(){this.ending=!1,this.ended=!1,this.resetCounter()},i.prototype.play=function(){this.index>0&&this.timeline.restart(!0)},i.prototype.pause=function(){this.timeline.pause()},i.prototype.resume=function(){this.timeline.play()},i.prototype.suspend=function(){this.timeline.pause()},i.prototype.unsuspend=function(){this.timeline.play()},i.prototype.onComplete=function(){this.ended=!0,this.controller.markSingleAnimationEnded()},i.prototype.isEnded=function(){return this.ended},i.prototype.requestEnd=function(){this.ended||this.ending||(this.ending=!0,this.timeline.play())},i}),N2D("SmartSliderResponsive",function(t,e){function i(e,i){this.disableTransitions=!1,this.disableTransitionsTimeout=null,this.lastClientHeight=0,this.lastClientHeightTime=0,this.lastOrientation=0,this.pixelSnappingFraction=0,this.focusOffsetTop=0,this.focusOffsetBottom=0,this.isFullScreen=!1,this.invalidateResponsiveState=!0,this.parameters=t.extend({desktop:1,tablet:1,mobile:1,onResizeEnabled:!0,type:"auto",downscale:!0,upscale:!1,constrainRatio:!0,minimumHeight:0,maximumHeight:0,minimumHeightRatio:0,maximumHeightRatio:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},maximumSlideWidth:0,maximumSlideWidthLandscape:0,maximumSlideWidthRatio:-1,maximumSlideWidthTablet:0,maximumSlideWidthTabletLandscape:0,maximumSlideWidthMobile:0,maximumSlideWidthMobileLandscape:0,maximumSlideWidthConstrainHeight:0,forceFull:0,forceFullOverflowX:"body",forceFullHorizontalSelector:"",sliderHeightBasedOn:"real",decreaseSliderHeight:0,focusUser:1,deviceModes:{desktopLandscape:1,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},normalizedDeviceModes:{unknownUnknown:["unknown","Unknown"],desktopPortrait:["desktop","Portrait"]},verticalRatioModifiers:{unknownUnknown:1,desktopLandscape:1,desktopPortrait:1,mobileLandscape:1,mobilePortrait:1,tabletLandscape:1,tabletPortrait:1},minimumFontSizes:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},ratioToDevice:{Portrait:{tablet:0,mobile:0},Landscape:{tablet:0,mobile:0}},sliderWidthToDevice:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},basedOn:"combined",desktopPortraitScreenWidth:1200,tabletPortraitScreenWidth:800,mobilePortraitScreenWidth:440,tabletLandscapeScreenWidth:1024,mobileLandscapeScreenWidth:740,orientationMode:"width_and_height",overflowHiddenPage:0,focus:{offsetTop:"",offsetBottom:""}},i),e.isAdmin&&(this.doResize=NextendThrottle(this.doResize,50)),this.loadDeferred=t.Deferred(),this.slider=e,this.sliderElement=e.sliderElement}var s=null,n=null;return i.OrientationMode={SCREEN:0,ADMIN_LANDSCAPE:1,ADMIN_PORTRAIT:2,SCREEN_WIDTH_ONLY:3},i.DeviceOrientation={UNKNOWN:0,LANDSCAPE:1,PORTRAIT:2},i._DeviceOrientation={0:"Unknown",1:"Landscape",2:"Portrait"},i.DeviceMode={UNKNOWN:0,DESKTOP:1,TABLET:2,MOBILE:3},i._DeviceMode={0:"unknown",1:"desktop",2:"tablet",3:"mobile"},i.prototype.start=function(){nextend.fontsDeferred===e?N2R("windowLoad",t.proxy(function(){this.loadDeferred.resolve()},this)):nextend.fontsDeferred.always(t.proxy(function(){this.loadDeferred.resolve()},this)),this.normalizeTimeout=null,this.delayedResizeAdded=!1,this.deviceMode=i.DeviceMode.UNKNOWN,this.orientationMode=i.OrientationMode.SCREEN,this.orientation=i.DeviceOrientation.UNKNOWN,
this.lastRatios={ratio:-1},this.lastRawRatios={ratio:-1},this.normalizedMode="unknownUnknown",this.widgetMargins={Top:[],Right:[],Bottom:[],Left:[]},this.staticSizes={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},this.enabledWidgetMargins=[],this.alignElement=this.slider.sliderElement.closest(".n2-ss-align"),this.$section=this.alignElement.parent();var r=this.ready=t.Deferred();switch(this.sliderElement.triggerHandler("SliderResponsiveStarted"),this.sliderElement.one("SliderResize",function(){r.resolve()}),"fullpage"===this.parameters.type&&"100vh"===this.parameters.sliderHeightBasedOn&&(this.$viewportHeight=t('<div style="height:100vh;width:0;position:absolute;bottom:0;visibility:hidden;"></div>').appendTo("body")),this.containerElementPadding=this.sliderElement.parent(),this.containerElement=this.containerElementPadding.parent(),!this.slider.isAdmin&&this.parameters.overflowHiddenPage&&t("html, body").css("overflow","hidden"),"width"==this.parameters.orientationMode&&(this.orientationMode=i.OrientationMode.SCREEN_WIDTH_ONLY),nextend.smallestZoom=Math.min(Math.max(this.parameters.sliderWidthToDevice.mobilePortrait,120),320),this.parameters.basedOn){case"screen":break;default:if(null==s){var o=new MobileDetect(window.navigator.userAgent,801);s=!!o.tablet(),n=!!o.phone()}}if(this.storeDefaults(),this.parameters.minimumHeight>0&&(this.parameters.minimumHeightRatio=this.parameters.minimumHeight/this.responsiveDimensions.startHeight),this.parameters.maximumHeight>0&&this.parameters.maximumHeight>=this.parameters.minimumHeight&&(this.parameters.maximumHeightRatio={desktopPortrait:this.parameters.maximumHeight/this.responsiveDimensions.startHeight},this.parameters.maximumHeightRatio.desktopLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletPortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobilePortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobileLandscape=this.parameters.maximumHeightRatio.desktopPortrait),this.parameters.maximumSlideWidth>0&&(this.parameters.maximumSlideWidthRatio={desktopPortrait:this.parameters.maximumSlideWidth/this.responsiveDimensions.startSlideWidth,desktopLandscape:this.parameters.maximumSlideWidthLandscape/this.responsiveDimensions.startSlideWidth,tabletPortrait:this.parameters.maximumSlideWidthTablet/this.responsiveDimensions.startSlideWidth,tabletLandscape:this.parameters.maximumSlideWidthTabletLandscape/this.responsiveDimensions.startSlideWidth,mobilePortrait:this.parameters.maximumSlideWidthMobile/this.responsiveDimensions.startSlideWidth,mobileLandscape:this.parameters.maximumSlideWidthMobileLandscape/this.responsiveDimensions.startSlideWidth},this.parameters.maximumSlideWidthConstrainHeight)){this.parameters.maximumHeightRatio=t.extend({},this.parameters.maximumSlideWidthRatio);for(var a in this.parameters.maximumHeightRatio)this.parameters.maximumHeightRatio[a]*=this.parameters.verticalRatioModifiers[a]}if(N2Classes.Zoom!==e&&N2Classes.Zoom.add(this),this.onResize(),t(window).on("SliderContentResize",t.proxy(function(t){this.invalidateResponsiveState=!0,this.onResize(t)},this)),this.parameters.onResizeEnabled||"adaptive"==this.parameters.type)if(t(window).on({resize:t.proxy(this.onResize,this),orientationchange:t.proxy(this.onResize,this)}),this.sliderElement.on("SliderInternalResize",t.proxy(this.onResize,this)),window.ResizeObserver!==e){var l=0,h=new ResizeObserver(t.proxy(function(e){e.forEach(t.proxy(function(t){l!==t.contentRect.width&&(l=t.contentRect.width,this.sliderElement.triggerHandler("SliderInternalResize"))},this))},this));h.observe(this.containerElement.parent().get(0))}else try{t('<iframe class="bt_skip_resize" title="Resize helper" sandbox="allow-same-origin allow-scripts" style="margin:0;padding:0;border:0;display:block;width:100%;height:0;min-height:0;max-height:0;"/>').on("load",t.proxy(function(e){var i=0,s=t(e.target.contentWindow?e.target.contentWindow:e.target.contentDocument.defaultView).on("resize",t.proxy(function(t){var e=s.width();i!==e&&(i=e,this.sliderElement.triggerHandler("SliderInternalResize"))},this));s[0].document.getElementsByTagName("HTML")[0].setAttribute("lang",window.document.getElementsByTagName("HTML")[0].getAttribute("lang"))},this)).insertBefore(this.containerElement)}catch(d){}},i.prototype.getOuterWidth=function(){return this.responsiveDimensions.startSliderWidth+this.responsiveDimensions.startSliderMarginLeft+this.responsiveDimensions.startSliderMarginRight},i.prototype.storeDefaults=function(){this.responsiveDimensions={startWidth:this.sliderElement.outerWidth(!0),startHeight:this.sliderElement.outerHeight(!0),startSliderMarginhorizontal:0,startSliderMarginvertical:0},this.horizontalElements=[],this.verticalElements=[],this.init(),this.margins={top:this.responsiveDimensions.startSliderMarginTop,right:this.responsiveDimensions.startSliderMarginRight,bottom:this.responsiveDimensions.startSliderMarginBottom,left:this.responsiveDimensions.startSliderMarginLeft}},i.prototype.addHorizontalElement=function(t,e,i,s){i=i||"ratio";var n=new N2Classes.SmartSliderResponsiveElement(this,i,t,e,s);return this.horizontalElements.push(n),n},i.prototype.addVerticalElement=function(t,e,i,s){i=i||"ratio";var n=new N2Classes.SmartSliderResponsiveElement(this,i,t,e,s);return this.verticalElements.push(n),n},i.prototype.resizeHorizontalElements=function(t){for(var e=0;e<this.horizontalElements.length;e++){var i=this.horizontalElements[e];"undefined"==typeof t[i.ratioName]&&console.log("error with "+i.ratioName),i.resize(this.responsiveDimensions,t[i.ratioName],!1,0)}this.slider.sliderElement.triggerHandler("SliderResizeHorizontal")},i.prototype.updateVerticalRatios=function(t){return t},i.prototype._updateVerticalRatios=function(e){var i=this.responsiveDimensions.startSlideHeight*e.slideH,s=!1;return this.sliderElement.find(".n2-ss-section-main-content").addClass("n2-ss-section-main-content-calc").each(function(e,n){var r=t(n).outerHeight();r>i&&(s=!0,i=r)}).removeClass("n2-ss-section-main-content-calc"),s&&(e.slideH=i/this.responsiveDimensions.startSlideHeight,e.h=Math.max(e.h,e.slideH)),e},i.prototype.resizeVerticalElements=function(t,e,i){for(var s=0;s<this.verticalElements.length;s++){var n=this.verticalElements[s];"undefined"==typeof t[n.ratioName]&&console.log("error with "+n.ratioName),n.resize(this.responsiveDimensions,t[n.ratioName],e,i)}},i.prototype.getDeviceMode=function(){return i._DeviceMode[this.deviceMode]},i.prototype.getDeviceModeOrientation=function(){return i._DeviceMode[this.deviceMode]+i._DeviceOrientation[this.orientation]},i.prototype.onResize=function(e){this.slider.mainAnimation&&"playing"==this.slider.mainAnimation.getState()?this.delayedResizeAdded||(this.delayedResizeAdded=!0,this.sliderElement.on("mainAnimationComplete.responsive",t.proxy(this._onResize,this,e))):this._onResize(e)},i.prototype._onResize=function(t){this.doResize(t),this.delayedResizeAdded=!1},i.prototype.doNormalizedResize=function(){this.normalizeTimeout&&clearTimeout(this.normalizeTimeout),this.normalizeTimeout=setTimeout(t.proxy(this.doResize,this),10)},i.prototype._getOrientation=function(){return this.orientationMode==i.OrientationMode.SCREEN?window.orientation!==e?90===Math.abs(window.orientation)?i.DeviceOrientation.LANDSCAPE:i.DeviceOrientation.PORTRAIT:window.innerHeight<=window.innerWidth?i.DeviceOrientation.LANDSCAPE:i.DeviceOrientation.PORTRAIT:this.orientationMode==i.OrientationMode.ADMIN_PORTRAIT?i.DeviceOrientation.PORTRAIT:this.orientationMode==i.OrientationMode.ADMIN_LANDSCAPE?i.DeviceOrientation.LANDSCAPE:void 0},i.prototype._getDevice=function(){switch(this.parameters.basedOn){case"combined":return this._getDeviceDevice(this._getDeviceScreenWidth());case"device":return this._getDeviceDevice(i.DeviceMode.DESKTOP);case"screen":return this._getDeviceScreenWidth()}},i.prototype._getDeviceScreenWidth=function(){var t=window.innerWidth;if(this.orientation==i.DeviceOrientation.PORTRAIT){if(t<this.parameters.mobilePortraitScreenWidth)return i.DeviceMode.MOBILE;if(t<this.parameters.tabletPortraitScreenWidth)return i.DeviceMode.TABLET}else{if(t<this.parameters.mobileLandscapeScreenWidth)return i.DeviceMode.MOBILE;if(t<this.parameters.tabletLandscapeScreenWidth)return i.DeviceMode.TABLET}return i.DeviceMode.DESKTOP},i.prototype._getDeviceAndOrientationByScreenWidth=function(){var t=window.innerWidth;return t<this.parameters.mobilePortraitScreenWidth?[i.DeviceMode.MOBILE,i.DeviceOrientation.PORTRAIT]:t<this.parameters.mobileLandscapeScreenWidth?[i.DeviceMode.MOBILE,i.DeviceOrientation.LANDSCAPE]:t<this.parameters.tabletPortraitScreenWidth?[i.DeviceMode.TABLET,i.DeviceOrientation.PORTRAIT]:t<this.parameters.tabletLandscapeScreenWidth?[i.DeviceMode.TABLET,i.DeviceOrientation.LANDSCAPE]:t<this.parameters.desktopPortraitScreenWidth?[i.DeviceMode.DESKTOP,i.DeviceOrientation.PORTRAIT]:[i.DeviceMode.DESKTOP,i.DeviceOrientation.LANDSCAPE]},i.prototype._getDeviceDevice=function(t){return n===!0?i.DeviceMode.MOBILE:s&&t!=i.DeviceMode.MOBILE?i.DeviceMode.TABLET:t},i.prototype._getDeviceZoom=function(t){var e;this.orientationMode==i.OrientationMode.ADMIN_PORTRAIT?e=i.DeviceOrientation.PORTRAIT:this.orientationMode==i.OrientationMode.ADMIN_LANDSCAPE&&(e=i.DeviceOrientation.LANDSCAPE);var s=i.DeviceMode.DESKTOP;return t-this.parameters.ratioToDevice[i._DeviceOrientation[e]].mobile<.001?s=i.DeviceMode.MOBILE:t-this.parameters.ratioToDevice[i._DeviceOrientation[e]].tablet<.001&&(s=i.DeviceMode.TABLET),s},i.prototype.updateOffsets=function(){if(this.focusOffsetTop=0,""!==this.parameters.focus.offsetTop)for(var e=t(this.parameters.focus.offsetTop),i=0;i<e.length;i++)this.focusOffsetTop+=e.eq(i).outerHeight();if(this.focusOffsetBottom=0,""!==this.parameters.focus.offsetBottom)for(var s=t(this.parameters.focus.offsetBottom),i=0;i<s.length;i++)this.focusOffsetBottom+=s.eq(i).outerHeight()},i.prototype.doPixelSnapping=function(){var t=this.containerElementPadding[0].getBoundingClientRect().left+this.pixelSnappingFraction,e=Math.max(0,t%1);e!==this.pixelSnappingFraction&&(this.containerElementPadding.css({marginLeft:-e+"px",marginRight:-e+"px"}),this.pixelSnappingFraction=e)},i.prototype.doResize=function(e,s,n,r){if(this.doPixelSnapping(),this.updateOffsets(),this.disableTransitions||(this.disableTransitions=!0,this.sliderElement.addClass("n2notransition"),this.disableTransitionsTimeout&&clearTimeout(this.disableTransitionsTimeout),this.disableTransitionsTimeout=setTimeout(t.proxy(function(){this.sliderElement.removeClass("n2notransition"),this.disableTransitions=!1},this),500)),!this.containerElementPadding.is(":visible"))return!1;this.refreshMargin();var o;if("center"===this.slider.parameters.align&&("fullpage"===this.parameters.type?this.alignElement.css("maxWidth","none"):(o=this.responsiveDimensions.startWidth,this.staticSizes&&(o+=this.staticSizes.paddingLeft+this.staticSizes.paddingRight),this.alignElement.css("maxWidth",o))),!this.slider.isAdmin&&this.parameters.forceFull){"none"!==this.parameters.forceFullOverflowX&&t(this.parameters.forceFullOverflowX).css("overflow-x","hidden");var a=0,l=0;if(""!==this.parameters.forceFullHorizontalSelector){var h=this.sliderElement.closest(this.parameters.forceFullHorizontalSelector);h&&h.length>0&&(a=h.width(),l=h.offset().left)}var d,p=a>0?a:document.body.clientWidth||document.documentElement.clientWidth,c=this.containerElement.parent(),u=c.offset().left;d=n2const.rtl.isRtl?p-(u+c.outerWidth()):u,this.containerElement.css(n2const.rtl.marginLeft,-d-parseInt(c.css("paddingLeft"))-parseInt(c.css("borderLeftWidth"))+l).width(p)}var m=this.containerElementPadding.width()/this.getOuterWidth(),f=!1,y=this.orientation,g=this.deviceMode,v=null,S=null;if(this.orientationMode===i.OrientationMode.SCREEN_WIDTH_ONLY){var x=this._getDeviceAndOrientationByScreenWidth();S=x[0],v=x[1]}else v=this._getOrientation();if(this.orientation!==v&&(this.orientation=v,f=!0,this.sliderElement.trigger("SliderOrientation",{lastOrientation:i._DeviceOrientation[y],orientation:i._DeviceOrientation[v]})),this.orientationMode!==i.OrientationMode.SCREEN_WIDTH_ONLY&&(S=this._getDevice(m)),this.deviceMode!==S&&(this.deviceMode=S,this.sliderElement.removeClass("n2-ss-"+i._DeviceMode[g]).addClass("n2-ss-"+i._DeviceMode[S]),this.sliderElement.trigger("SliderDevice",{lastDevice:i._DeviceMode[g],device:i._DeviceMode[S]}),f=!0),!this.slider.isAdmin&&"fullpage"===this.parameters.type){var b=0;if("100vh"===this.parameters.sliderHeightBasedOn)b=window.n2ClientHeight||this.$viewportHeight.height();else if(window.matchMedia&&/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||window.opera)){var w,A=!1;e&&"orientationchange"===e.type&&(A=!0),w=n2const.isIOS?document.documentElement.clientHeight:window.innerHeight,window.matchMedia("(orientation: landscape)").matches?(b=Math.min(screen.width,w),90!=this.lastOrientation&&(A=!0,this.lastOrientation=90)):(b=Math.min(screen.height,w),0!=this.lastOrientation&&(A=!0,this.lastOrientation=0)),b=window.n2ClientHeight||b;var E=t.now(),C=100;/SamsungBrowser/i.test(navigator.userAgent)&&(C=150),!A&&Math.abs(b-this.lastClientHeight)<C&&E-this.lastClientHeightTime>400?b=this.lastClientHeight:(this.lastClientHeight=b,this.lastClientHeightTime=E)}else b=window.n2ClientHeight||document.documentElement.clientHeight||document.body.clientHeight;n2const.isBot&&(b=Math.min(b,document.documentElement.clientWidth||document.body.clientWidth)),this.parameters.maximumHeightRatio[this.getDeviceModeOrientation()]=this.parameters.minimumHeightRatio=(b-this.getVerticalOffsetHeight())/this.responsiveDimensions.startHeight}if(f){this.invalidateResponsiveState=!0;var T=this._normalizeMode(i._DeviceMode[g],i._DeviceOrientation[y]),D=this._normalizeMode(i._DeviceMode[this.deviceMode],i._DeviceOrientation[this.orientation]);T[0]===D[0]&&T[1]===D[1]||(this.normalizedMode=D[0]+D[1],this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:T[0],lastOrientation:T[1],device:D[0],orientation:D[1]}))}var k=this.parameters.sliderWidthToDevice[this.normalizedMode]/this.parameters.sliderWidthToDevice.desktopPortrait;!this.parameters.downscale&&k>m?m=k:!this.parameters.upscale&&m>k&&(m=k),this._doResize(m,s,n,r),"center"===this.slider.parameters.align&&(o=this.responsiveDimensions.slider.width,this.staticSizes&&(o+=this.staticSizes.paddingLeft+this.staticSizes.paddingRight),this.responsiveDimensions&&(o+=this.responsiveDimensions.startSliderMarginhorizontal),this.alignElement.css("maxWidth",o))},i.prototype._normalizeMode=function(t,e){return this.parameters.normalizedDeviceModes[t+e]},i.prototype.getNormalizedModeString=function(){var t=this._normalizeMode(i._DeviceMode[this.deviceMode],i._DeviceOrientation[this.orientation]);return t.join("")},i.prototype.getModeString=function(){return i._DeviceMode[this.deviceMode]+i._DeviceOrientation[this.orientation]},i.prototype.enabled=function(t,e){return this.parameters.deviceModes[t+e]},i.prototype._doResize=function(e,i,s,n){var r={ratio:e,w:e,h:e,slideW:e,slideH:e,fontRatio:1};this._buildRatios(r,this.slider.parameters.dynamicHeight,s),r.fontRatio=r.slideW;var o=!1;for(var a in r)if(r[a]!=this.lastRawRatios[a]){o=!0;break}(this.invalidateResponsiveState||o)&&(this.lastRawRatios=t.extend({},r),this.resizeHorizontalElements(r),this.finishResize(r,i,n))},i.prototype.finishResize=function(e,i,s){this.loadDeferred.done(t.proxy(function(){var n=t.proxy(function(){this.finishResize=this._finishResize,this.finishResize(e,i,s)},this);/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor)||/CriOS/.exec(window.navigator.userAgent)?setTimeout(n,200):n()},this)),this.invalidateResponsiveState=!1},i.prototype._finishResize=function(t,e,i){this.invalidateResponsiveState=!1,t=this.updateVerticalRatios(t),this.resizeVerticalElements(t,e,i),this.lastRatios=t,e?(this.sliderElement.trigger("SliderAnimatedResize",[t,e,i]),e.eventCallback("onComplete",function(){this.triggerResize(t,e)},[],this)):this.triggerResize(t,!1)},i.prototype.doVerticalResize=function(){var e=this.updateVerticalRatios(t.extend({},this.lastRawRatios)),i=!1;for(var s in e)if(e[s]!=this.lastRatios[s]){i=!0;break}i&&this.finishVerticalResize(e)},i.prototype.finishVerticalResize=function(e){this.loadDeferred.done(t.proxy(function(){this.finishVerticalResize=this._finishVerticalResize,this.finishVerticalResize(e)},this))},i.prototype._finishVerticalResize=function(t){this.resizeVerticalElements(t,!1,0),this.lastRatios=t,this.triggerResize(t,!1)},i.prototype.triggerResize=function(t,e){this.sliderElement.trigger("SliderResize",[t,this,e])},i.prototype._buildRatios=function(t,i,s){var n=this.getDeviceModeOrientation();this.parameters.maximumSlideWidthRatio[n]>0&&t.slideW>this.parameters.maximumSlideWidthRatio[n]&&(t.slideW=this.parameters.maximumSlideWidthRatio[n]),t.slideW=t.slideH=Math.min(t.slideW,t.slideH);var r=this.parameters.verticalRatioModifiers[n];if(t.slideH*=r,"fullpage"===this.parameters.type)t.h*=r,this.parameters.minimumHeightRatio>0&&(t.h=Math.max(t.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[n]>0&&(t.h=Math.min(t.h,this.parameters.maximumHeightRatio[n])),this.slider.isAdmin?this.parameters.constrainRatio?(t.slideH=Math.min(t.slideH,t.h),t.slideH=t.slideW=Math.min(t.slideW,t.slideH)):(t.w=t.slideW,t.h=t.slideH):this.parameters.constrainRatio?(t.slideH=Math.min(t.slideH,t.h),t.slideH=t.slideW=Math.min(t.slideW,t.slideH)):(t.slideW=t.w,this.parameters.maximumSlideWidthRatio[n]>0&&t.slideW>this.parameters.maximumSlideWidthRatio[n]&&(t.slideW=this.parameters.maximumSlideWidthRatio[n]),t.slideH=t.h);else if(t.h*=r,this.parameters.minimumHeightRatio>0&&(t.h=Math.max(t.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[n]>0&&(t.h=Math.min(t.h,this.parameters.maximumHeightRatio[n])),t.slideH=Math.min(t.slideH,t.h),t.slideW=t.slideH/r,"showcase"===this.slider.type&&(t.slideW=Math.min(t.slideW,t.w),t.slideH=Math.min(t.slideW,t.slideH)),i){var o;if(s!==e&&s.background.elements.image!==e?o=s.background.elements.image:this.slider.currentSlide.background.elements.image!==e&&(o=this.slider.currentSlide.background.elements.image),o!==e&&o.width>0&&o.height>0){var a=this.responsiveDimensions.startSlideWidth/o.width*(o.height/this.responsiveDimensions.startSlideHeight);a>0&&(t.slideH*=a,t.h*=a)}}this.sliderElement.triggerHandler("responsiveBuildRatios",[t])},i.prototype.getVerticalOffsetHeight=function(){if(this.isFullScreen)return 0;var t=this.focusOffsetTop+this.focusOffsetBottom;if(this.slider.widgets.$vertical)for(var e=0;e<this.slider.widgets.$vertical.length;e++)t+=this.slider.widgets.$vertical.eq(e).outerHeight();return t+this.parameters.decreaseSliderHeight},i.prototype.addMargin=function(t,e){this.widgetMargins[t].push(e),e.isVisible()&&(this._addMarginSize(t,e.getSize()),this.enabledWidgetMargins.push(e)),this.doNormalizedResize()},i.prototype.addStaticMargin=function(t,e){"Bottom"!=t&&"Top"!=t&&(this.widgetStaticMargins||(this.widgetStaticMargins={Top:[],Right:[],Bottom:[],Left:[]}),this.widgetStaticMargins[t].push(e),this.doNormalizedResize())},i.prototype.refreshMargin=function(){for(var e in this.widgetMargins)for(var i=this.widgetMargins[e],s=i.length-1;s>=0;s--){var n=i[s];if(n.isVisible())-1==t.inArray(n,this.enabledWidgetMargins)&&(this._addMarginSize(e,n.getSize()),this.enabledWidgetMargins.push(n));else{var r=t.inArray(n,this.enabledWidgetMargins);-1!=r&&(this._addMarginSize(e,-n.getSize()),this.enabledWidgetMargins.splice(r,1))}}this.refreshStaticSizes()},i.prototype.refreshStaticSizes=function(){if(this.widgetStaticMargins){var t={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0};for(var e in this.widgetStaticMargins)for(var i=this.widgetStaticMargins[e],s=i.length-1;s>=0;s--){var n=i[s];n.isVisible()&&(t["padding"+e]+=n.getSize())}for(var r in t)this.containerElementPadding.css(t);this.staticSizes=t}},i.prototype._addMarginSize=function(t,e){var i=null;switch(t){case"Top":case"Bottom":i=this._sliderVertical;break;default:i=this._sliderHorizontal}i.data["margin"+t]+=e,this.responsiveDimensions["startSliderMargin"+t]+=e},i}),N2D("SmartSliderResponsiveElement",function(t,e){function i(e,i,s,n,r){this._lastRatio=1,this.responsive=e,this.ratioName=i,this.element=s,this._readyDeferred=t.Deferred(),"undefined"!=typeof r?this.name=r:this.name=null,this.data={},this.helper={parent:null,parentProps:null,fontSize:!1,centered:!1},this._lateInit(n)}return i.prototype._lateInit=function(e){this._cssProperties=e,this.reloadDefault(),-1!=t.inArray("fontSize",e)&&(this.data.fontSize=this.element.data("fontsize"),this.helper.fontSize={fontSize:this.element.data("fontsize"),desktopPortrait:this.element.data("minfontsizedesktopportrait"),desktopLandscape:this.element.data("minfontsizedesktoplandscape"),tabletPortrait:this.element.data("minfontsizetabletportrait"),tabletLandscape:this.element.data("minfontsizetabletlandscape"),mobilePortrait:this.element.data("minfontsizemobileportrait"),mobileLandscape:this.element.data("minfontsizemobilelandscape")},this.responsive.sliderElement.on("SliderDeviceOrientation",t.proxy(this.onModeChange,this))),this.resize=this._resize,this._readyDeferred.resolve()},i.prototype.reloadDefault=function(){for(var t=0;t<this._cssProperties.length;t++){var e=this._cssProperties[t];this.data[e]=parseInt(this.element.css(e))}if(this.name){var i=this.responsive.responsiveDimensions;for(var s in this.data)i["start"+N2Classes.StringHelper.capitalize(this.name)+N2Classes.StringHelper.capitalize(s)]=this.data[s]}},i.prototype.ready=function(t){this._readyDeferred.done(t)},i.prototype.resize=function(e,i){this.ready(t.proxy(this.resize,this,e,i)),this._lastRatio=i},i.prototype._resize=function(t,e,i,s){this.name&&"undefined"==typeof t[this.name]&&(t[this.name]={});var n={};for(var r in this.data){var o=this.data[r]*e;"function"==typeof this[r+"Prepare"]&&(o=this[r+"Prepare"](o)),this.name&&(t[this.name][r]=o),n[r]=o}if(i)i.to(this.element,s,n,0);else if(this.element.css(n),this.helper.centered){var a=this.getVerticalMargin(parseInt((this.helper.parent.height()-this.element.height())/2)),l=this.getHorizontalMargin(parseInt((this.helper.parent.width()-this.element.width())/2));this.element.css({marginLeft:l,marginRight:l,marginTop:a,marginBottom:a})}this._lastRatio=e},i.prototype.getHorizontalMargin=function(t){return t},i.prototype.getVerticalMargin=function(t){return t},i.prototype._refreshResize=function(){this.responsive.ready.done(t.proxy(function(){this._resize(this.responsive.responsiveDimensions,this.responsive.lastRatios[this.ratioName])},this))},i.prototype.widthPrepare=function(t){return Math.round(t)},i.prototype.heightPrepare=function(t){return Math.round(t)},i.prototype.marginLeftPrepare=function(t){return parseInt(t)},i.prototype.marginRightPrepare=function(t){return parseInt(t)},i.prototype.lineHeightPrepare=function(t){return t+"px"},i.prototype.borderLeftWidthPrepare=function(t){return parseInt(t)},i.prototype.borderRightWidthPrepare=function(t){return parseInt(t)},i.prototype.borderTopWidthPrepare=function(t){return parseInt(t)},i.prototype.borderBottomWidthPrepare=function(t){return parseInt(t)},i.prototype.fontSizePrepare=function(t){var e=this.responsive.getNormalizedModeString();return t<this.helper.fontSize[e]&&(t=this.helper.fontSize[e]),N2Classes.FontSize.toRem(t)},i.prototype.setCentered=function(){this.helper.parent=this.element.parent(),this.helper.centered=!0},i.prototype.unsetCentered=function(){this.helper.centered=!1},i.prototype.onModeChange=function(){this.setFontSizeByMode()},i.prototype.setFontSizeByMode=function(){this.element.css("fontSize",this.fontSizePrepare(this.data.fontSize*this._lastRatio))},i}),N2D("FrontendItemAnimatedHeading",function(t,e){function i(e,i){if(this.slider=i,this.$el=t(e),this.$wrapper=this.$el.parent(),this.refreshJustifyContent(),this.$texts=this.$el.find(".n2-ss-animated-heading-i-text"),!this.isEmpty(this.$texts)){if(window.parent.tpEditorApp)return this.$texts.css({position:"static",margin:"0 10px"}),void this.$el.find(".n2-ss-animated-heading-i2").css("white-space","normal");if(i.disabled.layerAnimations)return this.$texts.eq(0).css("position","static"),void this.$texts.not(":eq(0)").css("display","none");this.garbage=[],this.$layer=this.$el.closest(".n2-ss-layer"),this.$el.siblings(".n2-ss-animated-heading-before,.n2-ss-animated-heading-after").each(function(){for(var e=t(this),i=e.html().split(" "),s=e.attr("class"),n=[],r=0;r<i.length;r++)n.push('<div class="'+s+'">'+i[r]+"&nbsp;</div>");e.replaceWith(n.join(""))}),this.start()}}var s={fade:{fn:"animateWhole",fixedWidth:!0,data:{duration:.6,overlap:0,ease:"easeInOutQuad",from:{opacity:0},current:{opacity:1},to:{opacity:0}}},slide:{fn:"animateWhole",fixedWidth:!0,data:{duration:.6,overlap:0,ease:"easeInOutQuad",from:{opacity:0,x:"100%"},current:{opacity:1,x:"0%"},to:{opacity:0,x:"-100%"}}},rotating:{fn:"animateWhole",fixedWidth:!0,data:{overflow:!0,duration:.6,overlap:.2,ease:"easeInOutQuad",transformOrigin:"50% 100% 0",from:{opacity:0,rotationX:"-70deg"},current:{opacity:1,rotationX:"0deg"},to:{opacity:0,rotationX:"70deg"}}},"drop-in":{fn:"animateWhole",fixedWidth:!0,data:{overflow:!0,duration:.6,overlap:.3,ease:"easeInOutQuad",from:{opacity:0,scale:1.2},current:{opacity:1,scale:1},to:{opacity:0,scale:.6}}},"slide-down":{fn:"animateWhole",fixedWidth:!0,data:{duration:.6,overlap:.6,ease:"easeInOutQuad",from:{opacity:0,y:"-100%"},current:{opacity:1,y:"0%"},to:{opacity:0,y:"100%"}}},typewriter1:{fn:"animateTypeWriter",data:{backspace:function(t){this.timeline.staggerFromTo(t,.1*this.speedModifier,{display:"inline-block"},{display:"none",immediateRender:!1},-.1*this.speedModifier,"+="+this.showDuration)},backspaceDuration:function(t){return this.showDuration+.1*this.speedModifier+.1*(t.length-1)*this.speedModifier}}},typewriter2:{fn:"animateTypeWriter",data:{backspace:function(t,e){this.timeline.set(e,{className:"+=n2-ss-animated-heading-i-selection",background:this.color},"+="+this.showDuration),this.timeline.set(e,{css:{color:"#"+this.color2}}),this.timeline.set(e,{className:"-=n2-ss-animated-heading-i-selection",background:""},"+=0.5"),this.timeline.set(e,{clearProps:"color"}),this.timeline.set(t,{display:"none"})},backspaceDuration:function(t){return this.showDuration+.5}}},chars:{fn:"animateChars",fixedWidth:!0,data:{duration:.4,stagger:.05,ease:"easeOutCubic",from:{scale:0,opacity:0},current:{scale:1,opacity:1},to:{scale:0,opacity:0}}},chars2:{fn:"animateChars",fixedWidth:!0,data:{duration:.4,stagger:.05,ease:"easeOutCubic",from:{rotationY:"90deg",opacity:0},current:{rotationY:"0deg",opacity:1},to:{rotationY:"-90deg",opacity:0}}}};return i.prototype.isEmpty=function(e){return!t.trim(e.html())},i.prototype.start=function(){this.slider.started(t.proxy(this.started,this))},i.prototype.started=function(){this.type=this.$el.data("animation-type")||"slide",this.color=this.$el.data("color")||"RGBA(255,255,255,1)",this.color2=this.$el.data("color2")||"000000",this.currentType=s[this.type],this.currentType.fixedWidth?this.animateWidth=0===this.$el.data("animate-width")?0:1:this.animateWidth=0,this.delay=(+this.$el.data("delay")||0)/1e3,this.speedModifier=1/(Math.max(+this.$el.data("speed")||100,0)/100),this.showDuration=Math.max(+this.$el.data("show-duration")||1500,0)/1e3,this.loop=+this.$el.data("loop")||0,this.totalDuration=0;var e=this.currentType.data,i=this.$texts.length,n=i;switch(this.loop&&n++,this.currentType.fn){case"animateWhole":var r=0,o=0;this.animateWidth?r=.4*.8:o=e.overlap*this.speedModifier,this.totalDuration=(n-1)*this.showDuration+2*(n-1)*e.duration*this.speedModifier+(n-1)*r-(n-1)*o;break;case"animateTypeWriter":for(var a=0;n>a;a++){var l=this.getSplitTextChars(this.$texts.eq(i===a?0:a));a>0&&(this.totalDuration+=.8+.2*this.speedModifier+.2*this.speedModifier*(l.length-1)),n-1>a&&(this.totalDuration+=e.backspaceDuration.call(this,l))}break;case"animateChars":for(var o=0,a=0;n>a;a++){var h=this.$texts.eq(i===a?0:a),l=this.getSplitTextChars(h);a>0&&(this.totalDuration+=Math.max(o,e.duration*this.speedModifier+(l.length-1)*e.stagger)),n-1>a&&(this.totalDuration+=this.showDuration,o=e.duration*this.speedModifier+(l.length-1)*e.stagger)}}this.$layer.on("collectRelatedAnimations.animatedHeading",t.proxy(this.collectRelatedAnimations,this)),this.slider.sliderElement.on("SliderResizeHorizontal",t.proxy(function(){this.onResize()},this)),this.onResize()},i.prototype.onResize=function(){this.size={height:0},this.currentType.fixedWidth&&!this.animateWidth&&(this.size.width=0);for(var t=0;t<this.$texts.length;t++){var e=this.$texts.eq(t).addClass("n2-ss-animated-heading-measure-width"),i=e.outerWidth()+4,s=e.outerHeight();e.removeClass("n2-ss-animated-heading-measure-width"),e.data("width",i),e.data("height",s),this.size.height=Math.max(this.size.height,s),this.currentType.fixedWidth&&!this.animateWidth&&(this.size.width=Math.max(this.size.width,i))}this.currentType.fixedWidth&&this.animateWidth?(this.size.width=this.$texts.eq(0).data("width"),this.$el.css(this.size),this.invalidate()):this.$el.css(this.size),this.refreshJustifyContent()},i.prototype.invalidate=function(){if(this.timeline){var t=this.timeline.time();this.timeline.invalidate().time(t,!0)}},i.prototype.collectRelatedAnimations=function(t,e){1===this.loop?(this.loopTimeline=new N2Classes.AnimationsLoopTimeline(this,0),e.loop.push(this.loopTimeline)):e["in"].push(new N2Classes.AnimationsRelated(this,"extendTimeline"))},i.prototype.getTimeline=function(){return this.timeline===e?(this.timeline=new NextendTimeline({paused:1}),this[this.currentType.fn](this.currentType.data),this.timeline.delay(this.delay)):this.timeline.invalidate(),this.timeline},i.prototype.getLoopTimeline=function(){return this.getTimeline()},i.prototype.extendTimeline=function(t,e,i){var s=this.getTimeline();t.add(s,0),s.paused(!1)},i.prototype.getSplitTextChars=function(t){var e=t.data("splitTextChars");return e||(new NextendSplitText(t[0],{type:"words,chars"}),t.contents().filter(function(){return 3===this.nodeType&&!/\S/.test(this.nodeValue)}).replaceWith('<div style="position: relative; display: inline-block;">&nbsp;</div>'),e=t.find(":not(:has(*))"),t.data("splitTextChars",e)),e},i.prototype.animateChars=function(e){this.$el.css("overflow","hidden"),this.animateWidth&&this.timeline.set(this.$el,{width:t.proxy(function(){return this.data("width")},this.$texts.eq(0)),roundProps:["width"],rotationZ:"0.00001deg",immediateRender:!0,ease:N2Classes.Linear});var i=0,s=this.$texts.length,n=s;this.loop&&n++;for(var r=0;n>r;r++){var o=this.$texts.eq(s===r?0:r),a=this.getSplitTextChars(o);if(NextendTween.set(a,{transformPerspective:1e3,"will-change":"transform, opacity"}),r>0){var l=this.timeline.totalDuration()-i;this.timeline.staggerFromTo(a,e.duration*this.speedModifier,t.extend({},e.from),t.extend({immediateRender:s>r,ease:e.ease},e.current),e.stagger,l),this.animateWidth&&this.timeline.to(this.$el,this.timeline.recent().duration(),{width:t.proxy(function(){return this.data("width")},o)},l)}n-1>r&&(this.timeline.staggerFromTo(a,e.duration*this.speedModifier,t.extend({},e.current),t.extend({immediateRender:0===r,ease:e.ease},e.to),e.stagger,"+="+this.showDuration),i=this.timeline.recent().duration())}this.garbage.push(function(){this.animateWidth&&this.$el.css("width",""),this.$el.css("overflow","")})},i.prototype.displayCursor=function(){var e=t('<div class="n2-ss-animated-heading-i-cursor"></div>').css("background-color",this.color).appendTo(this.$texts.parent()),i=new NextendTimeline({onComplete:function(){this.restart()}});i.fromTo(e,.1,{opacity:0},{opacity:1},"+=0.5"),i.fromTo(e,.1,{opacity:1},{opacity:0,immediateRender:!1},"+=0.5"),this.garbage.push(function(){i.kill(),e.remove();
})},i.prototype.animateTypeWriter=function(t){this.$texts.css("position","relative"),this.timeline.set(this.getSplitTextChars(this.$texts.eq(0)),{display:"inline-block",immediateRender:!0});var e=this.$texts.length,i=e;this.loop&&i++;for(var s=0;i>s;s++){var n=this.getSplitTextChars(this.$texts.eq(e===s?0:s));s>0&&this.timeline.staggerFromTo(n,.2*this.speedModifier,{display:"none"},{display:"inline-block",immediateRender:e!==s},.2*this.speedModifier,"+=0.8"),i-1>s&&t.backspace.call(this,n,this.$texts.parent())}this.displayCursor()},i.prototype.animateWhole=function(e){e.overflow?this.$el.css("overflow",""):this.$el.css("overflow","hidden"),this.animateWidth&&this.timeline.set(this.$el,{width:t.proxy(function(){return this.data("width")},this.$texts.eq(0)),immediateRender:!0}),e.transformOrigin=e.transformOrigin||"50% 50% 0",this.timeline.set(this.$texts,{transformOrigin:e.transformOrigin,transformPerspective:1e3});var i=this.$texts.length,s=i;this.loop&&s++;for(var n=0;s>n;n++){var r=this.$texts.eq(i===n?0:n);if(n>0){var o=this.timeline.totalDuration();if(this.animateWidth){var a=.4;this.timeline.to(this.$el,a,{width:t.proxy(function(){return this.data("width")},r)},o-.2*a),o+=.8*a}else o-=e.overlap*this.speedModifier;this.timeline.fromTo(r,e.duration*this.speedModifier,t.extend({},e.from),t.extend({immediateRender:i>n,ease:e.ease},e.current),o)}s-1>n&&this.timeline.fromTo(r,e.duration*this.speedModifier,t.extend({},e.current),t.extend({immediateRender:0===n,ease:e.ease},e.to),"+="+this.showDuration)}this.garbage.push(function(){this.animateWidth&&this.$el.css("width",""),this.$el.css("overflow","")})},i.prototype.refreshJustifyContent=function(){var t="";switch(this.$wrapper.css("text-align")){case"left":t="flex-start";break;case"center":t="center";break;case"right":t="flex-end";break;case"justify":t="space-between"}this.$wrapper.css("justify-content",t)},i}),N2D("FrontendItemAudio",function(t,e){function i(e,i,n){return this.loadDeferred=t.Deferred(),this.slider=e,this.id=i,this.$node=t("#"+i),this.audio=this.$node.find("audio").get(0),this.audio?(this.$layer=this.$node.parent(),this.isStatic=this.$node.closest(".n2-ss-static-slide").length,this.slide=this.slider.findSlideByElement(this.$node),this.isPaused=!1,this.lastVolume=1,this.parameters=t.extend({autoplay:0,loop:0,reset:0,volume:1,show:1},n),1===parseInt(this.parameters.autoplay)&&0===parseInt(this.parameters.show)&&s.get(),t(this.audio).on({play:t.proxy(this.onPlay,this),pause:t.proxy(this.onPause,this),ended:t.proxy(this.onEnded,this),timeupdate:t.proxy(this.onTimeUpdate,this),volumechange:t.proxy(this.onVolumechange,this)}),void(this.audio.duration>=0?this.onReady():this.audio.addEventListener("loadedmetadata",t.proxy(this.onReady,this)))):void this.loadDeferred.reject()}function s(){window.AudioContext=window.AudioContext||window.webkitAudioContext,window.AudioContext!==e&&(this.interaction=new Promise(t.proxy(function(t,e){this.interactionResolver=t},this)),this.context=new AudioContext,this.cache={},this.currentSource=!1,this.interaction.then(t.proxy(this.ready,this)),this.playNothing(),setTimeout(t.proxy(function(){0===this.context.currentTime?this.userInteractionCatcher():this.interactionResolver()},this),100))}function n(t,e){this.player=t,this.context=t.context,this.$node=e,this.src=e.data("src"),this.playing=0,this.source=null}return i.prototype.safePlay=function(){this.safeCallback(t.proxy(function(){this.promise=this.audio.play(),this.promise&&Promise!==e&&this.promise["catch"](t.proxy(function(e){if(e.message.match("user denied permission")){var i=t("<div />").data("src",t(this.audio).find("source").attr("src")).on({play:t.proxy(this.onPlay,this),ended:t.proxy(this.onEnded,this)});this.fallbackAudio=s.get().createAudio(i),this.safePlay=this.safePlaySafari,this.safePlay()}else if("NotAllowedError"===e.name){var n=".ssLayerVideo"+this.counter;t("body").off(n).one("click"+n+" touchend"+n,t.proxy(function(){t("body").off(n),this.promise!==!1&&this.safePlay()},this))}},this))},this))},i.prototype.safePlaySafari=function(){s.get().play(this.fallbackAudio)},i.prototype.safePause=function(){this.safeCallback(t.proxy(function(){this.fallbackAudio===e?this.audio.pause():s.get().stop(this.fallbackAudio),this.promise=!1},this))},i.prototype.safeCallback=function(t){this.promise&&Promise!==e?this.promise.then(t)["catch"](t):t()},i.prototype.initAutoplay=function(){this.isStatic?this.safePlay():(this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(e,i,s,n,r){t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[n]))>=0&&this.safePlay()},this)),t.inArray(this.slide,this.slider.getVisibleSlides())>=0&&this.safePlay())},i.prototype.onReady=function(){this.$time=this.$node.find(".n2-ss-item-audio-time"),this.updateTime(),this.audio.volume=this.parameters.volume,this.$node.find(".n2-ss-item-audio-play").on("click",t.proxy(function(){this.safePlay()},this)),this.$node.find(".n2-ss-item-audio-pause").on("click",t.proxy(function(){this.safePause()},this)),this.$node.find(".n2-ss-item-audio-mute").on("click",t.proxy(function(){this.audio.volume=0},this)),this.$node.find(".n2-ss-item-audio-unmute").on("click",t.proxy(function(){this.audio.volume=this.lastVolume},this)),this.$progress=this.$node.find(".n2-ss-item-audio-progress-container").on("pointerdown",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.updateUITime(e),t("body").on({"pointermove.volume":t.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.updateUITime(t)},this),"pointerup.volume":t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.updateUITime(e),t("body").off(".volume")},this),"pointerleave.volume":t.proxy(function(){t("body").off(".volume")},this)})},this)),this.$playhead=this.$progress.find(".n2-ss-item-audio-progress-playhead"),this.$volume=this.$node.find(".n2-ss-item-audio-volume-container").on("pointerdown",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.updateUIVolume(e),t("body").on({"pointermove.volume":t.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.updateUIVolume(t)},this),"pointerup.volume":t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.updateUIVolume(e),t("body").off(".volume")},this),"pointerleave.volume":t.proxy(function(){t("body").off(".volume")},this)})},this)),this.$volumehead=this.$volume.find(".n2-ss-item-audio-volumehead"),1==this.parameters.autoplay&&this.slider.visible(t.proxy(this.initAutoplay,this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",t.proxy(function(t,e,i,s,n){s!=this.slideIndex&&this.safePause()},this)),parseInt(this.parameters.reset)&&this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(t,e,i,s,n){s!=this.slideIndex&&this.audio.currentTime>0&&(this.audio.currentTime=0)},this))),this.loadDeferred.resolve()},i.prototype.updateTime=function(){this.$time.html(this.timeFormat(this.audio.currentTime)+" / "+this.timeFormat(this.audio.duration))},i.prototype.onPlay=function(){this.isPaused=!1,this.$node.attr("data-state","playing"),requestAnimationFrame(t.proxy(this.refreshCurrentTime,this)),this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.id),this.$layer.triggerHandler("n2play")},i.prototype.onPause=function(){this.isPaused=!0,this.$node.attr("data-state","paused"),this.$layer.triggerHandler("n2pause")},i.prototype.onEnded=function(){1==this.parameters.loop?(this.audio.currentTime=0,this.safePlay()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.id),this.$layer.triggerHandler("n2stop"))},i.prototype.onTimeUpdate=function(){this.updateTime(),this.$playhead.css("width",this.audio.currentTime/this.audio.duration*100+"%")},i.prototype.onVolumechange=function(){this.$volumehead.css("width",100*this.audio.volume+"%"),this.$node.attr("data-volume",this.audio.volume),0!=this.audio.volume&&(this.lastVolume=this.audio.volume)},i.prototype.refreshCurrentTime=function(){this.$playhead.css("width",this.audio.currentTime/this.audio.duration*100+"%"),this.isPaused||requestAnimationFrame(t.proxy(this.refreshCurrentTime,this))},i.prototype.updateUITime=function(t){this.audio.currentTime=this.audio.duration*Math.max(0,Math.min(.99,Math.round(t.pageX-this.$progress.offset().left)/this.$progress.width()))},i.prototype.updateUIVolume=function(t){this.audio.volume=Math.max(0,Math.min(1,Math.round(t.pageX-this.$volume.offset().left)/this.$volume.width()))},i.prototype.timeFormat=function(t){t=parseInt(t);var e=[],i=parseInt(t/60);t-=60*i;var s=parseInt(i/60);return i-=60*s,s>0&&e.push(this.pad(s,2,0)),e.push(this.pad(i,2,0)),e.push(this.pad(t,2,0)),e.join(":")},i.prototype.pad=function(t,e,i){return i=i||"0",t+="",t.length>=e?t:new Array(e-t.length+1).join(i)+t},s.inst=null,s.get=function(){return null===s.inst&&(s.inst=new s),s.inst},s.prototype.createAudio=function(t){return new n(this,t)},s.prototype.ready=function(){this.play=this.afterReadyPlay,this.stop=this.afterReadyStop,this.preparedAudio!==e&&this.play(this.preparedAudio)},s.prototype.play=function(t){this.preparedAudio=t},s.prototype.stop=function(t){t===this.preparedAudio&&delete this.preparedAudio},s.prototype.afterReadyPlay=function(t){this.currentAudio=t,t.play()},s.prototype.afterReadyStop=function(t){this.currentAudio===t&&t.stop()},s.prototype.userInteractionCatcher=function(){t("body > *").one("click",t.proxy(function(){this.playNothing(),setTimeout(t.proxy(this.interactionResolver,this),30)},this))},s.prototype.playNothing=function(){var t=this.context.createBuffer(2,22050,44100),e=this.context.createBufferSource();e.buffer=t,e.connect(this.context.destination),e.start(0)},n.prototype.play=function(){return this.$node.trigger("play"),this.loadMusic(this.src).then(t.proxy(function(t){this.stop(),this.playing=1,this.source=this.playBuffer(t)},this))},n.prototype.stop=function(){1===this.playing&&this.source&&(this.source.stop(0),this.playing=0,this.$node.trigger("ended"))},n.prototype.playBuffer=function(e){var i=this.context.createBufferSource();return i.buffer=e,i.connect(this.context.destination),i.start(0),setTimeout(t.proxy(function(){this.$node.trigger("ended"),this.playing=0},this),1e3*e.duration),i},n.prototype.loadMusic=function(i){return this._load===e&&(this._load=new Promise(t.proxy(function(e,s){var n=new XMLHttpRequest;n.open("GET",i,!0),n.responseType="arraybuffer",n.onload=t.proxy(function(){this.context.decodeAudioData(n.response,t.proxy(function(t){e(t)}),function(t){s(t)})},this),n.send()},this))),this._load},i}),N2D("FrontendItemCaption",function(t,e){function i(e,i,s,n,r){this.startCSS=null,this.slider=e,this.mode=s,this.direction=n,this.scale=r,this.node=t("#"+i).on("mouseenter",t.proxy(this["in"],this)).on("mouseleave",t.proxy(this.out,this)),this.image=this.node.find("img"),this.content=this.node.find(".n2-ss-item-caption-content"),this["init"+s]()}return i.prototype.initSimple=function(){var e={height:"auto"};switch(this.direction){case"left":e.bottom=0,e.left="-100%",this.startCSS={left:"-100%"};break;case"right":e.bottom=0,e.right="-100%",this.startCSS={right:"-100%"};break;default:e.left=0,this.resizeSimple(),this.slider.sliderElement.on("SliderResize",t.proxy(this.resizeSimple,this)),this._out=this._outSimple}this.content.css(e)},i.prototype.resizeSimple=function(){var t={};t[this.direction]=-this.content.height(),this.content.css(t)},i.prototype._outSimple=function(){var t={};t[this.direction]=-this.content.height(),this.tweenContent(t)},i.prototype.initFull=function(){var t={};switch(this.direction){case"left":t.bottom=0,t.left="-100%",this.startCSS={left:"-100%"};break;case"right":t.bottom=0,t.right="-100%",this.startCSS={right:"-100%"};break;case"top":t.left=0,t.top="-100%",this.startCSS={top:"-100%"};break;case"bottom":t.left=0,t.bottom="-100%",this.startCSS={bottom:"-100%"}}this.content.css(t)},i.prototype.initFade=function(){this.content.css({opacity:0,left:0,top:0}),this._in=this._inFade,this._out=this._outFade},i.prototype._inFade=function(){this.tweenContent({opacity:1})},i.prototype._outFade=function(){this.tweenContent({opacity:0})},i.prototype["in"]=function(){this._in(),this.scale&&this.tweenImage({scale:1.2})},i.prototype._in=function(){var t={};t[this.direction]=0,this.tweenContent(t)},i.prototype.out=function(){this._out(),this.scale&&this.tweenImage({scale:1})},i.prototype._out=function(){this.tweenContent(this.startCSS)},i.prototype.tweenContent=function(t){NextendTween.to(this.content,.5,t)},i.prototype.tweenImage=function(t){NextendTween.to(this.image,.5,t)},i}),N2D("FrontendItemCounter",function(t,e){function i(e,i,s){this.slider=e,this.data=s,this.currentPercent=0,this.node=t(i).data("counter",this),this.$layer=this.node.closest(".n2-ss-layer"),this.start()}return i.prototype.start=function(){this.slider.started(t.proxy(this.started,this))},i.prototype.started=function(){this.delay=(+this.data.delay||0)/1e3,this.data.displayMode&&(this.$display=this.node.find(this.data.display)),this.$countingDiv=this.node.find(this.data.counting),this.$layer.on("collectRelatedAnimations.counter",t.proxy(this.collectRelatedAnimations,this)),this.timeline=new NextendTimeline({paused:1});var e=t.proxy(this.update,this),i={_percent:this.data.fromPercent,get percent(){return this._percent},set percent(t){this._percent=t,e(t)}};this.currentPercent=this.data.fromPercent,this.timeline.fromTo(i,this.data.duration/1e3,{percent:this.data.fromPercent},this._animateData(i,this.data.toPercent))},i.prototype.collectRelatedAnimations=function(t,e){e["in"].push(new N2Classes.AnimationsRelated(this,"extendTimeline"))},i.prototype.extendTimeline=function(t,e,i){t.add(this.timeline,this.delay),this.timeline.paused(!1)},i.prototype._animateData=function(t,e,i){return i=i||"easeOutExpo",{percent:e,ease:i}},i.prototype.update=function(t){switch(this.currentPercent=t,this.data.displayMode){case"circle":this.$display.attr("stroke-dashoffset",(1-t)*this.data.c);break;case"width":this.$display.css("width",100*t+"%")}this.$countingDiv.html(this.data.pre+(this.data.min+t*(this.data.total-this.data.min)).toFixed(0)+this.data.post)},i}),N2D("FrontendItemHighlightedHeading",function(t,e){function i(e,i){this.slider=i,this.$el=t(e),this.$wrapper=this.$el.parent(),this.refreshJustifyContent(),this.slider.sliderElement.on("SliderResize",t.proxy(this.refreshJustifyContent,this)),this.$layer=this.$el.closest(".n2-ss-layer"),this.clean(),!i.disabled.layerAnimations&&this.$el.data("animate")&&(window.parent.tpEditorApp||(this.$el.siblings(".n2-ss-highlighted-heading-before,.n2-ss-highlighted-heading-after").each(function(){var e=t(this),i=e.html().split(" "),s=e.attr("class"),n=[];"n2-ss-highlighted-heading-after"===s&&n.push('<div class="'+s+'">&nbsp;</div>');for(var r=0;r<i.length;r++)n.push('<div class="'+s+'">'+i[r]+"&nbsp;</div>");e.replaceWith(n.join(""))}),this.start()))}return i.prototype.clean=function(){},i.prototype.start=function(){this.slider.started(t.proxy(this.started,this))},i.prototype.started=function(){this.delay=(+this.$el.data("delay")||0)/1e3,this.duration=Math.max(+this.$el.data("duration")||1500,1)/1e3,this.loop=+this.$el.data("loop")||0;var e=+this.$el.data("loop-delay");isFinite(e)||(e=2e3),this.loopDelay=e/1e3,this.$paths=this.$el.find("path"),this.totalDuration=.6*this.duration*(this.$paths.length-1)+this.duration,this.loop&&this.loopDelay>=0&&(this.totalDuration+=this.loopDelay+.8),this.$layer.on("collectRelatedAnimations.highlightedHeading",t.proxy(this.collectRelatedAnimations,this))},i.prototype.collectRelatedAnimations=function(t,e){1===this.loop?e.loop.push(new N2Classes.AnimationsLoopTimeline(this,0)):e["in"].push(new N2Classes.AnimationsRelated(this,"extendTimeline"))},i.prototype.extendTimeline=function(t,e,i){var s=this.getTimeline();t.add(s,0),s.paused(!1)},i.prototype.getTimeline=function(){if(this.timeline===e){for(var t=new NextendTimeline({paused:1}),i=0;i<this.$paths.length;i++)this.animatePath(t,this.$paths[i],.6*this.duration*i);this.loop&&this.loopDelay>=0&&(t.to(this.$paths,.4,{opacity:0},"+="+this.loopDelay),t.set({},{},"+=0.4")),t.delay(this.delay),this.timeline=t}return this.timeline},i.prototype.getLoopTimeline=function(){return this.getTimeline()},i.prototype.animatePath=function(t,e,i){var s=Math.round(1.01*(e.getTotalLength()||2e3));t.fromTo(e,.1,{opacity:0},{opacity:1},i),t.fromTo(e,this.duration,{"stroke-dasharray":"0 "+s},{"stroke-dasharray":s+" "+s},i)},i.prototype.refreshJustifyContent=function(){var t="";switch(this.$wrapper.css("text-align")){case"left":t="flex-start";break;case"center":t="center";break;case"right":t="flex-end";break;case"justify":t="space-between"}this.$wrapper.css("justify-content",t)},i}),N2D("FrontendItemHeadingSplitText",function(t,e){function i(i,s,n,r,o,a,l,h){if((o||l)&&!i.disabled.layerAnimations&&!i.disabled.layerSplitTextAnimations){this.node=t("#"+s),this.slider=i,this.splitText=!1;var d=this.node.find("a");d.length&&(this.node=d),this.$layer=this.node.closest(".n2-ss-layer"),this["in"]={options:!1,totalDuration:0,timeline:e,invalidate:!1},this.out={options:!1,totalDuration:0,timeline:e,invalidate:!1},this.start(n,r,o,a,l,h)}}var s={opacity:1,x:0,y:0,rotationX:0,rotationY:0,rotationZ:0,scale:1};return i.prototype.start=function(e,i,s,n,r,o){this.slider.started(t.proxy(this.started,this,e,i,s,n,r,o))},i.prototype.started=function(e,i,s,n,r,o){var a={chars:0,words:0,lines:0};s&&(this["in"].options=this.optimize(s.data,n),a[this["in"].options.mode]=1),r&&(this.out.options=this.optimize(r.data,o),a[this.out.options.mode]=1),this.modes=[];for(var l in a)a[l]&&this.modes.push(l);a.chars&&!a.words&&this.modes.push("words"),this.splitText=new NextendSplitText(this.node,{type:this.modes.join(",")});var h,d;if(this["in"].options){switch(h=this["in"].options,d=this.splitText[h.mode].length,h.sort){case"side":case"center":d=Math.ceil(d/2)}this["in"].totalDuration=(d-1)*Math.abs(h.stagger)+h.duration}if(this.out.options){switch(h=this.out.options,d=this.splitText[h.mode].length,h.sort){case"side":case"center":d=Math.ceil(d/2)}this.out.totalDuration=(d-1)*Math.abs(h.stagger)+h.duration}(this["in"].options||this.out.options)&&this.$layer.on("collectRelatedAnimations.splitText",t.proxy(this.collectRelatedAnimations,this)),NextendTween.set(this.$layer,{perspective:1e3}),this.node.css("text-rendering","auto");for(var l in a)a[l]&&NextendTween.set(this.splitText[l],{transformOrigin:e,backfaceVisibility:i})},i.prototype.getTimelineIn=function(){this["in"].timeline=new NextendTimeline({paused:1});var e=this["in"].options,i={ease:e.ease};return this._animate(this["in"].timeline,e.mode,e.sort,e.duration,t.extend(!0,{},e.from),t.extend(!0,i,s),e.stagger),this["in"].timeline},i.prototype.getTimelineOut=function(){this.out.timeline=new NextendTimeline({paused:1});var e=this.out.options,i={ease:e.ease};return this["in"].timeline&&(i.immediateRender=!1),this._animate(this.out.timeline,e.mode,e.sort,e.duration,t.extend(!0,{},s),t.extend(!0,i,e.from),-e.stagger),this.out.timeline},i.prototype.collectRelatedAnimations=function(t,e){this["in"].options&&e["in"].push(new N2Classes.AnimationsRelated(this,"extendTimelineIn")),this.out.options&&e.out.push(new N2Classes.AnimationsRelated(this,"extendTimelineOut"))},i.prototype.extendTimelineIn=function(t){var e=this.getTimelineIn();t.add(e,this["in"].options.delay),e.paused(!1)},i.prototype.extendTimelineOut=function(t){var e=this.getTimelineOut();t.add(e,this.out.options.delay),e.paused(!1)},i.prototype._animate=function(e,i,s,n,r,o,a){var l=t.extend([],this.splitText[i]),h=null,d=[];switch(s){case"reversed":l.reverse();break;case"random":var p=function(t,e,i,s){for(i=t.length;i;)e=Math.random()*i--|0,s=t[i],t[i]=t[e],t[e]=s};p(l);break;case"side":case"center":for(h=[];l.length>1;)d.push(l.shift()),h.push(l.pop());1===l.length&&d.push(l.shift()),l=d,"center"===s&&(l.reverse(),h.reverse());break;case"sideShifted":case"centerShifted":for(;l.length>1;)d.push(l.shift()),d.push(l.pop());1===l.length&&d.push(l.shift()),l=d,"centerShifted"===s&&l.reverse()}e.staggerFromTo(l,n,r,o,a,0),h&&h.length&&e.staggerFromTo(h,n,r,o,a,0)},i.prototype.optimize=function(t,e){var i={mode:t.mode,sort:t.sort,duration:t.duration,stagger:t.stagger,delay:e,from:{},ease:t.ease};return 1!=t.opacity&&(i.from.opacity=t.opacity),1!=t.scale&&(i.from.scale=t.scale),0!=t.x&&(i.from.x=t.x),0!=t.y&&(i.from.y=t.y),0!=t.rotationX&&(i.from.rotationX=t.rotationX),0!=t.rotationY&&(i.from.rotationY=t.rotationY),0!=t.rotationZ&&(i.from.rotationZ=t.rotationZ),i},i}),N2D("FrontendItemTransition",function(t,e){function i(e,i,s){this.slider=e,(n2const.isIE||n2const.isEdge)&&(s="Fade"),this.animation=s,this.node=t("#"+i).on("mouseenter",t.proxy(this["in"+s],this)).on("mouseleave",t.proxy(this["out"+s],this)),this.images=this.node.find("img"),this.inner=this.node.find(".n2-ss-item-transition-inner"),this["init"+s]()}return i.prototype.initFade=function(){this.images.eq(1).css("opacity",0)},i.prototype.inFade=function(){NextendTween.to(this.images.eq(1),.5,{opacity:1}),NextendTween.to(this.images.eq(0),.5,{opacity:0})},i.prototype.outFade=function(){NextendTween.to(this.images.eq(1),.5,{opacity:0}),NextendTween.to(this.images.eq(0),.5,{opacity:1})},i.prototype.initVerticalFlip=function(){NextendTween.set(this.inner,{perspective:1e3}),NextendTween.set(this.images.eq(0),{rotationX:0,backfaceVisibility:"hidden"}),NextendTween.set(this.images.eq(1),{rotationX:180,backfaceVisibility:"hidden"})},i.prototype.inVerticalFlip=function(){NextendTween.to(this.images.eq(0),.5,{rotationX:-180,backfaceVisibility:"hidden"}),NextendTween.to(this.images.eq(1),.5,{rotationX:0,backfaceVisibility:"hidden"})},i.prototype.outVerticalFlip=function(){NextendTween.to(this.images.eq(0),.5,{rotationX:0,backfaceVisibility:"hidden"}),NextendTween.to(this.images.eq(1),.5,{rotationX:180,backfaceVisibility:"hidden"})},i.prototype.initHorizontalFlip=function(){NextendTween.set(this.inner,{perspective:1e3}),NextendTween.set(this.images.eq(0),{rotationY:0,backfaceVisibility:"hidden"}),NextendTween.set(this.images.eq(1),{rotationY:180,backfaceVisibility:"hidden"})},i.prototype.inHorizontalFlip=function(){NextendTween.to(this.images.eq(0),.5,{rotationY:-180,backfaceVisibility:"hidden"}),NextendTween.to(this.images.eq(1),.5,{rotationY:0,backfaceVisibility:"hidden"})},i.prototype.outHorizontalFlip=function(){NextendTween.to(this.images.eq(0),.5,{rotationY:0,backfaceVisibility:"hidden"}),NextendTween.to(this.images.eq(1),.5,{rotationY:180,backfaceVisibility:"hidden"})},i}),N2D("FrontendItemVideo",function(t,e){function i(e,i,n){this.state={scroll:!1,slide:!1,visible:!0,play:!1,continuePlay:!1},this.counter=s++,this.slider=e,this.playerId=i,this.playerElement=t("#"+this.playerId),this.videoPlayer=this.playerElement.get(0),this.parameters=t.extend({autoplay:0,loop:0,center:0,reset:0},n),this.slide=e.findSlideByElement(this.videoPlayer);var r=this.playerElement.data("volume");0===r?(this.videoPlayer.volume=1,this.videoPlayer.muted=!0):(this.videoPlayer.volume=r,this.videoPlayer.muted=!1),this.slider.sliderElement.on("BeforeVisible",t.proxy(function(){this.videoPlayer.videoWidth>0?this.initVideoPlayer():this.videoPlayer.addEventListener("loadedmetadata",t.proxy(this.initVideoPlayer,this))},this))}var s=1;return i.prototype.initVideoPlayer=function(){1===parseInt(this.parameters.center)&&(this.onResize(),this.slider.sliderElement.on("SliderResize",t.proxy(this.onResize,this)));var e=this.playerElement.closest(".n2-ss-layer");e.on("visibilityChange",t.proxy(function(){this.playerElement.is(":visible")?this.setState("visible",!0,!0):this.setState("visible",!1,!0)},this)),this.isStatic=e.closest(".n2-ss-static-slide").length,this.playerElement.on("playing",t.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),e.triggerHandler("n2play")},this)).on("ended",t.proxy(function(){1===parseInt(this.parameters.loop)?(this.videoPlayer.currentTime=0,this.safePlay()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),e.triggerHandler("n2stop"),this.setState("play",!1))},this)),this.playerElement.on("pause",t.proxy(function(){e.triggerHandler("n2pause"),this.state.continuePlay?(this.setState("continuePlay",!1),this.setState("play",!0)):this.setState("play",!1)},this)),(this.isStatic||-1!==t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.currentSlide)))&&this.setState("slide",!0,!0),1===parseInt(this.parameters.autoplay)&&this.slider.visible(t.proxy(this.initAutoplay,this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",t.proxy(function(e,i,s,n,r){-1===t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.slides[n]))?this.setState("slide",!1,!0):this.setState("slide",!0,!0)},this)),parseInt(this.parameters.reset)&&this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(e,i,s,n,r){this.videoPlayer.currentTime>0&&-1===t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[n]))&&(this.videoPlayer.currentTime=0)},this))),""!==this.parameters["scroll-pause"]?N2Classes.ScrollTracker.add(this.playerElement,this.parameters["scroll-pause"],t.proxy(function(){this.setState("scroll",!0,!0)},this),t.proxy(function(){this.setState("continuePlay",!0),this.setState("scroll",!1,!0)},this)):this.setState("scroll",!0,!0)},i.prototype.onResize=function(){var t=this.playerElement.parent(),e=t.width(),i=t.height(),s=this.videoPlayer.videoWidth/this.videoPlayer.videoHeight,n={width:e,height:i,marginTop:0};n[n2const.rtl.marginLeft]=0,e/i>s?(n.height=e*s,n.marginTop=(i-n.height)/2):(n.width=i*s,n[n2const.rtl.marginLeft]=(e-n.width)/2),this.playerElement.css(n)},i.prototype.initAutoplay=function(){this.isStatic?(this.setState("play",!0),this.setState("slide",!0,!0)):(this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(e,i,s,n,r){t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.slides[n]))>=0?(this.setState("play",!0),setTimeout(t.proxy(function(){this.setState("slide",!0,!0)},this),100)):this.setState("slide",!1,!0)},this)),t.inArray(this.slide,this.slider.getActiveSlidesCompat())>=0&&(this.setState("play",!0),this.setState("slide",!0,!0)))},i.prototype.setState=function(t,e,i){i=i||!1,this.state[t]=e,i&&(this.state.play&&this.state.slide&&this.state.visible&&this.state.scroll?this.safePlay():this.safePause())},i.prototype.safePlay=function(){this.safeCallback(t.proxy(function(){this.promise=this.videoPlayer.play(),this.promise&&Promise!==e&&this.promise["catch"](t.proxy(function(e){if("NotAllowedError"===e.name){var i=".ssLayerVideo"+this.counter;t("body").off(i).one("click"+i+" touchend"+i,t.proxy(function(){t("body").off(i),this.promise!==!1&&this.safePlay()},this))}},this))},this))},i.prototype.safePause=function(){this.safeCallback(t.proxy(function(){this.videoPlayer.pause(),this.promise=!1},this))},i.prototype.safeCallback=function(t){this.promise&&Promise!==e?this.promise.then(t)["catch"](t):t()},i}),N2D("FrontendItemVimeo",function(t,e){function i(e,i,s,n,r,o){if(this.state={scroll:!1,slide:!1,InComplete:!1,play:!1,continuePlay:!1},this.readyDeferred=t.Deferred(),this.slider=e,this.playerId=i,this.$playerElement=t("#"+this.playerId),this.$cover=this.$playerElement.find(".n2-ss-layer-player-cover"),this.start=o,this.parameters=t.extend({vimeourl:"//vimeo.com/144598279",autoplay:"0",reset:"0",title:"1",byline:"1",portrait:"0",loop:"0",color:"00adef",volume:"-1"},n),1===parseInt(this.parameters.autoplay))if(navigator.userAgent.toLowerCase().indexOf("android")>-1)this.parameters.volume=0;else if(n2const.isIOS){this.parameters.autoplay=0;try{"playsInline"in document.createElement("video")&&(this.parameters.autoplay=1,this.parameters.volume=0)}catch(a){}}1===parseInt(this.parameters.autoplay)||!r||n2const.isMobile?this.ready(t.proxy(this.initVimeoPlayer,this)):this.ready(t.proxy(function(){this.$playerElement.on("click.vimeo n2click.vimeo",t.proxy(function(t){this.$playerElement.off(".vimeo"),t.preventDefault(),t.stopPropagation(),this.initVimeoPlayer(),this.safePlay()},this))},this))}return i.vimeoDeferred=null,i.prototype.ready=function(e){null===i.vimeoDeferred&&(i.vimeoDeferred=t.getScript("https://player.vimeo.com/api/player.js")),i.vimeoDeferred.done(e)},i.prototype.initVimeoPlayer=function(){var e=t('<iframe allow="autoplay; encrypted-media" id="'+this.playerId+'-frame" src="https://player.vimeo.com/video/'+this.parameters.vimeocode+"?autoplay=0&_video&title="+this.parameters.title+"&byline="+this.parameters.byline+"&background="+this.parameters.background+"&portrait="+this.parameters.portrait+"&color="+this.parameters.color+"&loop="+this.parameters.loop+("-1"==this.parameters.quality?"":"&quality="+this.parameters.quality)+'" style="position: absolute; top:0; left: 0; width: 100%; height: 100%;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');this.$playerElement.prepend(e),this.isStatic=e.closest(".n2-ss-static-slide").length,this.player=new Vimeo.Player(e[0],{autoplay:!1}),this.promise=this.player.ready(),this.promise.then(t.proxy(this.onReady,this))},i.prototype.onReady=function(){var e=parseFloat(this.parameters.volume);e>=0&&this.setVolume(e),this.slide=this.slider.findSlideByElement(this.$playerElement);var i=this.$playerElement.closest(".n2-ss-layer");this.layer=i.data("layer"),this.$cover.length&&(n2const.isMobile&&this.$cover.on("click",t.proxy(this.safePlay,this)),i.one("n2play",t.proxy(function(){NextendTween.to(this.$cover,.3,{opacity:0,onComplete:t.proxy(function(){this.$cover.remove()},this)})},this))),this.player.on("play",t.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play")},this)),this.player.on("pause",t.proxy(function(){i.triggerHandler("n2pause"),this.state.continuePlay?(this.setState("continuePlay",!1),this.setState("play",!0)):this.setState("play",!1)},this)),this.player.on("ended",t.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"),this.setState("play",!1)},this)),this.isStatic||this.slider.sliderElement.on("mainAnimationStart",t.proxy(function(e,i,s,n,r){-1==t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.slides[n]))?(parseInt(this.parameters.reset)&&this.reset(),this.setState("slide",!1,!0)):this.setState("slide",!0,!0)},this)),""!==this.parameters["scroll-pause"]?N2Classes.ScrollTracker.add(this.$playerElement,this.parameters["scroll-pause"],t.proxy(function(){this.setState("scroll",!0,!0)},this),t.proxy(function(){this.setState("continuePlay",!0),this.setState("scroll",!1,!0)},this)):this.setState("scroll",!0,!0),(this.isStatic||-1!==t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.currentSlide)))&&this.setState("slide",!0,!0),1===parseInt(this.parameters.autoplay)&&this.slider.visible(t.proxy(this.initAutoplay,this)),this.readyDeferred.resolve()},i.prototype.initAutoplay=function(){this.layer.addStateCallback(t.proxy(function(t){this.setState("InComplete",t.InComplete,!0)},this)),this.isStatic?(this.setState("play",!0),this.setState("slide",!0,!0)):(this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(e,i,s,n,r){t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.slides[n]))>=0?(this.setState("play",!0),this.setState("slide",!0,!0)):this.setState("slide",!1,!0)},this)),t.inArray(this.slide,this.slider.getActiveSlidesCompat())>=0&&(this.setState("play",!0),this.setState("slide",!0,!0)))},i.prototype.setState=function(t,e,i){i=i||!1,this.state[t]=e,i&&(this.state.play&&this.state.slide&&this.state.InComplete&&this.state.scroll?this.play():this.pause())},i.prototype.play=function(){this.slider.sliderElement.trigger("mediaStarted",this.playerId),0!=this.start&&this.safeSetCurrentTime(this.start),this.safePlay(),this.player.getCurrentTime().then(t.proxy(function(t){t<this.start&&0!=this.start&&this.safeSetCurrentTime(this.start),this.safePlay()},this))["catch"](t.proxy(function(t){
this.safePlay()},this))},i.prototype.pause=function(){this.safePause()},i.prototype.reset=function(){this.safeSetCurrentTime(this.start)},i.prototype.setVolume=function(e){this.safeCallback(t.proxy(function(){this.promise=this.player.setVolume(e)},this))},i.prototype.safeSetCurrentTime=function(e){this.safeCallback(t.proxy(function(){this.promise=this.player.setCurrentTime(e)},this))},i.prototype.safePlay=function(){this.safeCallback(t.proxy(function(){this.promise=this.player.getPaused(),this.safeCallback(t.proxy(function(t){t&&(this.promise=this.player.play())},this))},this))},i.prototype.safePause=function(){this.safeCallback(t.proxy(function(){this.promise=this.player.getPaused(),this.safeCallback(t.proxy(function(t){t||(this.promise=this.player.pause())},this))},this))},i.prototype.safeCallback=function(t){this.promise&&Promise!==e?this.promise.then(t)["catch"](t):t()},i}),N2D("FrontendItemYouTube",function(t,e){function i(e,i,s,n){this.state={scroll:!1,slide:!1,InComplete:!1,play:!1,continuePlay:!1},this.readyDeferred=t.Deferred(),this.slider=e,this.playerId=i,this.$playerElement=t("#"+this.playerId),this.$cover=this.$playerElement.find(".n2-ss-layer-player-cover"),this.parameters=t.extend({youtubeurl:"//www.youtube.com/watch?v=MKmIwHAFjSU",youtubecode:"MKmIwHAFjSU",center:0,autoplay:"1",related:"1",volume:"-1",loop:0,modestbranding:1,reset:0,query:[],playsinline:0},s),1===parseInt(this.parameters.autoplay)||!n||n2const.isMobile?this.ready(t.proxy(this.initYoutubePlayer,this)):this.$playerElement.on("click.youtube n2click.youtube",t.proxy(function(e){this.$playerElement.off(".youtube"),e.preventDefault(),e.stopPropagation(),this.ready(t.proxy(function(){this.readyDeferred.done(t.proxy(function(){this.play()},this)),this.initYoutubePlayer()},this))},this))}return i.YTDeferred=null,i.prototype.ready=function(s){null===i.YTDeferred&&(i.YTDeferred=t.Deferred(),window.YT===e&&t.getScript("https://www.youtube.com/iframe_api"),window._EPYT_!==e?!function(t){var e=function(){window._EPADashboard_.initStarted===!0?t.resolve():setTimeout(e,100)};e()}(i.YTDeferred):!function(t){var i=function(){window.YT!==e&&window.YT.loaded?t.resolve():setTimeout(i,100)};i()}(i.YTDeferred)),i.YTDeferred.done(s)},i.prototype.fadeOutCover=function(){this.coverFadedOut===e&&this.$cover.length&&(this.coverFadedOut=!0,NextendTween.to(this.$cover,.3,{opacity:0,onComplete:t.proxy(function(){this.$cover.remove()},this)}))},i.prototype.initYoutubePlayer=function(){var e=this.$playerElement.closest(".n2-ss-layer");this.layer=e.data("layer"),this.$cover.length&&(n2const.isMobile&&this.$cover.on("click",t.proxy(this.play,this)),e.one("n2play",t.proxy(this.fadeOutCover,this))),this.isStatic=this.$playerElement.closest(".n2-ss-static-slide").length;var i={enablejsapi:1,origin:window.location.protocol+"//"+window.location.host,wmode:"opaque",rel:1-this.parameters.related,start:this.parameters.start,end:this.parameters.end,modestbranding:this.parameters.modestbranding,playsinline:this.parameters.playsinline};if(1===parseInt(this.parameters.autoplay))if(navigator.userAgent.toLowerCase().indexOf("android")>-1)this.parameters.volume=0;else if(n2const.isIOS){this.parameters.autoplay=0;try{"playsInline"in document.createElement("video")&&(this.parameters.autoplay=1,this.parameters.volume=0,i.playsinline=1)}catch(s){}}n2const.isIOS&&this.parameters.controls&&(i.use_native_controls=1),1==this.parameters.center&&(i.controls=0),1!=this.parameters.controls&&(i.autohide=1,i.controls=0),+(navigator.platform.toUpperCase().indexOf("MAC")>=0&&navigator.userAgent.search("Firefox")>-1)&&(i.html5=1);for(var n in this.parameters.query)this.parameters.query.hasOwnProperty(n)&&(i[n]=this.parameters.query[n]);var r={videoId:this.parameters.youtubecode,wmode:"opaque",playerVars:i,events:{onReady:t.proxy(this.onReady,this),onStateChange:t.proxy(function(i){switch(i.data){case YT.PlayerState.PLAYING:case YT.PlayerState.BUFFERING:this.isStatic||-1!==t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.currentSlide))&&this.slider.sliderElement.trigger("mediaStarted",this.playerId),e.triggerHandler("n2play");break;case YT.PlayerState.PAUSED:e.triggerHandler("n2pause"),this.state.continuePlay?(this.setState("continuePlay",!1),this.setState("play",!0)):this.setState("play",!1);break;case YT.PlayerState.ENDED:1==this.parameters.loop?(this.player.seekTo(this.parameters.start),this.player.playVideo()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),e.triggerHandler("n2stop"),this.setState("play",!1))}},this)}};(this.parameters["privacy-enhanced"]||jQuery&&jQuery.fn.revolution)&&(r.host="https://www.youtube-nocookie.com"),this.player=new YT.Player(this.playerId+"-frame",r),this.slide=this.slider.findSlideByElement(this.$playerElement),1==this.parameters.center&&(this.$playerElement.parent().css("overflow","hidden"),this.onResize(),this.slider.sliderElement.on("SliderResize",t.proxy(this.onResize,this)))},i.prototype.onReady=function(){var e=parseFloat(this.parameters.volume);e>0?this.setVolume(e):-1!==e&&this.player.mute(),(this.isStatic||-1!==t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.currentSlide)))&&this.setState("slide",!0,!0),1==this.parameters.autoplay&&this.slider.visible(t.proxy(this.initAutoplay,this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",t.proxy(function(e,i,s,n){-1==t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.slides[n]))?this.setState("slide",!1,!0):this.setState("slide",!0,!0)},this)),parseInt(this.parameters.reset)&&this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(e,i,s,n){-1==t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[n]))&&0!==this.player.getCurrentTime()&&this.player.seekTo(this.parameters.start)},this))),this.readyDeferred.resolve(),""!==this.parameters["scroll-pause"]?N2Classes.ScrollTracker.add(this.$playerElement,this.parameters["scroll-pause"],t.proxy(function(){this.setState("scroll",!0,!0)},this),t.proxy(function(){this.setState("continuePlay",!0),this.setState("scroll",!1,!0)},this)):this.setState("scroll",!0,!0)},i.prototype.onResize=function(){var t=100,e=this.$playerElement.parent(),i=e.width(),s=e.height()+t,n=16/9,r={width:i,height:s,marginTop:0};r[n2const.rtl.marginLeft]=0,i/s>n?(r.height=i*n,r.marginTop=(s-r.height)/2):(r.width=s*n,r[n2const.rtl.marginLeft]=(i-r.width)/2),this.$playerElement.css(r)},i.prototype.initAutoplay=function(){this.layer.addStateCallback(t.proxy(function(t){this.setState("InComplete",t.InComplete,!0)},this)),this.isStatic?(this.setState("play",!0),this.setState("slide",!0,!0)):(this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(e,i,s,n){t.inArray(this.slide,this.slider.getActiveSlidesCompat(this.slider.slides[n]))>=0?(this.setState("play",!0),this.setState("slide",!0,!0)):this.setState("slide",!1,!0)},this)),t.inArray(this.slide,this.slider.getActiveSlidesCompat())>=0&&(this.setState("play",!0),this.setState("slide",!0,!0)))},i.prototype.setState=function(t,e,i){i=i||!1,this.state[t]=e,i&&(this.state.play&&this.state.slide&&this.state.InComplete&&this.state.scroll?this.play():this.pause())},i.prototype.play=function(){this.isStopped()&&(this.coverFadedOut===e&&setTimeout(t.proxy(this.fadeOutCover,this),200),this.slider.sliderElement.trigger("mediaStarted",this.playerId),this.player.playVideo())},i.prototype.pause=function(){this.isStopped()||this.player.pauseVideo()},i.prototype.stop=function(){this.player.stopVideo()},i.prototype.isStopped=function(){var t=this.player.getPlayerState();switch(t){case-1:case 2:case 5:return!0;default:return!1}},i.prototype.setVolume=function(t){this.player.setVolume(100*t)},i}),N2D("smartslider-frontend");

Back to list