smartslider-frontend.min.js 189 KB
N2Require("SmartSliderBackgroundImages",[],[],function(t,e,i){function s(e){this.device=null,this.slider=e,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 s.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},s.prototype.getBackgroundImages=function(){for(var t=[],e=0;e<this.slider.realSlides.length;e++)t.push(this.slider.realSlides[e].backgroundImage);return t},s.prototype.onVisibleSlidesChanged=function(){1==this.lazyLoad?this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)):2==this.lazyLoad&&(this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)))},s.prototype.onSlideDeviceChangedFirst=function(e,i){this.onSlideDeviceChanged(e,i),this.deviceDeferred.resolve(),this.slider.sliderElement.on("SliderDevice",t.proxy(this.onSlideDeviceChanged,this)),this.preLoadSlides=this._preLoadSlides,1==this.lazyLoad?(this.preLoadSlides=this.preloadSlidesLazyNeighbor,this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):2==this.lazyLoad?(t(window).on("load",t.proxy(this.preLoadAll,this)),this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):this.load=this.whenWithProgress(this.preLoadAll())},s.prototype.onSlideDeviceChanged=function(t,e){this.device=e;for(var i=0;i<this.slider.realSlides.length;i++)this.slider.realSlides[i].backgroundImage&&this.slider.realSlides[i].backgroundImage.updateBackgroundToDevice(e)},s.prototype.preLoadAll=function(){for(var t=[],e=0;e<this.slider.realSlides.length;e++)t.push(this.slider.realSlides[e].preLoad());return t},s.prototype._preLoadSlides=function(e){var i=[];"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]);for(var s=0;s<e.length;s++)i.push(e[s].preLoad());return t.when.apply(t,i)},s.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 o},s.prototype.hack=function(){for(var t=0;t<this.slider.realSlides.length;t++)this.slider.realSlides[t].backgroundImage&&this.slider.realSlides[t].backgroundImage.hack()},s}),N2Require("SmartSliderLoad",[],[],function(t,e,i){function s(e,i){this.parameters=t.extend({fade:1,scroll:0},i),this.deferred=t.Deferred(),this.smartSlider=e,this.spinnerKey="fadePlaceholder",this.id=e.sliderElement.attr("id"),this.$window=t(window),this.spinner=t("#"+this.id+"-spinner")}return s.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&&this.smartSlider.backgroundImages.load.progress(t.proxy(function(t,e){i.html(Math.round(t/(e+1)*100)+"%")},this)),this.showSlider()}else this.showSlider()},s.prototype.onScroll=function(){this.$window.scrollTop()+this.$window.height()>this.smartSlider.sliderElement.offset().top+100&&(this.$window.off("scroll."+this.id),this.showSlider())},s.prototype.loadLayerImages=function(){var e=t.Deferred();return this.smartSlider.sliderElement.find(".n2-ss-layers-container").n2imagesLoaded().always(function(){e.resolve()}),e},s.prototype.showSlider=function(){t.when(this.smartSlider.responsive.ready,this.smartSlider.backgroundImages.load,this.loadLayerImages()).always(t.proxy(function(){this._showSlider()},this))},s.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.sliderElement.trigger("BeforeVisible"),this.smartSlider.responsive.alignElement.addClass("n2-ss-slider-align-visible"),this.smartSlider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.removeSpinner("fadePlaceholder"),t("#"+this.id+"-placeholder").remove(),this.loadingArea=this.smartSlider.sliderElement,"function"==typeof e?e(this.deferred):this.deferred.resolve()},this))},s.prototype.loaded=function(t){this.deferred.done(t)},s.prototype.showSpinner=function(t){this.spinnerKey=t,this.spinner.appendTo(this.loadingArea).css("display","")},s.prototype.removeSpinner=function(t){this.spinnerKey==t&&(this.spinner.detach(),this.spinnerKey="")},s}),N2Require("scrollTracker",[],[],function(t,e,i){function s(){this.started=!1,this.items=[]}s.prototype.add=function(t,e,i){var s={$el:t,onVisible:e,onHide:i,state:"unknown"};this.items.push(s),this._onScroll(s,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;!s&&(i.bottom-i.height<0||i.top-e+i.height>=0)||s&&(i.bottom<0||i.top>=i.height)?"hidden"!=t.state&&("function"==typeof t.onHide&&t.onHide(),t.state="hidden"):"visible"!=t.state&&("function"==typeof t.onVisible&&t.onVisible(),t.state="visible")},nextend.scrollTracker=new s}),N2Require("SmartSliderApi",[],[],function(t,e,i){function s(){this.sliders={},this.readys={},this._resetCounters=[]}return s.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)},s.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))},s.prototype.trigger=function(e,i){var s=n2(e),n=i.split(","),r=s.closest(".n2-ss-slide,.n2-ss-static-slide");if(n.length>1){-1==t.inArray(e,this._resetCounters)&&(this._resetCounters.push(e),r.on("layerAnimationSetStart.resetCounter",function(){s.data("eventCounter",0)}));var o=s.data("eventCounter")||0;i=n[o],o++,o>n.length-1&&(o=0),s.data("eventCounter",o)}r.triggerHandler(i)},s.prototype.applyAction=function(t,e){var i=n2(t).closest(".n2-ss-slider").data("ss");i[e].apply(i,Array.prototype.slice.call(arguments,2))},s.prototype.applyActionWithClick=function(){nextend.shouldPreventClick||this.applyAction.apply(this,arguments)},window.n2ss=new s,s}),N2Require("SmartSliderAbstract",[],[],function($,scope,undefined){function SmartSliderAbstract(t,e){this.startedDeferred=$.Deferred(),t instanceof n2&&(t="#"+t.attr("id"));var i=t.substr(1);return window[i]&&window[i]instanceof SmartSliderAbstract?!1:(this.isAdmin=!!e.admin,this.id=parseInt(i.replace("n2-ss-","")),window[i]=this,this.readyDeferred=$.Deferred(),void this.waitForExists(i,e))}return SmartSliderAbstract.prototype.kill=function(){this.killed=!0,$("#"+this.sliderElement.attr("id")+"-placeholder").remove(),this.sliderElement.closest(".n2-ss-align").remove()},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("SCRIPT"==i.prop("tagName")){var s=i.data("dependency"),n=i.data("delay"),r=$.proxy(function(){var s=$(i.html().replace(/<_s_c_r_i_p_t/g,"<script").replace(/<_\/_s_c_r_i_p_t/g,"</script"));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.onSliderHasDimension=function($sliderElement,parameters){if(this.killed=!1,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.parameters=$.extend({admin:!1,playWhenVisible:1,playWhenVisibleAt:.5,perspective:1e3,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{drag:!1,touch:"horizontal",keyboard:!1,scroll:!1,tilt:!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:[],"background.parallax.tablet":0,"background.parallax.mobile":0,allowBGImageAttachmentFixed:1,particlejs:0},parameters),N2Classes.FrontendLayerAnimations.PERSPECTIVE=this.parameters.perspective,!(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.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 scope.SmartSliderLoad(this,this.parameters.load),this.backgroundImages=new scope.SmartSliderBackgroundImages(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,$);if(this.widgets=new scope.SmartSliderWidgets(this),this.sliderElement.on({universalenter:$.proxy(function(t){$(t.target).closest(".n2-full-screen-widget").length||(this.sliderElement.addClass("n2-hover"),this.widgets.setState("hover",!0))},this),universalleave:$.proxy(function(t){t.stopPropagation(),this.sliderElement.removeClass("n2-hover"),this.widgets.setState("hover",!1)},this)}),this.controls={},this.initMainAnimationWithLayerAnimation(),this.isAdmin||!this.parameters.parallax.enabled||!this.parameters.parallax.mobile&&(this.parameters.parallax.mobile||n2const.isMobile)||(this.parallax=new scope.LayerParallax(this,this.parameters.parallax),this.ready($.proxy(function(){this.parallax.start(this.currentSlide),this.sliderElement.on("sliderSwitchTo",$.proxy(function(t,e){this.parallax.start(this.slides[e])},this))},this))),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.n2passiveEvents?{passive:!0}:!1)},this);this.sliderElement[0].addEventListener("touchstart",removeHoverClassCB,window.n2passiveEvents?{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(){eval(el.data("n2click"))})}),this.sliderElement.find("[data-click]").each(function(i,el){var el=$(el).on("click",function(){eval(el.data("click"))}).css("cursor","pointer")}),this.sliderElement.find("[data-n2middleclick]").on("mousedown",function(e){var el=$(this);2!=e.which&&4!=e.which||(e.preventDefault(),eval(el.data("n2middleclick")))}),this.sliderElement.find("[data-mouseenter]").each(function(i,el){var el=$(el).on("mouseenter",function(){eval(el.data("mouseenter"))})}),this.sliderElement.find("[data-mouseleave]").each(function(i,el){var el=$(el).on("mouseleave",function(){eval(el.data("mouseleave"))})}),this.sliderElement.find("[data-play]").each(function(i,el){var el=$(el).on("n2play",function(){eval(el.data("play"))})}),this.sliderElement.find("[data-pause]").each(function(i,el){var el=$(el).on("n2pause",function(){eval(el.data("pause"))})}),this.sliderElement.find("[data-stop]").each(function(i,el){var el=$(el).on("n2stop",function(){eval(el.data("stop"))})}),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())}).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 scope.FrontendSliderSlide(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 scope.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 0==arguments.length&&(t=this.currentSlide),[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),console.log("randomize first"))},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.visibleDeferred=$.Deferred(),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=$(window).scrollTop(),e=$(window).height(),i=this.sliderElement.offset().top,s=i+Math.min(this.sliderElement.height(),e)*(1-this.parameters.playWhenVisibleAt),n=i+Math.min(this.sliderElement.height(),e)*this.parameters.playWhenVisibleAt;(this.isAdmin||s>=t&&t+e>=n)&&($(window).off("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),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=$.Deferred();if("undefined"==typeof t&&(t=0),this.responsive.parameters.focusUser&&!t||this.responsive.parameters.focusAutoplay&&t){var i=this.sliderElement.offset().top-(this.responsive.verticalOffsetSelectors.height()||0);$(window).scrollTop()!=i?$("html, body").animate({scrollTop:i},400,$.proxy(function(){e.resolve()},this)):e.resolve()}else e.resolve();return e},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(this.backgroundImages.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"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]},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)),"skippable"==t.mode&&o.on("mainAnimationCompleteOut.layers",$.proxy(function(){o.off("mainAnimationCompleteOut.layers"),t.playOnce?this.parameters.foreverLayerAnimation||o.data("slide").pause():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(){this.parameters.admin||(this.hasTouch()&&new scope.SmartSliderControlTouch(this,this.parameters.controls.touch,{fallbackToMouseEvents:this.parameters.controls.drag}),this.parameters.controls.keyboard&&("undefined"!=typeof this.controls.touch?new scope.SmartSliderControlKeyboard(this,this.controls.touch._direction.axis):new scope.SmartSliderControlKeyboard(this,"horizontal")),this.parameters.controls.scroll&&new scope.SmartSliderControlScroll(this),this.parameters.controls.tilt&&new scope.SmartSliderControlTilt(this),this.controlAutoplay=new scope.SmartSliderControlAutoplay(this,this.parameters.autoplay),this.controlFullscreen=new scope.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");if(s.length&&this.id==s.data("ss").id)return!0;if(s.length){var n=0;return"undefined"!=typeof n2ScrollOffsetSelector&&(n=n2(n2ScrollOffsetSelector).outerHeight()),n2("html, body").animate({scrollTop:s.offset().top-n},400),s.data("ss").slideToID(t,e)}},SmartSliderAbstract.prototype.slide=function(t,e){return t>=0&&t<this.slides.length?"undefined"==typeof e?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.startLightbox=function(){if(this.parameters.lightbox.length>0){for(var t=[],e=0,i=this,s=0;s<this.parameters.lightbox.length;s++)t.push($('<a href="'+this.parameters.lightbox[s]+'" n2-lightbox="" data-litebox-group="'+this.id+'" style="display:none;"></a>').data({title:this.parameters.titles[s],description:this.parameters.descriptions[s]}).on("click",function(t){t.stopPropagation()}).appendTo(this.realSlides[s].$element));this.parameters.lightboxDeviceImages&&this.sliderElement.on("SliderDevice",$.proxy(function(e,i){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"==i.device?this.parameters.lightboxDeviceImages[n]["mobile"+(nextend.isRetina?"-retina":"")]?r=this.parameters.lightboxDeviceImages[n]["mobile"+(nextend.isRetina?"-retina":"")]:this.parameters.lightboxDeviceImages[n]["tablet"+(nextend.isRetina?"-retina":"")]&&(r=this.parameters.lightboxDeviceImages[n]["tablet"+(nextend.isRetina?"-retina":"")]):"tablet"==i.device&&this.parameters.lightboxDeviceImages[n]["tablet"+(nextend.isRetina?"-retina":"")]&&(r=this.parameters.lightboxDeviceImages[n]["tablet"+(nextend.isRetina?"-retina":"")]),t[s].attr("href",r)}}},this)),this.sliderElement.find("a[n2-lightbox]").liteBox({callbackBeforeOpen:function(t){e=i.currentRealSlide.index,this.$element.trigger("mediaStarted",this)},callbackAfterClose:function(){this.$element.trigger("mediaEnded",this)},callbackPrev:$.proxy(function(){var t=e-1;0>t&&(t=i.realSlides.length-1),this.directionalChangeToReal(t),e=t},this),callbackNext:$.proxy(function(){var t=e+1;t>=i.realSlides.length&&(t=0),this.directionalChangeToReal(t),e=t},this)});var n="click";this.hasTouch()&&(n="n2click");for(var s=0;s<this.realSlides.length;s++)this.realSlides[s].$element.css("cursor","zoom-in").on(n,$.proxy(function(e,i){$(i.target).hasClass("smart-slider-overlay")||setTimeout($.proxy(function(){"ended"==this.mainAnimation.state&&t[e].trigger("click")},this),10)},this,s))}},SmartSliderAbstract.prototype.getSlideBackgroundContainer=function(){},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}),N2Require("SmartSliderWidgets",[],[],function($,scope,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}}return SmartSliderWidgets.prototype.setState=function(t,e){this.states[t]!=e&&(this.states[t]=e,this.onStateChange())},SmartSliderWidgets.prototype.onStateChange=function(){var t={};for(var e in this.widgets)this.widgets[e].hasClass("n2-ss-widget-display-hover")?this.states.hover?t[e]=!0:t[e]=!1:t[e]=!0,this.excludedSlides[e]!=undefined&&-1!=$.inArray(this.states.currentSlideIndex+1,this.excludedSlides[e])&&(t[e]=!1);this.states.nonCarouselFirst&&(t.previous=!1),this.states.nonCarouselLast&&(t.next=!1);for(var e in this.widgets)this.widgets[e].toggleClass("n2-ss-widget-hidden",!t[e])},SmartSliderWidgets.prototype.onReady=function(){this.dimensions=this.slider.dimensions,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")},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])}s.length>0&&(this.excludedSlides[e]=s,
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.onStateChange()},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)variableText+="var "+key+key2+" = "+value[key2]+";";else 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)variableText+="var "+key+key2+" = "+value[key2]+";";else 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}),N2Require("SmartSliderBackgroundAnimationAbstract",[],[],function(t,e,i){function s(t,e,i,s,n,r){this.durationMultiplier=n,this.original={currentImage:e,nextImage:i},this.animationProperties=s,this.reversed=r,this.timeline=t.timeline,this.containerElement=t.bgAnimationElement,this.shiftedBackgroundAnimation=t.parameters.shiftedBackgroundAnimation,this.clonedImages={}}return s.prototype.postSetup=function(){},s.prototype.ended=function(){},s.prototype.revertEnded=function(){},s.prototype.placeNextImage=function(){this.clonedImages.nextImage=this.original.nextImage.clone().css({position:"absolute",top:0,left:0}),NextendTween.set(this.clonedImages.nextImage,{transform:"none"}),this.containerElement.append(this.clonedImages.nextImage)},s.prototype.placeCurrentImage=function(){this.clonedImages.currentImage=this.original.currentImage.clone().css({position:"absolute",top:0,left:0}),NextendTween.set(this.clonedImages.currentImage,{transform:"none"}),this.containerElement.append(this.clonedImages.currentImage)},s.prototype.hideOriginals=function(){this.original.currentImage.css("opacity",0),this.original.nextImage.css("opacity",0)},s.prototype.resetAll=function(){this.original.currentImage.css("opacity",1),this.original.nextImage.css("opacity",1),this.containerElement.html("")},s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationCubic",["SmartSliderBackgroundAnimationTiled"],[],function(t,e,i){function s(){e.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(e.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=t.extend(!0,{columns:1,rows:1,fullCube:!0,tiles:{delay:.2,sequence:"Parallel"},depth:50,main:{side:"Left",duration:.5,ease:"easeInOutCubic",direction:"horizontal",real3D:!0},pre:[],post:[]},this.animationProperties);i.fullCube=!0,this.reversed&&("undefined"!=typeof i.invert&&t.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&t.extend(i.tiles,i.invertTiles)),e.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(e,i,s,n,r,o){var a=n.depth;switch(a){case"width":a=i;break;case"height":a=s}switch(n.main.side){case"Top":case"Bottom":a=s;break;case"Left":case"Right":a=i}n.main.real3D&&NextendTween.set(e.get(0),{transformStyle:"preserve-3d"});var l=t('<div class="cuboid"></div>').css({position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}).appendTo(e);NextendTween.set(l.get(0),{transformStyle:"preserve-3d",z:-a/2});var h=0;"horizontal"==n.main.direction&&(h=180);var d=this.getSide(l,i,s,0,0,-a/2,180,0,h),p={Back:d,BackInvert:d};return(n.fullCube||"vertical"==n.main.direction)&&(p.Bottom=this.getSide(l,i,a,0,s-a/2,0,-90,0,0),p.Top=this.getSide(l,i,a,0,-a/2,0,90,0,0)),p.Front=this.getSide(l,i,s,0,0,a/2,0,0,0),(n.fullCube||"horizontal"==n.main.direction)&&(p.Left=this.getSide(l,a,s,-a/2,0,0,0,-90,0),p.Right=this.getSide(l,a,s,i-a/2,0,0,0,90,0)),p.Front.append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})),p[n.main.side].append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})),l},s.prototype.getSide=function(e,i,s,n,r,o,a,l,h){var d=t('<div class="n2-3d-side"></div>').css({width:i,height:s}).appendTo(e);return NextendTween.set(d.get(0),{x:n,y:r,z:o,rotationX:a,rotationY:l,rotationZ:h,backfaceVisibility:"hidden"}),d},s.prototype.addAnimation=function(t,e){var i=t.duration;delete t.duration,this.timeline.to(e,i*this.durationMultiplier,t)},s.prototype.transform=function(t,e,i){for(var s=0;s<t.pre.length;s++){var n=t.pre[s],r=n.duration*this.durationMultiplier;this.timeline.to(e,r,n,i),i+=r}this["transform"+t.main.side](t.main,e,i),i+=t.main.duration;for(var s=0;s<t.post.length;s++){var n=t.post[s],r=n.duration*this.durationMultiplier;this.timeline.to(e,r,n,i),i+=r}},s.prototype.transformLeft=function(t,e,i){this._transform(t,e,i,0,90,0)},s.prototype.transformRight=function(t,e,i){this._transform(t,e,i,0,-90,0)},s.prototype.transformTop=function(t,e,i){this._transform(t,e,i,-90,0,0)},s.prototype.transformBottom=function(t,e,i){this._transform(t,e,i,90,0,0)},s.prototype.transformBack=function(t,e,i){"horizontal"==t.direction?this._transform(t,e,i,0,180,0):this._transform(t,e,i,180,0,0)},s.prototype.transformBackInvert=function(t,e,i){"horizontal"==t.direction?this._transform(t,e,i,0,-180,0):this._transform(t,e,i,-180,0,0)},s.prototype._transform=function(t,e,i,s,n,r){this.timeline.to(e,t.duration*this.durationMultiplier,{rotationX:s,rotationY:n,rotationZ:r,ease:t.ease},i)},s}),N2Require("SmartSliderBackgroundAnimationExplode",["SmartSliderBackgroundAnimationTiled"],[],function(t,e,i){function s(){e.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(e.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=t.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),e.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(e,i,s,n,r,o){var a=t("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(e);return NextendTween.set(e.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:e}},s.prototype.transform=function(e,i,s){var n=t.extend(!0,{},e.main.current);n.rotationX=90*(3*Math.random()-1),n.rotationY=90*(3*Math.random()-1),n.rotationZ=90*(3*Math.random()-1),this.timeline.to(i.tile,e.main.duration*this.durationMultiplier,n,s)},s}),N2Require("SmartSliderBackgroundAnimationExplodeReversed",["SmartSliderBackgroundAnimationTiled"],[],function(t,e,i){function s(){e.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(e.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=t.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeCurrentImage(),this.clonedImages.currentImage.css({overflow:"hidden",width:"100%",height:"100%"}),e.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(e,i,s,n,r,o){var a=t("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(e);return NextendTween.set(e.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{next:a,tile:e}},s.prototype.transform=function(e,i,s){var n=t.extend(!0,{},e.main.current);n.rotationX=90*(3*Math.random()-1),n.rotationY=90*(3*Math.random()-1),n.rotationZ=30*(3*Math.random()-1),this.timeline.from(i.tile,e.main.duration*this.durationMultiplier,n,s)},s}),N2Require("SmartSliderBackgroundAnimationFlat",["SmartSliderBackgroundAnimationTiled"],[],function(t,e,i){function s(){e.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(e.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=t.extend(!0,{columns:1,rows:1,tiles:{cropOuter:!1,crop:!0,delay:0,sequence:"Parallel"},main:{type:"next",duration:.5,real3D:!0,zIndex:1,current:{ease:"easeInOutCubic"},next:{ease:"easeInOutCubic"}}},this.animationProperties);this.reversed&&("undefined"!=typeof i.invert&&t.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&t.extend(i.tiles,i.invertTiles)),e.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i),i.tiles.cropOuter&&this.container.css("overflow","hidden")},s.prototype.renderTile=function(e,i,s,n,r,o){n.tiles.crop&&e.css("overflow","hidden");var a=t("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(e),l=t("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:1}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(e);return n.main.real3D&&(NextendTween.set(e.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(a.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(l.get(0),{transformStyle:"preserve-3d"})),{current:a,next:l}},s.prototype.transform=function(t,e,i){var s=t.main;"current"!=s.type&&"both"!=s.type||this.timeline.to(e.current,s.duration*this.durationMultiplier,s.current,i),"next"!=s.type&&"both"!=s.type||this.timeline.from(e.next,s.duration*this.durationMultiplier,s.next,i)},s}),N2Require("SmartSliderBackgroundAnimationSlixes",["SmartSliderBackgroundAnimationTiled"],[],function(t,e,i){function s(){e.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(e.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=t.extend(!0,{columns:2,rows:2,main:{duration:2,zIndex:2}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),e.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(e,i,s,n,r,o){this.container.css("overflow","hidden");var a=t("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(e);return NextendTween.set(e.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:e}},s.prototype.animate=function(e,i,s){this.timeline.to(s[0][0].tile,e.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},0),this.timeline.to(s[0][1].tile,e.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},.3),this.timeline.to(s[1][0].tile,e.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.15),this.timeline.to(s[1][1].tile,e.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.45),t("<div />").css({position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"}).prependTo(this.clonedImages.nextImage.parent()).append(this.clonedImages.nextImage),this.timeline.fromTo(this.clonedImages.nextImage,e.main.duration*this.durationMultiplier,{scale:1.3},{scale:1},.45)},s}),N2Require("SmartSliderBackgroundAnimationTiled",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(t,e,i){function s(){e.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments),this.setup()}return s.prototype=Object.create(e.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.setup=function(e){var i=t("<div></div>").css({position:"absolute",left:0,top:0,width:this.w,height:this.h});this.container=i,NextendTween.set(i.get(0),{force3D:!0,perspective:1e3});for(var s=[],n=[],r=e.columns,o=e.rows,a=Math.floor(this.w/r),l=Math.floor(this.h/o),h=this.w-r*a,d=Math.ceil(h/r),p=this.h-o*l,u=Math.ceil(p/o),c=0,m=0;r>m;m++){s[m]=[];var f=a,y=0;if(h>0){var g=h>=d?d:h;f+=g,h-=g}for(var v=p,S=0;o>S;S++){var x=l;if(v>0){var g=v>=u?u:v;x+=g,v-=g}var b=t('<div class="tile tile-'+m+"-"+S+'"></div>').css({position:"absolute",top:y+"px",left:c+"px",width:f+"px",height:x+"px",zIndex:-Math.abs(m-parseInt(r/2))+r-Math.abs(S-parseInt(o/2))}).appendTo(i),w=this.renderTile(b,f,x,e,c,y);n.push(w),s[m][S]=w,y+=x}c+=f}i.appendTo(this.containerElement),this.preSetup(),this.animate(e,n,s)},s.prototype.animate=function(e,i,s){this["sequence"+e.tiles.sequence](t.proxy(this.transform,this,e),i,s,e.tiles.delay*this.durationMultiplier)},s.prototype.sequenceParallel=function(t,e){t(e,null)},s.prototype.sequenceRandom=function(t,e,i,s){for(var n=this.timeline.totalDuration(),r=0;r<e.length;r++)t(e[r],n+Math.random()*s)},s.prototype.sequenceForwardCol=function(t,e,i,s){for(var n=this.timeline.totalDuration(),r=0;r<e.length;r++)t(e[r],n+s*r)},s.prototype.sequenceBackwardCol=function(t,e,i,s){for(var n=this.timeline.totalDuration(),r=e.length-1,o=0;o<e.length;o++)t(e[o],n+s*(r-o))},s.prototype.sequenceForwardRow=function(t,e,i,s){for(var n=this.timeline.totalDuration(),r=0,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)t(i[a][o],n+s*r),r++},s.prototype.sequenceBackwardRow=function(t,e,i,s){for(var n=this.timeline.totalDuration(),r=e.length-1,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)t(i[a][o],n+s*r),r--},s.prototype.sequenceForwardDiagonal=function(t,e,i,s){for(var n=this.timeline.totalDuration(),r=0;r<i[0].length;r++)for(var o=0;o<i.length;o++)t(i[o][r],n+s*(o+r))},s.prototype.sequenceBackwardDiagonal=function(t,e,i,s){for(var n=this.timeline.totalDuration(),r=i[0].length+i.length-2,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)t(i[a][o],n+s*(r-a-o))},s}),N2Require("SmartSliderBackgroundAnimationTurn",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(t,e,i){function s(){e.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments);var i=t.extend(!0,{perspective:1.5*this.w,duration:.8,direction:"left"},this.animationProperties);this.reversed&&("left"==i.direction?i.direction="right":i.direction="left");var s=parseInt(this.w/2);this.clonedCurrent().css({position:"absolute",top:0,left:"left"==i.direction?-1*(this.w/2):0}),this.clonedNext().css({position:"absolute",top:0,left:"left"==i.direction?0:-1*(this.w/2)});var n=t('<div class="tab"></div>').css({width:s,height:this.h,position:"absolute",top:"0px",left:"left"==i.direction?s:"0","z-index":101});NextendTween.set(n,{transformStyle:"preserve-3d",transformOrigin:"left"==i.direction?"0px 0px":s+"px 0px"});var r=t('<div class="n2-ff-3d"></div>').append(this.clonedCurrent()).css({width:s,height:this.h,position:"absolute",top:0,left:0,"-webkit-transform":"translateZ(0.1px)",overflow:"hidden"}).appendTo(n);NextendTween.set(r,{backfaceVisibility:"hidden",transformStyle:"preserve-3d"});var o=t('<div class="n2-ff-3d"></div>').append(this.clonedNext()).appendTo(n).css({width:s,height:this.h,position:"absolute",top:0,left:0,overflow:"hidden"});NextendTween.set(o,{backfaceVisibility:"hidden",transformStyle:"preserve-3d",rotationY:180,rotationZ:0});var a=t("<div></div>").append(this.clonedCurrent().clone().css("left","left"==i.direction?0:-s)).css({position:"absolute",top:0,left:"left"==i.direction?"0":s,width:s,height:this.h,zIndex:100,overflow:"hidden"}),l=t('<div class="overlay"></div>').css({position:"absolute",top:0,left:"left"==i.direction?s:0,width:s,height:this.h,background:"#000",opacity:1,overflow:"hidden"}),h=t("<div></div>").css({width:this.w,height:this.h,position:"absolute",top:0,left:0}).append(n).append(a).append(l);NextendTween.set(h,{perspective:i.perspective,perspectiveOrigin:"50% 50%"}),this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),this.containerElement.append(h),this.preSetup(),this.timeline.to(n.get(0),i.duration*this.durationMultiplier,{rotationY:"left"==i.direction?-180:180},0),this.timeline.to(l.get(0),i.duration*this.durationMultiplier,{opacity:0},0)}return s.prototype=Object.create(e.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationFluxAbstract",["SmartSliderBackgroundAnimationAbstract"],[],function(t,e,i){function s(){this.shiftedPreSetup=!1,this._clonedCurrent=!1,this._clonedNext=!1,e.SmartSliderBackgroundAnimationAbstract.prototype.constructor.apply(this,arguments),this.w=this.original.currentImage.width(),this.h=this.original.currentImage.height()}return s.prototype=Object.create(e.SmartSliderBackgroundAnimationAbstract.prototype),s.prototype.constructor=s,s.prototype.clonedCurrent=function(){return this._clonedCurrent||(this._clonedCurrent=this.original.currentImage.clone().css({width:this.w,height:this.h}),this._clonedCurrent.find(".n2-ss-slide-background-video").remove(),NextendTween.set(this._clonedCurrent,{transform:"none"})),this._clonedCurrent},s.prototype.clonedNext=function(){return this._clonedNext||(this._clonedNext=this.original.nextImage.clone().css({width:this.w,height:this.h}),this._clonedNext.find(".n2-ss-slide-background-video").remove(),NextendTween.set(this._clonedNext,{transform:"none"})),this._clonedNext},s.prototype.preSetup=function(){0!=this.shiftedBackgroundAnimation?this.shiftedPreSetup=!0:this._preSetup()},s.prototype._preSetup=function(t){this.timeline.to(this.original.currentImage.get(0),this.getExtraDelay(),{opacity:0},0),this.original.nextImage.css("opacity",0)},s.prototype.postSetup=function(){this.timeline.to(this.original.nextImage.get(0),this.getExtraDelay(),{opacity:1})},s.prototype.getExtraDelay=function(){return.2},s.prototype.ended=function(){this.original.currentImage.css("opacity",1),this.containerElement.html("")},s.prototype.revertEnded=function(){this.original.nextImage.css("opacity",1),this.containerElement.html("")},s}),N2Require("SmartSliderMainAnimationAbstract",[],[],function(t,e,i){function s(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 s.prototype.setToStarterSlide=function(t){},s.prototype.enableReverseMode=function(){this.isReverseEnabled=!0,this.reverseTimeline=new NextendTimeline({paused:!0}),this.sliderElement.triggerHandler("reverseModeEnabled",this.reverseSlideIndex)},s.prototype.disableReverseMode=function(){this.isReverseEnabled=!1},s.prototype.setTouch=function(t){this.isTouch=t},s.prototype.setTouchProgress=function(t){this.isReverseEnabled?this._setTouchProgressWithReverse(t):this._setTouchProgress(t)},s.prototype._setTouchProgress=function(t){"ended"!=this.state&&(0>=t?this.timeline.progress(Math.max(t,1e-6),!1):t>=0&&1>=t&&this.timeline.progress(t))},s.prototype._setTouchProgressWithReverse=function(t){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)))},s.prototype.setTouchEnd=function(t,e,i){"ended"!=this.state&&(this.isReverseEnabled?this._setTouchEndWithReverse(t,e,i):this._setTouchEnd(t,e,i))},s.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))},s.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))},s.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)},s.prototype.getState=function(){return this.state},s.prototype.timeScale=function(){return arguments.length>0?(this.timeline.timeScale(arguments[0]),this):this.timeline.timeScale()},s.prototype.preChangeToPlay=function(t,e,i){var s={handled:!1};this.sliderElement.trigger("preChangeToPlay",[t,s,e,i]),s.handled||t.resolve()},s.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,!1,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)}},s.prototype.willRevertTo=function(e,i){this.sliderElement.triggerHandler("mainAnimationWillRevertTo",[e,i]),this.sliderElement.one("mainAnimationComplete",t.proxy(this.revertTo,this,e,i))},s.prototype.revertTo=function(t,e){this.slider.revertTo(t,e),this.slider.slides[e].triggerHandler("mainAnimationStartInCancel")},s.prototype.willCleanSlideIndex=function(e){this.sliderElement.one("mainAnimationComplete",t.proxy(this.cleanSlideIndex,this,e))},s.prototype.cleanSlideIndex=function(){},s.prototype._initAnimation=function(t,e,i){},s.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)},s.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)},s.prototype.onReverseChangeToComplete=function(t,e,i){s.prototype.onChangeToComplete.apply(this,arguments)},s.prototype.clearTimelines=function(){this.revertCB=function(){},this.timeline.clear(),this.timeline.timeScale(1)},s.prototype.getEase=function(){return this.isTouch?"linear":this.parameters.ease},s}),N2Require("SmartSliderPostBackgroundAnimation",[],[],function(t,e,i){function s(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.backgroundImages=e.backgroundImages,this.tweens=[],this.images=this.backgroundImages.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.playFirst?(this.tween=this.tweens[n],this.addVisiblePlay()):(this.tween=this.tweens[n],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 n(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.$el.css("transition","all "+this.duration+"s"),this.pause(0)}var r={"default":5,superSlow:20,slow:10,normal:5,fast:3,superFast:1.5},o={"default":1,superSoft:.3,soft:.6,normal:1,strong:1.5,superStrong:2};return s.prototype.addVisiblePlay=function(){this.visibleAddedButNotPlayed||(this.visibleAddedButNotPlayed=!0,this.slider.visible(t.proxy(this.play,this)))},s.prototype.onMainAnimationStart=function(){this.isFirst=!1,this.mainAnimation.hasBackgroundAnimation()||this.mainAnimation.isTouch?this.slider.sliderElement.one("mainAnimationComplete",t.proxy(this.play,this)):this.play()},s.prototype.onMainAnimationWillRevertTo=function(t,e,i){this.lastTween=this.tween,this.tween=!1},s.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))}},s.prototype.getAnimation=function(e,i,s){var a=this.parameters.data,l=this.parameters.speed,h=this.parameters.strength;if(this.slider.slides[e].postBackgroundAnimation){var d=this.slider.slides[e].postBackgroundAnimation;a=d.data,l=d.speed,h=d.strength}if(!a)return!1;var p=t.extend(!0,{},a.animations[Math.floor(Math.random()*a.animations.length)]);"undefined"==typeof p.from.transformOrigin&&(p.from.transformOrigin=a.transformOrigin),(n2const.isFirefox||n2const.isIE<=11)&&NextendTween.set(i.$background.parent(),{rotationZ:"0.001deg"}),NextendTween.set(i.$background,{transformOrigin:p.from.transformOrigin,backfaceVisibility:"hidden",transformStyle:"flat",overflow:"hidden"}),p.to.paused=!0;for(var e=0;e<p.strength.length;e++){var u=p.strength[e];"scale"==u?(p.from.scale=1+(p.from.scale-1)*o[h],p.to.scale=1+(p.to.scale-1)*o[h]):(p.from[u]*=o[h],p.to[u]*=o[h])}return"undefined"!=typeof p.from.x&&(p.from.x*=s.slideW),"undefined"!=typeof p.from.y&&(p.from.y*=s.slideH),"undefined"!=typeof p.to.x&&(p.to.x*=s.slideW),"undefined"!=typeof p.to.y&&(p.to.y*=s.slideH),new n(i.$background,r[l],p.from,p.to)},s.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},s.prototype.play=function(){this.visibleAddedButNotPlayed=!1,!this.tween||this.playOnce&&0!=this.tween.progress()||this.tween.play()},s.prototype.stop=function(){
!this.playOnce&&this.lastTween&&this.lastTween.pause(0)},n.prototype.pause=function(t){0==t&&(this.$el.addClass("n2noselftransition"),NextendTween.set(this.$el,this.from))},n.prototype.play=function(){this.$el.removeClass("n2noselftransition"),this.startTime=n2.now(),NextendTween.set(this.$el,this.to)},n.prototype.progress=function(t){return-1===this.startTime?0:(n2.now()-this.startTime)/this.duration/1e3},s}),N2Require("SmartSliderControlAutoplay",[],[],function(t,e,i){"use strict";function s(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(),e.controls.autoplay=this}var n=!1;return s.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(){n=!0,setTimeout(function(){n=!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(this.pauseAutoplayUniversal,this)):!this.parameters.pause.click&&this.parameters.resume.click?i.on("universalclick.autoplay",t.proxy(function(t){this.pauseAutoplayExtraPlayingEnded(t,"autoplayButton")},this)):this.parameters.pause.click&&this.parameters.resume.click&&i.on("universalclick.autoplay",t.proxy(function(t){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))},s.prototype.enableProgress=function(){this.timeline&&this.timeline.eventCallback("onUpdate",t.proxy(this.onUpdate,this)),this._progressEnabled=!0},s.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()},s.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()},s.prototype.getSlideDuration=function(t){var e=this.slider.realSlides[this.slider.getRealIndex(t)],i=e.minimumSlideDuration;return.3>i&&i<this.parameters.duration&&(i=this.parameters.duration),i},s.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))},s.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))},s.prototype.pauseAutoplayUniversal=function(t){this.pauseAutoplayExtraPlaying(t,"autoplayButton"),this.deActivate(null,"pause")},s.prototype.pauseAutoplayMouseEnter=function(){n||(this.autoplayDeferred.reject(),this.deferredMouseEnter=t.Deferred(),this.deActivate(null,"leave"==this.parameters.resume.mouse?"wait":"pause"))},s.prototype.pauseAutoplayMouseEnterEnded=function(){this.deferredMouseEnter&&this.deferredMouseEnter.resolve()},s.prototype.pauseAutoplayMouseLeave=function(){this.autoplayDeferred.reject(),this.deferredMouseLeave=t.Deferred(),this.deActivate(null,"enter"==this.parameters.resume.mouse?"wait":"pause")},s.prototype.pauseAutoplayMouseLeaveEnded=function(){this.deferredMouseLeave&&this.deferredMouseLeave.resolve()},s.prototype.pauseAutoplayMediaPlaying=function(e,i){"undefined"!=typeof this.deferredsMediaPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsMediaPlaying[i]=t.Deferred(),this.deActivate(null,"wait")},s.prototype.pauseAutoplayMediaPlayingEnded=function(t,e){"undefined"!=typeof this.deferredsMediaPlaying[e]&&(this.autoplayDeferred.reject(),this.deferredsMediaPlaying[e].resolve(),delete this.deferredsMediaPlaying[e])},s.prototype.pauseAutoplayExtraPlaying=function(e,i){"undefined"!=typeof this.deferredsExtraPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsExtraPlaying[i]=t.Deferred(),this.deActivate(null,"pause")},s.prototype.pauseAutoplayExtraPlayingEnded=function(t,e){"undefined"!=typeof this.deferredsExtraPlaying[e]&&(this.autoplayDeferred.reject(),this.deferredsExtraPlaying[e].resolve(),delete this.deferredsExtraPlaying[e]),this.continueAutoplay()},s.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)},s.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},s.prototype.startTimeout=function(t){this._paused||this._disabled||this.timeline.play(t)},s.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)},s.prototype.limitAutoplay=function(){this.parameters.allowReStart?(this._currentCount=0,this.slider.sliderElement.triggerHandler("autoplayExtraWait","autoplayButton")):this.disable()},s.prototype.onUpdate=function(){this.slider.sliderElement.triggerHandler("autoplay",this.timeline.progress())},s}),N2Require("SmartSliderControlFullscreen",[],[],function(t,e,i){"use strict";function s(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 s.prototype.switchState=function(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this._fullScreen():this._normalScreen()},s.prototype.requestFullscreen=function(){return this.isFullScreen?!1:(this.isFullScreen=!0,this._fullScreen(),!0)},s.prototype.exitFullscreen=function(){return this.isFullScreen?(this.isFullScreen=!1,this._normalScreen(),!0):!1},s.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]()},s.prototype._fullScreen=function(){this.forceFullpage&&(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(nextend.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]()},s.prototype._normalScreen=function(){document[this.browserSpecific.exitFullscreen]?document[this.browserSpecific.exitFullscreen]():this.fullParent[0][this.browserSpecific.exitFullscreen]&&this.fullParent[0][this.browserSpecific.exitFullscreen]()},s.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.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(nextend.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"))},s.prototype.isDocumentInFullScreenMode=function(){return document.fullscreenElement&&null!==document.fullscreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement||document.mozFullScreen||document.webkitIsFullScreen},s}),N2Require("SmartSliderControlKeyboard",[],[],function(t,e,i){"use strict";function s(e,i,n){this.slider=e,this.parameters=t.extend({},n),"vertical"==i?this.parseEvent=s.prototype.parseEventVertical:this.parseEvent=s.prototype.parseEventHorizontal,t(document).on("keydown",t.proxy(this.onKeyDown,this)),e.controls.keyboard=this}return 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){t.target.tagName.match(/BODY|DIV|IMG/)&&this.isSliderOnScreen()&&(t=t||window.event,this.parseEvent.call(this,t)&&(t.preventDefault(),t.stopImmediatePropagation()))},s.prototype.parseEventHorizontal=function(t){switch(t.keyCode){case 39:return this.slider[nextend.rtl.next](),!0;case 37:return this.slider[nextend.rtl.previous](),!0;default:return!1}},s.prototype.parseEventVertical=function(t){switch(t.keyCode){case 40:return this.slider.next(),!0;case 38:return this.slider.previous(),!0;default:return!1}},s}),N2Require("SmartSliderControlScroll",[],[],function(t,e,i){"use strict";function s(e){this.preventScroll=!1,this._preventScrollTimeout=null,this.slider=e,e.sliderElement.on("DOMMouseScroll mousewheel",t.proxy(this.onMouseWheel,this)),e.sliderElement.on("mainAnimationComplete",t.proxy(this.clearScrollTimeout,this)),e.controls.scroll=this}return s.prototype.onMouseWheel=function(t){if(this.preventScroll)this.preventScrollTimeout(t);else{var e=!1;t.originalEvent&&(t.originalEvent.wheelDelta&&(e=t.originalEvent.wheelDelta/-1<0),t.originalEvent.deltaY&&(e=t.originalEvent.deltaY<0),t.originalEvent.detail&&(e=t.originalEvent.detail<0)),e?this.slider.previous()&&this.preventScrollTimeout(t):this.slider.next()&&this.preventScrollTimeout(t)}},s.prototype.clearScrollTimeout=function(){null!==this._preventScrollTimeout&&clearTimeout(this._preventScrollTimeout),this.preventScroll=!1,this._preventScrollTimeout=null},s.prototype.preventScrollTimeout=function(e){null!==this._preventScrollTimeout&&clearTimeout(this._preventScrollTimeout),this.preventScroll=!0,e.preventDefault(),this._preventScrollTimeout=setTimeout(t.proxy(function(){this.preventScroll=!1,this._preventScrollTimeout=null},this),400)},s}),N2Require("SmartSliderControlTilt",[],[],function(t,e,i){"use strict";function s(e,i){return"undefined"==typeof window.DeviceOrientationEvent||"undefined"==typeof window.orientation?"Not supported":(this.timeout=null,this.slider=e,this.parameters=t.extend({duration:2e3},i),this.orientationchange(),window.addEventListener("orientationchange",t.proxy(this.orientationchange,this)),window.addEventListener("deviceorientation",t.proxy(this.handleOrientation,this),!0),void(e.controls.tilt=this))}return s.prototype.orientationchange=function(){switch(window.orientation){case-90:case 90:this.parseEvent=s.prototype.parseEventHorizontalLandscape;break;default:this.parseEvent=s.prototype.parseEventHorizontal}},s.prototype.clearTimeout=function(){this.timeout=null},s.prototype.handleOrientation=function(e){null==this.timeout&&this.parseEvent.call(this,e)&&(this.timeout=setTimeout(t.proxy(this.clearTimeout,this),this.parameters.duration),e.preventDefault())},s.prototype.parseEventHorizontal=function(t){return t.gamma>10?(this.slider.next(),!0):t.gamma<-10?(this.slider.previous(),!0):!1},s.prototype.parseEventHorizontalLandscape=function(t){return t.beta<-10?(this.slider.next(),!0):t.beta>10?(this.slider.previous(),!0):!1},s}),N2Require("SmartSliderControlTouch",[],[],function(t,e,i){"use strict";function s(e,i,s){this.currentAnimation=null,this.slider=e,this._animation=e.mainAnimation,this.parameters=t.extend({fallbackToMouseEvents:!0},s),this.swipeElement=this.slider.sliderElement.find("> .n2-ss-swipe-element"),"vertical"==i?this.setVertical():"horizontal"==i&&this.setHorizontal();var n=t.proxy(function(){var t=this;this._animation.isNoAnimation?N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(){r=!1},move:function(e,i,s,n,o){var a=t._direction.measure(s);if(!o&&"unknown"!=a&&null===t.currentAnimation){if("ended"!=t._animation.state)return!1;t.distance=[0],t.swipeElement.addClass("n2-grabbing"),t.currentAnimation={direction:a};var l=t.slider.isChangePossible(t._direction[a]);if(!l)return t.currentAnimation=null,!1}if(t.currentAnimation){var h=t._direction.get(s,t.currentAnimation.direction);if(t.logDistance(h),(r||Math.abs(h)>t._direction.minDistance)&&e.cancelable)return r=!0,!0}return!1},end:function(e,i,s,n,r){if(null!==t.currentAnimation){var o=r?0:t.measureRealDirection();o&&t.slider[t._direction[t.currentAnimation.direction]](),t.swipeElement.removeClass("n2-grabbing"),t.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?t.onTap(e):nextend.preventClick()}}):N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(t,e){r=!1},move:function(e,i,s,n,o){var a=t._direction.measure(s);if(!o&&"unknown"!=a&&null===t.currentAnimation){if("ended"!=t._animation.state)return!1;t.distance=[0],t.swipeElement.addClass("n2-grabbing"),t._animation.setTouch(t._direction.axis),t.currentAnimation={direction:a,percent:0};var l=t.slider[t._direction[a]](!1);if(!l)return t._animation.setTouch(!1),t.currentAnimation=null,!1}if(t.currentAnimation){var h=t._direction.get(s,t.currentAnimation.direction);if(t.logDistance(h),t.currentAnimation.percent<1){var d=Math.max(-.99999,Math.min(.99999,h/t.slider.dimensions.slider[t._property]));t.currentAnimation.percent=d,t._animation.setTouchProgress(d)}if((r||Math.abs(h)>t._direction.minDistance)&&e.cancelable)return r=!0,!0}return!1},end:function(e,i,s,n,r){if(null!==t.currentAnimation){var o=r?0:t.measureRealDirection(),a=t._animation.timeline.progress();1!=a&&t._animation.setTouchEnd(o,t.currentAnimation.percent,s.time),t.swipeElement.removeClass("n2-grabbing"),t._animation.setTouch(!1),t.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?t.onTap(e):nextend.preventClick()}})},this);if(navigator.userAgent.toLowerCase().indexOf("android")>-1){var o=this.swipeElement.parent();1!=o.css("opacity")?this.swipeElement.parent().one("transitionend",n):n()}else n();this.parameters.fallbackToMouseEvents||this.swipeElement.on("click",t.proxy(this.onTap,this)),this.parameters.fallbackToMouseEvents&&this.swipeElement.addClass("n2-grab"),e.controls.touch=this}var n=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,r=!1,o=!1;return s.prototype.setHorizontal=function(){this._property="width",this._direction={left:nextend.rtl.next,right:nextend.rtl.previous,up:null,down:null,axis:"horizontal",minDistance:10,measure:function(t){return!r&&Math.abs(t.x)<10||0==t.x||Math.abs(t.x)<Math.abs(t.y)?"unknown":t.x<0?"left":"right"},get:function(t,e){return"left"==e?-t.x:t.x}},n&&(this.swipeElement.css("-ms-touch-action","pan-y"),this.swipeElement.css("touch-action","pan-y"))},s.prototype.setVertical=function(){this._property="height",this._direction={left:null,right:null,up:"next",down:"previous",axis:"vertical",minDistance:1,measure:function(t){return!r&&Math.abs(t.y)<1||0==t.y||Math.abs(t.y)<Math.abs(t.x)?"unknown":t.y<0?"up":"down"},get:function(t,e){return"up"==e?-t.y:t.y}},n&&(this.swipeElement.css("-ms-touch-action","pan-x"),this.swipeElement.css("touch-action","pan-x"))},s.prototype.logDistance=function(t){this.distance.length>3&&this.distance.shift(),this.distance.push(t)},s.prototype.measureRealDirection=function(){var t=this.distance[0],e=this.distance[this.distance.length-1];return e>=0&&t>e||0>e&&e>t?0:1},s.prototype.onTap=function(e){o||(t(e.target).trigger("n2click"),o=!0,setTimeout(function(){o=!1},500))},s}),N2Require("FrontendLayerAnimations",[],[],function(t,e,i){function s(t,e){this.status=r.NOT_INITIALIZED,this.inStatus=o.NOT_INITIALIZED,this.loopStatus=a.NOT_INITIALIZED,this.outStatus=l.NOT_INITIALIZED,this.currentZero=h,this.repeatable=0,this.transformOriginIn="50% 50% 0",this.transformOriginOut="50% 50% 0",this.startDelay=0,this.skipLoop=0,this.$layer=t,this.$animatableElement=e,t.data("LayerAnimation",this),s.PERSPECTIVE>0&&NextendTween.set(this.$layer.parent(),{perspective:s.PERSPECTIVE})}function n(t,e,i,s,n,r,o){this.status=d.NOT_INITIALIZED,this.single=!1,this.transformOrigin="50% 50% 0",this._counter=0,this.inAnimation=null,this.timeline=null,this.outAnimation=null,this.layers=t,this.$layer=e,this.$animatableElement=i,this.animations=s,this.timelineMode=o,this.transformOrigin=s.transformOriginLoop.split("|*|").join("% ")+"px",this.repeatCount=s.repeatCount,0==this.repeatCount&&"linear"==o&&(this.repeatCount=1),this.repeatStartDelay=Math.max(0,s.repeatStartDelay),this.repeatSelfOnly=s.loopRepeatSelfOnly,this.refresh(n,r)}var r={NOT_INITIALIZED:-1,INITIALIZED:1,PLAY_IN_DISABLED:2,PLAY_IN_STARTED:3,PLAY_IN_PAUSED:4,PLAY_IN_ENDED:5,PLAY_LOOP_STARTED:6,PLAY_LOOP_PAUSED:7,PLAY_LOOP_ENDED:8,PLAY_OUT_STARTED:9,PLAY_OUT_PAUSED:10,PLAY_OUT_ENDED:11},o={NOT_INITIALIZED:-1,NO:0,INITIALIZED:1},a={NOT_INITIALIZED:-1,NO:0,INITIALIZED:1},l={NOT_INITIALIZED:-1,NO:0,INITIALIZED:1},h={opacity:1,x:0,y:0,z:0,rotationX:0,rotationY:0,rotationZ:0,scaleX:1,scaleY:1,scaleZ:1,skewX:0,n2blur:0};s.PERSPECTIVE=1e3,s.prototype.setLinear=function(e,i,s){this.timelineMode="linear",this.animations=null;var n=e.animations.getData();"object"==typeof n&&(this.animations=t.extend({repeatable:0,"in":[],specialZeroIn:0,transformOriginIn:"50|*|50|*|0",inPlayEvent:"",loop:[],repeatCount:0,repeatStartDelay:0,transformOriginLoop:"50|*|50|*|0",loopPlayEvent:"",loopPauseEvent:"",loopStopEvent:"",loopRepeatSelfOnly:0,out:[],transformOriginOut:"50|*|50|*|0",outPlayEvent:"",instantOut:1},n),this.transformOriginIn=this.animations.transformOriginIn.split("|*|").join("% ")+"px",this.transformOriginOut=this.animations.transformOriginOut.split("|*|").join("% ")+"px",this.repeatable=this.animations.repeatable?1:0,this._fillAnimations(this.animations["in"]),this._fillAnimations(this.animations.loop),this._fillAnimations(this.animations.out));var o=this.linearMode(i,s);return this.status=r.INITIALIZED,o},s.prototype.setEventBased=function(e,i,s){this.slide=e,this.timelineMode="event";var n=!1,o=this.$layer.data("animations");1==o||o&&(n=t.parseJSON(Base64.decode(o))),"object"==typeof n?(this.animations=t.extend({repeatable:0,"in":[],specialZeroIn:0,transformOriginIn:"50|*|50|*|0",inPlayEvent:"",loop:[],repeatCount:0,repeatStartDelay:0,transformOriginLoop:"50|*|50|*|0",loopPlayEvent:"",loopPauseEvent:"",loopStopEvent:"",loopRepeatSelfOnly:0,out:[],transformOriginOut:"50|*|50|*|0",outPlayEvent:"",instantOut:1},n),this.transformOriginIn=this.animations.transformOriginIn.split("|*|").join("% ")+"px",this.transformOriginOut=this.animations.transformOriginOut.split("|*|").join("% ")+"px"):this.animations={repeatable:0,"in":[],inPlayEvent:"",loop:[],loopPlayEvent:"",loopPauseEvent:"",loopStopEvent:"",loopRepeatSelfOnly:0,out:[],outPlayEvent:"",instantOut:1},e.$element.on({"layerSetZero.n2-ss-animations":t.proxy(this.setZero,this),"layerSetZeroAll.n2-ss-animations":t.proxy(this.setZeroAll,this),"layerAnimationSetStart.n2-ss-animations":t.proxy(this.start,this),"layerPause.n2-ss-animations":t.proxy(this.pause,this),"layerReset.n2-ss-animations":t.proxy(this.reset,this),"beforeMainSwitch.n2-ss-animations":t.proxy(this.beforeMainSwitch,this)}),this.repeatable=this.animations.repeatable?1:0,this.repeatable&&""==this.animations.inPlayEvent&&(this.animations.inPlayEvent="layerAnimationPlayIn,OutComplete",""==this.animations.loopPlayEvent&&(this.animations.loopPlayEvent="InComplete"),""==this.animations.outPlayEvent&&(this.animations.outPlayEvent="LoopComplete")),this.animations.instantOut&&(this.animations.outPlayEvent="LoopComplete"),""==this.animations.inPlayEvent&&(this.animations.inPlayEvent="layerAnimationPlayIn"),""==this.animations.loopPlayEvent&&(this.animations.loopPlayEvent="InComplete"),this._fillAnimations(this.animations["in"]),this._fillAnimations(this.animations.loop),this._fillAnimations(this.animations.out),this.eventDrivenMode(i,s),this.status=r.INITIALIZED},s.prototype._fillAnimations=function(e){for(var i=0;i<e.length;i++)e[i]=t.extend({name:"Animation",duration:.8,delay:0,ease:"easeOutCubic",opacity:1,x:0,y:0,z:0,rotationX:0,rotationY:0,rotationZ:0,scaleX:1,scaleY:1,scaleZ:1,skewX:0,n2blur:0},e[i])},s.prototype.eventDrivenMode=function(e,i){this.subscribeEvent("mainAnimationStartIn",t.proxy(this.resume,this)),this.inTimeline=new NextendTimeline({paused:1,onComplete:t.proxy(this.inComplete,this)}),this.animations["in"]&&this.animations["in"].length&&this.buildTimelineIn(this.inTimeline,this.animations["in"],e,i,0),this.$layer.triggerHandler("layerExtendTimelineIn",[this.inTimeline,0]),this.inTimeline.totalDuration()?(this.inTimeline.set(this.$animatableElement,{transformOrigin:this.transformOriginIn,immediateRender:!0},0),this.subscribeEvent(this.animations.inPlayEvent,t.proxy(this.playIn,this)),this.inStatus=o.INITIALIZED):(this.subscribeEvent(this.animations.inPlayEvent,t.proxy(this.playIn,this)),this.inStatus=o.NO,this.inTimeline=null),this.animations.loop&&0!=this.animations.loop.length?(this.loop=new n(this,this.$layer,this.$animatableElement,this.animations,e,i,this.timelineMode),this.subscribeEvent(this.animations.loopPlayEvent,t.proxy(this.playLoop,this)),this.loopStatus=a.INITIALIZED):(this.loopStatus=a.NO,this.subscribeEvent("InComplete",t.proxy(this.loopComplete,this))),this.outTimeline=new NextendTimeline({paused:1,onComplete:t.proxy(this.outComplete,this)}),this.animations.out&&this.animations.out.length&&this.buildTimelineOut(this.outTimeline,this.animations.out,e,i,0),this.$layer.triggerHandler("layerExtendTimelineOut",[this.outTimeline,0]),this.outTimeline.totalDuration()?(this.outTimeline.set(this.$animatableElement,{transformOrigin:this.transformOriginOut},0),this.subscribeEvent(this.animations.outPlayEvent,t.proxy(this.playOut,this)),this.outStatus=l.INITIALIZED):(this.subscribeEvent("LoopComplete",t.proxy(this.outComplete,this)),this.outStatus=l.NO,this.outTimeline=null),this.inStatus==o.NO&&this.loopStatus==a.No&&this.outStatus==l.NO&&this.slide.$element.off("n2-ss-animations")},s.prototype.linearMode=function(t,e){if(this.$layer.triggerHandler("refreshTimeline"),this.animations){this.linearTimeline=new NextendTimeline({paused:1});var i=0;return this.animations["in"]&&0!=this.animations["in"].length?(this.linearTimeline.set(this.$animatableElement,{transformOrigin:this.transformOriginIn}),this.buildTimelineIn(this.linearTimeline,this.animations["in"],t,e,i),this.inStatus=o.INITIALIZED):this.inStatus=o.NO,this.$layer.triggerHandler("layerExtendTimelineIn",[this.linearTimeline,i]),this.animations.loop&&0!=this.animations.loop.length?new n(this,this.$layer,this.$animatableElement,this.animations,t,e,this.timelineMode):this.loopStatus=a.NO,i=this.linearTimeline.totalDuration(),this.$layer.triggerHandler("layerExtendTimelineOut",[this.linearTimeline,i]),this.animations.out&&0!=this.animations.out.length?(this.linearTimeline.set(this.$animatableElement,{transformOrigin:this.transformOriginOut}),this.buildTimelineOut(this.linearTimeline,this.animations.out,t,e,i),this.outStatus=l.INITIALIZED):this.outStatus=l.NO,!0}var s=this.$layer.triggerHandler("needExtendTimelineIn"),r=this.$layer.triggerHandler("needExtendTimelineOut");if(s||r){this.linearTimeline=new NextendTimeline({paused:1});var i=0;return s&&(this.$layer.triggerHandler("layerExtendTimelineIn",[this.linearTimeline,i]),i=this.linearTimeline.totalDuration()),r&&this.$layer.triggerHandler("layerExtendTimelineOut",[this.linearTimeline,i]),!0}return!1},s.prototype.refresh=function(e,i){this.reset(),this.setZero(),this.$layer.triggerHandler("refreshTimeline"),this.inTimeline=new NextendTimeline({paused:1,onComplete:t.proxy(this.inComplete,this)}),this.animations["in"]&&this.animations["in"].length&&this.buildTimelineIn(this.inTimeline,this.animations["in"],e,i,0),this.$layer.triggerHandler("layerExtendTimelineIn",[this.inTimeline,0]),this.inTimeline.totalDuration()?this.inStatus=o.INITIALIZED:this.inTimeline=null,this.animations.loop&&0!=this.animations.loop.length?(this.loop.refresh(e,i),this.loopStatus=a.INITIALIZED):this.loopStatus=a.NO,this.outTimeline=new NextendTimeline({paused:1,onComplete:t.proxy(this.outComplete,this)}),this.animations.out&&this.animations.out.length&&this.buildTimelineOut(this.outTimeline,this.animations.out,e,i,0),this.$layer.triggerHandler("layerExtendTimelineOut",[this.outTimeline,0]),this.outTimeline.totalDuration()?this.outStatus=l.INITIALIZED:(this.outStatus=l.NO,this.outTimeline=null)},s.prototype.setZero=function(){NextendTween.set(this.$animatableElement,t.extend({clearProps:"transform,n2blur"},h)),this.$layer.triggerHandler("AnimationSetZero")},s.prototype.setZeroAll=function(){this.inStatus==o.INITIALIZED&&this.inTimeline.progress(1),this.setZero()},s.prototype.subscribeEvent=function(e,i){for(var s=e.split(","),n=0;n<s.length;n++)if(s[n].length){var r=s[n].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;default:var a=!1,l={"do":0,cancel:0};this.slide.$element.on(o,function(){l["do"]&&clearTimeout(l["do"]),l["do"]=setTimeout(function(){a||i(),a=!1},50)}),this.slide.$element.on("cancel-"+o,function(){a=!0,l.cancel&&clearTimeout(l.cancel),l.cancel=setTimeout(function(){a=!1},70)})}}},s.prototype.loopEvents=function(e){e?(""!=this.animations.loopPauseEvent&&this.subscribeEvent(this.animations.loopPauseEvent+".n2-ss-loop",t.proxy(function(){this.loop&&this.loop.pause()},this)),""!=this.animations.loopStopEvent&&this.subscribeEvent(this.animations.loopStopEvent+".n2-ss-loop",t.proxy(function(){this.loop&&this.loop.end()},this))):this.$layer.off(".n2-ss-loop")},s.prototype.start=function(){this.outStatus!=l.NO&&(this.inStatus==o.NO&&this.outTimeline.progress(.9999),
this.outTimeline.pause(0,!1)),this.inStatus!=o.NO&&this.inTimeline.progress(.9999).pause(0,!1),this.status=r.INITIALIZED},s.prototype.playIn=function(){this.status==r.INITIALIZED?(this.status=r.PLAY_IN_STARTED,this.inStatus!=o.NO?1==this.inTimeline.progress()?this.inTimeline.play(this.startDelay):this.inTimeline.play():this.inComplete()):this.status==r.PLAY_IN_STARTED?this.skipLoop&&(this.skipLoop=0,this.$layer.off("InComplete.n2-instant-out")):this.status==r.PLAY_OUT_STARTED?(this.$layer.one("OutComplete.n2-instant-in",t.proxy(function(){this.playIn()},this)),this.outTimeline.totalDuration(.3)):this.status==r.PLAY_LOOP_STARTED?(this.$layer.one("OutComplete.n2-instant-in",t.proxy(function(){this.playIn()},this)),this.outTimeline.totalDuration(.3)):this.status==r.PLAY_LOOP_ENDED&&(this.$layer.one("OutComplete.n2-instant-in",t.proxy(function(){this.playIn()},this)),this.outTimeline.totalDuration(.3))},s.prototype.inComplete=function(){this.inPlayed=1,this.status=r.PLAY_IN_ENDED,this.$layer.triggerHandler("InComplete")},s.prototype.playLoop=function(){this.status!=r.PLAY_IN_ENDED||this.skipLoop?this.status==r.PLAY_LOOP_STARTED&&this.loop.playIn():(this.status=r.PLAY_LOOP_STARTED,this.loopStatus!=a.NO?(this.$layer.off(".FrontendLayerAnimations").on("_LoopComplete.FrontendLayerAnimations",t.proxy(this.loopComplete,this)),this.loop.playIn()):this.loopComplete())},s.prototype.loopComplete=function(){1!=this.animations.loopRepeatSelfOnly||this.skipLoop?(this.status=r.PLAY_LOOP_ENDED,this.$layer.triggerHandler("LoopComplete")):this.status=r.PLAY_IN_ENDED},s.prototype.playOut=function(){this.status==r.PLAY_IN_STARTED?this.skipLoop||(this.skipLoop=1,this.$layer.one("InComplete.n2-instant-out",t.proxy(function(){this.skipLoop=0,this.loopComplete(),this._playOut()},this))):this.status==r.PLAY_IN_ENDED?(this.loopComplete(),this._playOut()):this.status==r.PLAY_LOOP_STARTED?(this.$layer.off("OutComplete.n2-instant-in"),this.$layer.one("LoopComplete",t.proxy(this._playOut,this)),this.loop.end()):this.status==r.PLAY_LOOP_ENDED?(this.$layer.off("OutComplete.n2-instant-in"),this._playOut()):this.status==r.PLAY_OUT_STARTED?this.$layer.off("OutComplete.n2-instant-in"):this.$layer.off("OutComplete.n2-instant-in")},s.prototype._playOut=function(){this.status==r.PLAY_LOOP_ENDED&&(this.status=r.PLAY_OUT_STARTED,this.outStatus!=l.NO?1==this.outTimeline.progress()?(this.outTimeline.timeScale(1),this.outTimeline.play(0)):this.outTimeline.play():this.outComplete())},s.prototype.outComplete=function(){!this.repeatable||this.inStatus==o.NO&&this.loopStatus==a.NO&&this.outStatus==o.NO?this.status=r.PLAY_OUT_ENDED:(this.status=r.INITIALIZED,NextendTween.set(this.$animatableElement,{transformOrigin:this.transformOriginIn}),this.loopStatus!=a.NO&&this.loop.replay()),this.$layer.triggerHandler("OutComplete")},s.prototype.beforeMainSwitch=function(t,e){this.status==r.INITIALIZED&&(this.status=r.PLAY_IN_DISABLED),e.push(this.end())},s.prototype.end=function(){if(this.status>r.PLAY_IN_DISABLED&&this.status<r.PLAY_OUT_ENDED){var e=t.Deferred();return this.$layer.one("OutComplete",t.proxy(function(){this.status=r.PLAY_IN_DISABLED,e.resolve()},this)),this.playOut(),e}return!0},s.prototype.reset=function(){switch(this.status){case r.PLAY_OUT_STARTED:this.outTimeline.pause(0);break;case r.PLAY_LOOP_STARTED:this.loop.reset();break;case r.PLAY_IN_STARTED:this.inTimeline.pause(0)}this.status=r.INITIALIZED},s.prototype.pause=function(){switch(this.paused=!0,this.status){case r.INITIALIZED:this.status=r.PLAY_IN_DISABLED;break;case r.PLAY_IN_STARTED:this.status=r.PLAY_IN_PAUSED,this.inTimeline.pause();break;case r.PLAY_LOOP_STARTED:this.status=r.PLAY_LOOP_PAUSED,this.loop.pause();break;case r.PLAY_OUT_STARTED:this.status=r.PLAY_OUT_PAUSED,this.outTimeline.pause()}},s.prototype.resume=function(){this.status==r.PLAY_IN_DISABLED?this.status=r.INITIALIZED:this.status==r.PLAY_IN_PAUSED?(this.status=r.PLAY_IN_STARTED,this.inTimeline.play()):this.status==r.PLAY_LOOP_PAUSED?(this.status=r.PLAY_LOOP_STARTED,this.loop.play()):this.status==r.PLAY_OUT_PAUSED&&(this.status=r.PLAY_OUT_STARTED,this.outTimeline.play())},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,s,n,r){if(i=t.extend(!0,[],i),this.animations.specialZeroIn&&i.length>0&&(this.currentZero=i.pop(),delete this.currentZero.name,delete this.currentZero.duration,delete this.currentZero.delay,delete this.currentZero.ease,this.currentZero.x=this.currentZero.x*s,this.currentZero.y=this.currentZero.y*n,this.currentZero.rotationX=-this.currentZero.rotationX,this.currentZero.rotationY=-this.currentZero.rotationY,this.currentZero.rotationZ=-this.currentZero.rotationZ,this.setCurrentZero()),i.length>0){var o=this._buildAnimationChainIn(i,s,n,this.currentZero);if(o.length>0){var a=0;for(this.startDelay=o[a].to.delay,e.fromTo(this.$animatableElement,o[a].duration,o[a].from,o[a].to,0,r),r+=o[a].duration+o[a].to.delay,a++;a<o.length;a++)e.to(this.$animatableElement,o[a].duration,o[a].to,r),r+=o[a].duration+o[a].to.delay}}},s.prototype._buildAnimationChainIn=function(e,i,s,n){for(var r=[{from:n}],o=e.length-1;o>=0;o--){var a=t.extend(!0,{},e[o]),l=a.delay,h=a.duration,d=a.ease;delete a.delay,delete a.duration,delete a.ease,delete a.name;var p=r[0].from;a.x=-a.x*i,a.y=-a.y*s,a.z=-a.z,a.rotationX=-a.rotationX,a.rotationY=-a.rotationY,a.rotationZ=-a.rotationZ,r.unshift({duration:h,from:a,to:t.extend({},p,{ease:d,delay:l})})}return r.pop(),r},s.prototype.buildTimelineOut=function(e,i,s,n,r){i=t.extend(!0,[],i);var o=this._buildAnimationChainOut(i,s,n),a=0;if(o.length>0)for(0!=r?e.to(this.$animatableElement,o[a].duration,o[a].to,r):e.fromTo(this.$animatableElement,o[a].duration,o[a].from,o[a].to,r),r+=o[a].duration+o[a].to.delay,a++;a<o.length;a++)e.to(this.$animatableElement,o[a].duration,o[a].to,r),r+=o[a].duration+o[a].to.delay},s.prototype._buildAnimationChainOut=function(e,i,s){for(var n=[{to:this.currentZero}],r=0;r<e.length;r++){var o=t.extend(!0,{},e[r]),a=o.duration;delete o.duration,delete o.name;var l=t.extend({immediateRender:!1},n[n.length-1].to);delete l.delay,delete l.ease,o.x=o.x*i,o.y=o.y*s,n.push({duration:a,from:l,to:o})}return n.shift(),n};var d={NOT_INITIALIZED:-1,INITIALIZED:1,PLAY_IN_STARTED:2,PLAY_IN_PAUSED:3,PLAY_IN_ENDED:4,PLAY_LOOP_STARTED:5,PLAY_LOOP_PAUSED:6,PLAY_LOOP_ENDED:7,PLAY_OUT_STARTED:8,PLAY_OUT_PAUSED:9,PLAY_OUT_ENDED:10};return n.prototype.refresh=function(e,i){this.timeline=new NextendTimeline({paused:!0}),this.buildTimelineLoop(t.extend(!0,[],this.animations.loop),e,i),this.status=d.INITIALIZED},n.prototype.playIn=function(){if(this.status==d.INITIALIZED||this.status==d.PLAY_OUT_ENDED)if(NextendTween.set(this.$animatableElement,{transformOrigin:this.transformOrigin}),this.single)this.status=d.PLAY_IN_ENDED,this.timeline.delay(this.repeatStartDelay),this.playLoop();else{this.status=d.PLAY_IN_STARTED;var e=t.extend({},this.zero.from);e.delay=this.repeatStartDelay,e.onComplete=t.proxy(function(){this.status=d.PLAY_IN_ENDED,this.playLoop()},this),this.inAnimation=NextendTween.to(this.$animatableElement,this.zero.duration/2,e)}else this.play()},n.prototype.playLoop=function(){this.status==d.PLAY_IN_ENDED&&(this.status=d.PLAY_LOOP_STARTED,this._counter=0,this.layers.loopEvents(1),this.timeline.eventCallback("onComplete",t.proxy(function(){this._counter++,this.repeatTimeline()||(this.status=d.PLAY_LOOP_ENDED,this.playOut())},this)),this.timeline.restart(!0))},n.prototype.playOut=function(){if(this.status==d.PLAY_LOOP_ENDED)if(this.single)this.status=d.PLAY_OUT_ENDED,this.$layer.triggerHandler("_LoopComplete");else{this.status=d.PLAY_OUT_STARTED;var e=t.extend({},this.layers.currentZero);e.onComplete=t.proxy(function(){this.status=d.PLAY_OUT_ENDED,this.$layer.triggerHandler("_LoopComplete")},this),this.outAnimation=NextendTween.to(this.$animatableElement,this.zero.duration/2,e)}},n.prototype.repeatTimeline=function(){return 0==this.repeatCount||this._counter<this.repeatCount?(this.timeline.restart(),this.$layer.triggerHandler("LoopRoundComplete"),!0):!1},n.prototype.pause=function(){this.status==d.PLAY_IN_STARTED?(this.status=d.PLAY_IN_PAUSED,this.inAnimation.pause()):this.status==d.PLAY_LOOP_STARTED?(this.status=d.PLAY_LOOP_PAUSED,this.timeline.pause()):this.status==d.PLAY_OUT_STARTED&&(this.status=d.PLAY_OUT_PAUSED,this.outAnimation.pause())},n.prototype.play=function(){this.status==d.PLAY_IN_PAUSED?(this.status=d.PLAY_IN_STARTED,this.inAnimation.play()):this.status==d.PLAY_LOOP_PAUSED?(this.status=d.PLAY_LOOP_STARTED,this.timeline.play()):this.status==d.PLAY_OUT_PAUSED&&(this.status=d.PLAY_OUT_STARTED,this.outAnimation.play())},n.prototype.reset=function(){this.outAnimation&&this.outAnimation.pause(0),this.timeline.pause(0),this.inAnimation&&this.inAnimation.pause(0),this.status=d.INITIALIZED},n.prototype.end=function(){var e=t.Deferred();if(this.status==d.PLAY_OUT_ENDED)return this.status=d.INITIALIZED,e.resolve(),e;switch(this.$layer.one("_LoopComplete",t.proxy(function(){this.status=d.INITIALIZED,e.resolve()},this)),this.timeline.eventCallback("onComplete",t.proxy(function(){this._counter++,0!=this.repeatCount&&this.repeatTimeline()||(this.status=d.PLAY_LOOP_ENDED,this.playOut())},this)),this.status){case d.PLAY_OUT_PAUSED:this.outAnimation.play();break;case d.PLAY_IN_PAUSED:this.inAnimation.play();break;case d.PLAY_LOOP_PAUSED:this.timeline.play()}return e},n.prototype.buildTimelineLoop=function(e,i,s){var n=this._buildAnimationChainLoop(e,i,s);if(this.zero=t.extend(!0,{},n[0]),"linear"==this.timelineMode){if(this.timeline.delay(this.repeatStartDelay),this.timeline.set(this.$animatableElement,{transformOrigin:this.transformOrigin}),!this.single){var r=t.extend({},this.zero.from);this.timeline.to(this.$animatableElement,this.zero.duration/2,r)}var o=this.repeatCount;1>o&&(o=1);for(var a=0;o>a;a++)for(var l=0;l<n.length;l++)this.timeline.fromTo(this.$animatableElement,n[l].duration,t.extend({immediateRender:!1},n[l].from),t.extend({},n[l].to));this.single||this.timeline.to(this.$animatableElement,this.zero.duration/2,t.extend({},this.layers.currentZero)),this.layers.linearTimeline.add(this.timeline),this.timeline.paused(!1)}else for(var l=0;l<n.length;l++)this.timeline.to(this.$animatableElement,n[l].duration,n[l].to)},n.prototype._buildAnimationChainLoop=function(e,i,s){if(1==e.length){this.single=!0;var n=t.extend(!0,{},e[0]),r=t.extend({},this.layers.currentZero);r.duration=n.duration,r.ease=n.ease,360!=Math.abs(n.rotationX)&&360!=Math.abs(n.rotationY)&&360!=Math.abs(n.rotationZ)||1!=n.opacity||0!=n.x||0!=n.y||0!=n.z||1!=n.scaleX||1!=n.scaleY||1!=n.scaleZ||0!=n.skewX||0!=n.n2blur?e.push(r):(360==n.rotationX?n.rotationX="+=360":-360==n.rotationX&&(n.rotationX="-=360"),360==n.rotationY?n.rotationY="+=360":-360==n.rotationY&&(n.rotationY="-=360"),360==n.rotationZ?n.rotationZ="+=360":-360==n.rotationZ&&(n.rotationZ="-=360"))}var o=0;delete e[o].name,e[o].x=e[o].x*i,e[o].y=e[o].y*s;var a=[{duration:e[o].duration,from:t.extend({},this.layers.currentZero),to:e[o]}];for(o++;o<e.length;o++){var r=e[o],l=r.duration;delete r.duration,delete r.name;var h=t.extend({},a[a.length-1].to);delete h.delay,delete h.ease,r.x=r.x*i,r.y=r.y*s,a.push({duration:l,from:h,to:r})}return this.single||(a.push({duration:a[0].duration,from:t.extend({},a[a.length-1].to),to:t.extend({},a[0].to)}),a.shift(),delete a[0].from.duration),a},n.prototype.replay=function(){this.status=d.INITIALIZED,this._counter=0},s}),N2Require("SmartSliderBackgroundImage",[],[],function(t,e,i){function s(e,i,s){this.loadStarted=!1,this.loadAllowed=!1,this.width=0,this.height=0,this.slide=e,this.element=i,this.$mask=this.element.find(".n2-ss-slide-background-mask"),this.manager=s,this.loadDeferred=t.Deferred(),this.currentSrc="",this.mode=i.data("mode"),this.opacity=i.data("opacity"),this.blur=i.data("blur"),this.x=i.data("x"),this.y=i.data("y"),this.hasImage=!1,this.$image=this.$mask.find("img"),this.$image.length?(this.hasImage=!0,this.startImageMode()):this.startColorMode()}var n={_windowHeight:0,$window:null,isStarted:!1,elements:[],start:function(){this.isStarted||(this.$window=t(window),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),"scroll.n2-ss-bg-parallax":t.proxy(this.resize,this)}).on({"scroll.n2-ss-bg-parallax":t.proxy(this.render,this),"resize.n2-ss-bg-parallax":t.proxy(this.render,this)}),this.isStarted=!0)},end:function(){this.isStarted&&(this.$window.off(".n2-ss-bg-parallax"),this.isStarted=!1)},addElement:function(t,e){this.elements.push({$element:t,$parent:e.parent()}),NextendTween.set(e,{overflow:"hidden",backfaceVisibility:"hidden",transformStyle:"preserve-3d"}),this.start(),this._resizeElement(this.elements[this.elements.length-1])},removeElement:function(t){for(var e=0;e<this.elements.length;e++)if(this.elements[e].$element==t){this.elements.splice(e,1);break}0==this.elements.length&&this.end()},resize:function(){this._windowHeight=200+(window.n2ClientHeight||document.documentElement.clientHeight||document.body.clientHeight);for(var t=0;t<this.elements.length;t++)this._resizeElement(this.elements[t])},_resizeElement:function(t){var e=t.$parent;t.offsetTop=e.offset().top,NextendTween.set(t.$element,{marginTop:-100,height:this._windowHeight})},render:function(){for(var t=this.$window.scrollTop(),e=0;e<this.elements.length;e++)NextendTween.to(this.elements[e].$element,.4,{y:t-this.elements[e].offsetTop})}};return s.prototype.startColorMode=function(){this.loadDeferred.resolve()},s.prototype.startImageMode=function(){if("fixed"==this.mode&&(n2const.isPhone&&!this.slide.slider.parameters["background.parallax.mobile"]||n2const.isTablet&&!this.slide.slider.parameters["background.parallax.tablet"])&&(this.mode="fill"),this.$image.css("display","none"),this.$background=t('<div class="n2-ss-background-image"/>').css({opacity:this.opacity,backgroundPosition:this.x+"% "+this.y+"%"}).appendTo(this.$mask),window.n2FilterProperty&&(this.blur>0?this.$background.css({margin:"-"+2*this.blur+"px",padding:2*this.blur+"px"}).css(window.n2FilterProperty,"blur("+this.blur+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),"fixed"==this.mode&&this.startFixed(),this.desktopSrc=this.element.data("desktop")||"",this.tabletSrc=this.element.data("tablet")||"",this.mobileSrc=this.element.data("mobile")||"",nextend.isRetina){var e=this.element.data("desktop-retina");e&&(this.desktopSrc=e),e=this.element.data("tablet-retina"),e&&(this.tabletSrc=e),e=this.element.data("mobile-retina"),e&&(this.mobileSrc=e)}},s.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.loadAllowed=!0,this.manager.deviceDeferred.done(t.proxy(function(){this.updateBackgroundToDevice(this.manager.device),this.$background.n2imagesLoaded({background:!0},t.proxy(function(t){var e=t.images[0].img;this.width=e.naturalWidth,this.height=e.naturalHeight,this.isLoaded=!0,this.loadDeferred.resolve(this.element)},this))},this))),this.loadDeferred},s.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("")},s.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)},s.prototype.startFixed=function(){n2const.isEdge||(this.slide.slider.parameters.allowBGImageAttachmentFixed&&!n2const.isIOS?(this.$background.css("background-repeat","repeat"),this.$background.css("position","static"),this.$background.css("background-attachment","fixed")):n2const.isIE||this.slide.slider.startedDeferred.done(t.proxy(function(){n.addElement(this.$background,this.element)},this)))},s.prototype.hack=function(){NextendTween.set(this.element,{rotation:1e-4})},s}),N2Require("SmartSliderBackgroundVideo",[],[],function(t,e,i){function s(e,s){if(n)if(this.slide=e,this.slider=e.slider,this.isResized=!1,this.isPaused=!0,this.$video=s,this.hasVideo=!0,this.isReady=!1,s[0].videoWidth>0)this.onReady();else{s[0].addEventListener("error",t.proxy(this.onError,this),!0),s[0].addEventListener("canplay",t.proxy(this.onReady,this)),s[0].addEventListener("loadedmetadata",t.proxy(this.onReady,this),!1);var r=t.proxy(function(){setTimeout(t.proxy(function(){0==s[0].networkState&&this.onError()},this),100)},this);s[0].n2LoadStarted==i?s[0].addEventListener("loadstart",r,!0):r()}else this.hasVideo=!1,s.remove()}var n=!/Mobi/.test(navigator.userAgent)||"playsInline"in document.createElement("video")||"webkit-playsinline"in document.createElement("video")||navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)&&parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2])>=53;return s.prototype.onReady=function(){if(!this.isReady){this.isReady=!0;var e=this.$video;e.data("ratio")||(e.data("ratio",e[0].videoWidth/e[0].videoHeight),e.addClass("n2-active"),this.slider.sliderElement.on("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.isPaused||this.play()},this))),this.slide.$element.on({mainAnimationStartIn:t.proxy(this.play,this),mainAnimationStartInCancel:t.proxy(this.pause,this),mainAnimationCompleteOut:t.proxy(this.pause,this)})}},s.prototype.onError=function(){this.$video.remove()},s.prototype.pause=function(){this.hasVideo&&(this.$video[0].videoWidth>0&&this.$video[0].pause(),this.isPaused=!0)},s.prototype.play=function(){this.hasVideo&&(this.$video[0].videoWidth>0&&this.$video[0].play(),this.isPaused=!1)},s.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()},s.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).css(nextend.rtl.marginLeft,0),this.center()},s.prototype.center=function(){var t=this.$video,e=t.parent();t.css({marginTop:parseInt((e.height()-t.height())/2)}),t.css(nextend.rtl.marginLeft,parseInt((e.width()-t.width())/2))},s}),N2Require("FrontendComponent",[],[],function(t,e,i){function s(t,i,s,n){this.wraps={},this.isVisible=!0,this.device="",this.children=[],this.slide=t,this.parent=i,this.$layer=s.data("layer",this);var r=this.$layer.find("> .n2-ss-layer-mask");r.length&&(this.wraps.mask=r);var o=this.$layer.find("> .n2-ss-layer-parallax");switch(o.length&&(this.wraps.parallax=o),s.data("pm")){case"absolute":this.placement=new e.FrontendPlacementAbsolute(this);break;case"normal":this.placement=new e.FrontendPlacementNormal(this);break;case"content":this.placement=new e.FrontendPlacementContent(this);break;default:this.placement=new e.FrontendPlacementDefault(this)}if(this.animations=s.data("animations"),this.parallax=s.data("parallax"),this.baseSize=this.baseSize||100,this.isAdaptiveFont=this.get("adaptivefont"),this.refreshBaseSize(this.getDevice("fontsize")),n)for(var a=0;a<n.length;a++)switch(n.eq(a).data("type")){case"content":this.children.push(new e.FrontendComponentContent(this.slide,this,n.eq(a)));break;case"row":this.children.push(new e.FrontendComponentRow(this.slide,this,n.eq(a)));break;case"col":this.children.push(new e.FrontendComponentCol(this.slide,this,n.eq(a)));break;case"group":this.children.push(new e.FrontendComponentGroup(this.slide,this,n.eq(a)));break;default:this.children.push(new e.FrontendComponentLayer(this.slide,this,n.eq(a)))}}return s.prototype.refreshBaseSize=function(t){this.isAdaptiveFont?this.baseSize=16*t/100:this.baseSize=this.parent.baseSize*t/100},s.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})}},s.prototype.onDeviceChange=function(t){this.device=t;var e=this.isVisible;if(this.isVisible=this.getDevice(""),this.isVisible===i&&(this.isVisible=1),e&&!this.isVisible?(this.$layer.data("shows",0),this.$layer.css("display","none")):!e&&this.isVisible&&(this.$layer.data("shows",1),this.$layer.css("display","block")),this.isVisible){var s=this.getDevice("fontsize");this.refreshBaseSize(s),this.isAdaptiveFont?this.$layer.css("font-size",16*s/100+"px"):this.$layer.css("font-size",s+"%");for(var n=0;n<this.children.length;n++)this.children[n].onDeviceChange(t);this.placement.onDeviceChange(t),this.onAfterDeviceChange(t)}},s.prototype.onAfterDeviceChange=function(t){},s.prototype.onResize=function(t,e,i){if(this.isVisible||this.placement.alwaysResize){for(var s=0;s<this.children.length;s++)this.children[s].onResize(t,e,i);this.placement.onResize(t,e,i)}},s.prototype.getDevice=function(t,e){var s=this.$layer.data(this.device+t);return s!=i?s:"desktopportrait"!=this.device?this.$layer.data("desktopportrait"+t):e!==i?e:0},s.prototype.get=function(t){return this.$layer.data(t)},s.prototype.createLayerAnimations=function(t,i){var s=[];if(this.isVisible){if(this.animations||this.$layer.triggerHandler("needExtendTimelineIn")||this.$layer.triggerHandler("needExtendTimelineOut")){this.$layer.triggerHandler("refreshTimeline");var n=this.$layer,r=n.data("animatableselector");r&&(n=n.find(r));var o=new e.FrontendLayerAnimations(this.$layer,n);o.setEventBased(this.slide,t,i),s.push(o)}for(var a=0;a<this.children.length;a++)s.push.apply(s,this.children[a].createLayerAnimations(t,i))}return s},s.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},s.prototype.addWrap=function(e,s){if(this.wraps[e]===i){var n=t(s);switch(e){case"rotation":this.wraps.mask!==i?n.appendTo(this.wraps.mask):this.wraps.parallax!==i?n.appendTo(this.wraps.parallax):n.appendTo(this.$layer),n.append(this.getContents())}this.wraps[e]=n}return n},s.prototype.getContents=function(){return!1},s}),N2Require("LayerParallax",[],[],function(t,e,i){function s(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({"-webkit-perspective":"none",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 n=function(t){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return function(t,i){return e.call(t,i)}}(Element.prototype);return s.prototype.resize=function(){var t=this.sliderElement.offset(),e=this.slider.responsive.responsiveDimensions;this.w2=e.width/2,this.h2=e.height/2,this.sliderOrigin={x:t.left+this.w2,y:t.top+this.h2},"slider"==this.parameters.origin&&(this.mouseOrigin=this.sliderOrigin)},s.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)}),n(this.sliderElement[0],":hover")&&this.mouseEnter(!1)),this.scrollY){var s=-1,r=1;switch(this.parameters.scrollmove){case"bottom":i>0?r=0:s=0;break;case"top":i>0?s=0:r=0}this._scrollCallback=t.proxy(this.scroll,this,i,s,r),this.window.on({"scroll.n2-ss-parallax":this._scrollCallback,"resize.n2-ss-parallax":this._scrollCallback})}},s.prototype.disable=function(){this.sliderElement.off(".n2-ss-parallax"),this.window.off("scroll.n2-ss-parallax",this._scrollCallback),this.window.off("resize.n2-ss-parallax",this._scrollCallback),this.active=!1},s.prototype.start=function(e){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?(this.active||this.enable(),this._scrollCallback&&this._scrollCallback()):(this.parallaxedNodes=null,this.parallaxedSlideNodes=null,this.active&&this.disable())},s.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},s.prototype.mouseEnter=function(t){this.ticking||(NextendTween.ticker.addEventListener("tick",this.tick,this),this.ticking=!0,t&&"enter"==this.parameters.origin&&(this.mouseOrigin={x:t.pageX,y:t.pageY}))},s.prototype.mouseMove=function(t,e,i){this.mouseOrigin===!1&&(this.mouseOrigin=this.sliderOrigin),this.mouseX&&(this.x=t*(i.pageX-this.mouseOrigin.x),this.parameters.is3D&&(this.rotationY=-this.x/this.w2)),this.mouseY&&(this.y=e*(i.pageY-this.mouseOrigin.y),this.parameters.is3D&&(this.rotationX=this.y/this.h2))},s.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),this.mouseOrigin=this.sliderOrigin},s.prototype.scroll=function(t,e,i){var s=this.window.height(),n=this.window.scrollTop();n<this.sliderOrigin.y+this.h2&&n+s>this.sliderOrigin.y-this.h2&&(this.y=Math.max(e,Math.min(i,-1+2*(this.sliderOrigin.y-(n-this.h2))/(s+2*this.h2))),this.sliderOrigin.y<s&&(this.y=Math.min(0,this.y)),this.y*=-t*this.h2*4,this.parameters.is3D&&(this.rotationX=this.y/this.h2),this.draw(!1,!0))},s.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)}},s.prototype.render=function(t,e){NextendTween.set(t,e)},s.prototype.animateRender=function(t,e){NextendTween.to(t,.6,e)},s.prototype.tick=function(){this.draw(this.mouseX,this.mouseY)},s}),N2Require("FrontendPlacement",[],[],function(t,e,i){function s(t){this.layer=t,this.alwaysResize=!1}return s.prototype.start=function(){},s.prototype.onDeviceChange=function(t){},s.prototype.onResize=function(t,e,i){},s}),N2Require("FrontendSliderSlide",["FrontendComponentSlideAbstract"],[],function(t,e,i){function s(i,s,n){this.isStaticSlide=!1,this.originalIndex=n,this.index=n,this.localIndex=n,this.$element=s.data("slide",this),this.id=this.$element.data("id"),this.backgroundImage=!1,this.backgroundVideo=!1,this.slides=[this],i.parameters.admin?this.minimumSlideDuration=0:(this.minimumSlideDuration=s.data("slide-duration"),t.isNumeric(this.minimumSlideDuration)||(this.minimumSlideDuration=0));var r=s.find(".n2-ss-layers-container");e.FrontendComponentSlideAbstract.prototype.constructor.call(this,i,r)}return s.prototype=Object.create(e.FrontendComponentSlideAbstract.prototype),s.prototype.constructor=s,s.prototype.init=function(){e.FrontendComponentSlideAbstract.prototype.init.call(this);var t=this.slider.findSlideBackground(this);t.length>0&&(this.slider.isAdmin?this.backgroundImage=new e.SmartSliderBackgroundImageAdmin(this,t,this.slider.backgroundImages):this.backgroundImage=new e.SmartSliderBackgroundImage(this,t,this.slider.backgroundImages)),this.$element.data("slideBackground",this.backgroundImage);var i=this.backgroundImage.element.find(".n2-ss-slide-background-video");i.length>0&&(this.backgroundVideo=new e.SmartSliderBackgroundVideo(this,i))},s.prototype.setStarterSlide=function(){e.FrontendComponentSlideAbstract.prototype.setStarterSlide.call(this),!this.slider.isAdmin&&this.backgroundVideo&&this.backgroundVideo.play()},s.prototype.setIndex=function(t){this.localIndex=this.index=t},s.prototype.preLoad=function(){return this.backgroundImage?this.backgroundImage.preLoad():!0},s.prototype.setPrevious=function(t){this.previousSlide=t},s.prototype.setNext=function(t){this.nextSlide=t,t.setPrevious(this)},s.prototype.hasBackgroundVideo=function(){return this.backgroundVideo},s}),N2Require("FrontendComponentSlideAbstract",["FrontendComponent"],[],function(t,e,i){function s(i,s){this.baseSize=16,this.slider=i,this.isCurrentlyEdited()||(this.status=n.NOT_INITIALIZED,e.FrontendComponent.prototype.constructor.call(this,this,this,s,s.find("> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group")),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)}),e.FrontendComponent.prototype.start.call(this))}var n={NOT_INITIALIZED:-1,INITIALIZED:0,READY_TO_START:1,PLAYING:2,ENDED:3};return s.prototype=Object.create(e.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.isCurrentlyEdited=function(){return this.slider.parameters.admin&&this.$element.hasClass("n2-ss-currently-edited-slide")},s.prototype.trigger=function(){this.$element.trigger.apply(this.$element,[].slice.call(arguments))},s.prototype.triggerHandler=function(){return this.$element.triggerHandler.apply(this.$element,[].slice.call(arguments))},s.prototype.init=function(){if(!this.isCurrentlyEdited()){this.slider.sliderElement.on("BeforeVisible",t.proxy(this.initLayerAnimations,this));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))}},s.prototype.refreshBaseSize=function(t){},s.prototype.onResize=function(t,e){for(var i=0;i<this.children.length;i++)this.children[i].onResize(t,e,this.isStaticSlide)},s.prototype.hasLayers=function(){return this.children.length>0},s.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)},s.prototype.setStarterSlide=function(){this.setStarterSlideAnimation()},s.prototype.initLayerAnimations=function(){this.status=n.INITIALIZED,this.playOnce=!this.slider.isAdmin&&this.slider.parameters.layerMode.playOnce,
this.refreshTimelines(),this.slider.sliderElement.on("SliderResize",t.proxy(this.resize,this)),this.isStaticSlide?this.slider.visible(t.proxy(function(){this.setStart(),this.playIn()},this)):this.$element.on("mainAnimationStartIn",t.proxy(this.setStart,this)).on("mainAnimationStartInCancel",t.proxy(this.reset,this))},s.prototype.setStarterSlideAnimation=function(){this.slider.isAdmin||this.slider.visible(t.proxy(function(){this.slider.parameters.layerMode.playFirstLayer?(this.setStart(),this.playIn()):this.setZeroAll()},this))},s.prototype.resize=function(t,e,i,s){s===!1&&(this.animationsRefreshRatios(e),this.status=n.INITIALIZED,this.slider.parameters.layerMode.playFirstLayer&&this==this.slider.currentSlide?(this.setStart(),this.playIn()):this.setZeroAll())},s.prototype.animationsRefreshRatios=function(t){for(var e=0;e<this.layerAnimations.length;e++)this.layerAnimations[e].refresh(t.slideW,t.slideH)},s.prototype.refreshTimelines=function(){this.layerAnimations=this.createLayerAnimations(this.slider.responsive.lastRatios.slideW,this.slider.responsive.lastRatios.slideH)},s.prototype.setZero=function(){this.$element.trigger("layerSetZero",this)},s.prototype.setZeroAll=function(){this.status=n.INITIALIZED,this.$element.trigger("layerSetZeroAll",this)},s.prototype.setStart=function(){this.status==n.INITIALIZED&&(this.$element.trigger("layerAnimationSetStart"),this.status=n.READY_TO_START)},s.prototype.playIn=function(){this.status==n.READY_TO_START&&(this.status=n.PLAYING,this.$element.trigger("layerAnimationPlayIn"))},s.prototype.playOut=function(){if(this.status==n.PLAYING){var e=[];this.$element.triggerHandler("beforeMainSwitch",[e]),t.when.apply(t,e).done(t.proxy(function(){this.onOutAnimationsPlayed()},this))}else this.onOutAnimationsPlayed()},s.prototype.onOutAnimationsPlayed=function(){this.playOnce?this.status=n.ENDED:this.status=n.INITIALIZED,this.$element.trigger("layerAnimationCompleteOut")},s.prototype.pause=function(){this.$element.triggerHandler("layerPause")},s.prototype.reset=function(){this.$element.triggerHandler("layerReset"),this.status=n.INITIALIZED},s.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},s}),N2Require("FrontendSliderStaticSlide",["FrontendComponentSlideAbstract"],[],function(t,e,i){function s(t,i){this.isStaticSlide=!0,this.$element=i.data("slide",this),e.FrontendComponentSlideAbstract.prototype.constructor.call(this,t,i),this.init()}return s.prototype=Object.create(e.FrontendComponentSlideAbstract.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementAbsolute",["FrontendPlacement"],[],function(t,e,i){function s(t){return t.position()}function s(t){return{left:t.prop("offsetLeft"),top:t.prop("offsetTop")}}function n(t){this.linked=[],this.parentLayer=!1,this.$parent=!1,e.FrontendPlacement.prototype.constructor.apply(this,arguments)}return/(MSIE\ [0-7]\.\d+)/.test(navigator.userAgent),n.prototype=Object.create(e.FrontendPlacement.prototype),n.prototype.constructor=n,n.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(){}))},n.prototype.addLinked=function(t){this.linked.push(t),this.alwaysResize=!0},n.prototype.onResize=n.prototype.onResizeLinked=function(t,e,i){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"),u=this.layer.getDevice("valign"),c={left:"auto",top:"auto",right:"auto",bottom:"auto"};if(this.$parent&&this.$parent.data("layer").isVisible){var m=s(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":c.right=n.parent().width()-f.left-h+"px";break;case"center":c.left=f.left+h-n.width()/2+"px";break;default:c.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(u){case"bottom":c.bottom=n.parent().height()-f.top-d+"px";break;case"middle":c.top=f.top+d-n.height()/2+"px";break;default:c.top=f.top+d+"px"}}else{switch(p){case"right":c.right=-h+"px";break;case"center":c.left=(i?n.parent().width():e.slide.width)/2+h-n.width()/2+"px";break;default:c.left=h+"px"}switch(u){case"bottom":c.bottom=-d+"px";break;case"middle":c.top=(i?n.parent().height():e.slide.height)/2+d-n.height()/2+"px";break;default:c.top=d+"px"}}n.css(c);for(var y=0;y<this.linked.length;y++)this.linked[y].onResizeLinked(t,e,i)},n.prototype.getWidth=function(t){var e=this.layer.getDevice("width");return this.isDimensionPropertyAccepted(e)?e:e*t+"px"},n.prototype.getHeight=function(t){var e=this.layer.getDevice("height");return this.isDimensionPropertyAccepted(e)?e:e*t+"px"},n.prototype.isDimensionPropertyAccepted=function(t){return!(!(t+"").match(/[0-9]+%/)&&"auto"!=t)},n}),N2Require("FrontendPlacementContent",["FrontendPlacement"],[],function(t,e,i){function s(t){e.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(e.FrontendPlacement.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementDefault",["FrontendPlacement"],[],function(t,e,i){function s(t){e.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(e.FrontendPlacement.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementNormal",["FrontendPlacement"],[],function(t,e,i){function s(t){e.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(e.FrontendPlacement.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(){this.updateMargin(),this.updateHeight(),this.updateMaxWidth(),this.updateSelfAlign()},s.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)},s.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","")},s.prototype.updateMaxWidth=function(){var t=parseInt(this.layer.getDevice("maxwidth"));0>=t||isNaN(t)?this.layer.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.$layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth")},s.prototype.updateSelfAlign=function(){this.layer.$layer.attr("data-cssselfalign",this.layer.getDevice("selfalign"))},s}),N2Require("FrontendComponentCol",["FrontendComponent"],[],function(t,e,i){function s(t,i,s){this.$content=s.find(".n2-ss-layer-col:first"),e.FrontendComponent.prototype.constructor.call(this,t,i,s,this.$content.find("> .n2-ss-layer"))}return s.prototype=Object.create(e.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(t){e.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updateOrder(),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth()},s.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)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateMaxWidth=function(){var t=parseInt(this.getDevice("maxwidth"));0>=t||isNaN(t)?this.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.$layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth")},s.prototype.getRealOrder=function(){var t=this.getDevice("order");return 0==t?10:t},s.prototype.updateOrder=function(){var t=this.getDevice("order");0==t?this.$layer.css("order",""):this.$layer.css("order",t)},s.prototype.getContents=function(){return this.$content},s}),N2Require("FrontendComponentContent",["FrontendComponent"],[],function(t,e,i){function s(t,i,s){this.$content=s.find("> .n2-ss-section-main-content"),e.FrontendComponent.prototype.constructor.call(this,t,i,s,this.$content.find("> .n2-ss-layer"))}return s.prototype=Object.create(e.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(t){e.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth(),this.updateSelfAlign()},s.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)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateMaxWidth=function(){var t=parseInt(this.getDevice("maxwidth"));0>=t||isNaN(t)?this.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.$layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth")},s.prototype.updateSelfAlign=function(){this.$layer.attr("data-cssselfalign",this.getDevice("selfalign"))},s.prototype.getContents=function(){return this.$content},s}),N2Require("FrontendComponentGroup",["FrontendComponent"],[],function(t,e,i){function s(t,i,s){e.FrontendComponent.prototype.constructor.call(this,t,i,s,s.find("> .n2-ss-layer"))}return s.prototype=Object.create(e.FrontendComponent.prototype),s.prototype.constructor=s,s}),N2Require("FrontendComponentLayer",["FrontendComponent"],[],function(t,e,i){function s(t,s,n){e.FrontendComponent.prototype.constructor.call(this,t,s,n),this.wraps.mask!==i?this.$item=this.wraps.mask.children():this.wraps.parallax!==i?this.$item=this.wraps.parallax.children():this.$item=n.children()}return s.prototype=Object.create(e.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.getContents=function(){return this.$item},s}),N2Require("FrontendComponentRow",["FrontendComponent"],[],function(t,e,i){function s(t,i,s){this.$row=s.find(".n2-ss-layer-row:first"),e.FrontendComponent.prototype.constructor.call(this,t,i,s,this.$row.find("> .n2-ss-layer"))}return s.prototype=Object.create(e.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(t){e.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateGutter(),this.updateInnerAlign()},s.prototype.onAfterDeviceChange=function(t){this.updateWrapAfter()},s.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)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateGutter=function(){var t=this.getDevice("gutter")+"px";if(this.children.length>0)for(var e=this.children.length-1;e>=0;e--)this.children[e].$layer.css(nextend.rtl.marginRight,t).css("marginTop",t)},s.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},s.prototype.updateWrapAfter=function(){var e=parseInt(this.getDevice("wrapafter")),i=this.getSortedColumns(),s=i.length,n=!1;if(0==s)return!1;if(e>0&&s>e&&(n=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",n),n)for(var r=0;s>r;r++){var o=parseInt(r/e);if(i[r].$layer.attr("data-r",o),(r+1)%e==0||r==s-1){i[r].$layer.addClass("n2-ss-last-in-row");var a=i[r].getDevice("order");0==a&&(a=10),t('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[r].$layer),i[r].$layer}else i[r].$layer.removeClass("n2-ss-last-in-row")}else{for(var r=0;s>r;r++)i[r].$layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i[s-1].$layer.addClass("n2-ss-last-in-row")}},s.prototype.getContents=function(){return this.$row},s}),N2Require("SmartSliderResponsive",[],[],function(t,e,i){function s(e,i){this.disableTransitions=!1,this.disableTransitionsTimeout=null,this.lastClientHeight=0,this.lastOrientation=0,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:"",verticalOffsetSelectors:"",focusUser:0,focusAutoplay:0,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",scrollFix:0,overflowHiddenPage:0},i),e.isAdmin&&(this.doResize=NextendThrottle(this.doResize,50)),this.loadDeferred=t.Deferred(),this.slider=e,this.sliderElement=e.sliderElement}var n=null,r=null;return s.OrientationMode={SCREEN:0,ADMIN_LANDSCAPE:1,ADMIN_PORTRAIT:2,SCREEN_WIDTH_ONLY:3},s.DeviceOrientation={UNKNOWN:0,LANDSCAPE:1,PORTRAIT:2},s._DeviceOrientation={0:"Unknown",1:"Landscape",2:"Portrait"},s.DeviceMode={UNKNOWN:0,DESKTOP:1,TABLET:2,MOBILE:3},s._DeviceMode={0:"unknown",1:"desktop",2:"tablet",3:"mobile"},s.prototype.start=function(){nextend.fontsDeferred==i?nextend.loadDeferred.always(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=s.DeviceMode.UNKNOWN,this.orientationMode=s.OrientationMode.SCREEN,this.orientation=s.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");var e=this.ready=t.Deferred();switch(this.sliderElement.triggerHandler("SliderResponsiveStarted"),this.sliderElement.one("SliderResize",function(){e.resolve()}),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=s.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==n){var o=new MobileDetect(window.navigator.userAgent,801);n=!!o.tablet(),r=!!o.phone()}}if(this.verticalOffsetSelectors=t(this.parameters.verticalOffsetSelectors),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("undefined"!=typeof nextend&&"undefined"!=typeof nextend.ssBeforeResponsive&&nextend.ssBeforeResponsive.call(this),this.onResize(),(this.parameters.onResizeEnabled||"adaptive"==this.parameters.type)&&(t(window).on({resize:t.proxy(this.onResize,this),orientationchange:t.proxy(this.onResize,this)}),this.sliderElement.on("SliderInternalResize",t.proxy(this.onResize,this)),this.parameters.scrollFix))try{var l=this;t('<iframe sandbox="allow-same-origin allow-scripts" style="height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;"/>').on("load",function(e){t(e.target.contentWindow?e.target.contentWindow:e.target.contentDocument.defaultView).on("resize",function(){l.sliderElement.triggerHandler("SliderInternalResize")})}).insertBefore(this.containerElement)}catch(h){}},s.prototype.getOuterWidth=function(){return this.responsiveDimensions.startSliderWidth+this.responsiveDimensions.startSliderMarginLeft+this.responsiveDimensions.startSliderMarginRight},s.prototype.storeDefaults=function(){this.responsiveDimensions={startWidth:this.sliderElement.outerWidth(!0),startHeight:this.sliderElement.outerHeight(!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}},s.prototype.addHorizontalElement=function(t,i,s,n){s=s||"ratio";var r=new e.SmartSliderResponsiveElement(this,s,t,i,n);return this.horizontalElements.push(r),r},s.prototype.addVerticalElement=function(t,i,s,n){s=s||"ratio";var r=new e.SmartSliderResponsiveElement(this,s,t,i,n);return this.verticalElements.push(r),r},s.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)}},s.prototype.updateVerticalRatios=function(t){return t},s.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},s.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)}},s.prototype.getDeviceMode=function(){return s._DeviceMode[this.deviceMode]},s.prototype.getDeviceModeOrientation=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.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._doDelayedResize,this))):this.doResize(e)},s.prototype._doDelayedResize=function(){this.doResize(),this.delayedResizeAdded=!1},s.prototype.doNormalizedResize=function(){this.normalizeTimeout&&clearTimeout(this.normalizeTimeout),this.normalizeTimeout=setTimeout(t.proxy(this.doResize,this),10)},s.prototype._getOrientation=function(){return this.orientationMode==s.OrientationMode.SCREEN?window.innerHeight<=window.innerWidth?s.DeviceOrientation.LANDSCAPE:s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE?s.DeviceOrientation.LANDSCAPE:void 0},s.prototype._getDevice=function(){switch(this.parameters.basedOn){case"combined":return this._getDeviceDevice(this._getDeviceScreenWidth());case"device":return this._getDeviceDevice(s.DeviceMode.DESKTOP);case"screen":return this._getDeviceScreenWidth()}},s.prototype._getDeviceScreenWidth=function(){var t=window.innerWidth;if(this.orientation==s.DeviceOrientation.PORTRAIT){if(t<this.parameters.mobilePortraitScreenWidth)return s.DeviceMode.MOBILE;if(t<this.parameters.tabletPortraitScreenWidth)return s.DeviceMode.TABLET}else{if(t<this.parameters.mobileLandscapeScreenWidth)return s.DeviceMode.MOBILE;if(t<this.parameters.tabletLandscapeScreenWidth)return s.DeviceMode.TABLET}return s.DeviceMode.DESKTOP},s.prototype._getDeviceAndOrientationByScreenWidth=function(){var t=window.innerWidth;return t<this.parameters.mobilePortraitScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.PORTRAIT]:t<this.parameters.mobileLandscapeScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.LANDSCAPE]:t<this.parameters.tabletPortraitScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.PORTRAIT]:t<this.parameters.tabletLandscapeScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.LANDSCAPE]:t<this.parameters.desktopPortraitScreenWidth?[s.DeviceMode.DESKTOP,s.DeviceOrientation.PORTRAIT]:[s.DeviceMode.DESKTOP,s.DeviceOrientation.LANDSCAPE]},s.prototype._getDeviceDevice=function(t){return r===!0?s.DeviceMode.MOBILE:n&&t!=s.DeviceMode.MOBILE?s.DeviceMode.TABLET:t},s.prototype._getDeviceZoom=function(t){var e;this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?e=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(e=s.DeviceOrientation.LANDSCAPE);var i=s.DeviceMode.DESKTOP;return t-this.parameters.ratioToDevice[s._DeviceOrientation[e]].mobile<.001?i=s.DeviceMode.MOBILE:t-this.parameters.ratioToDevice[s._DeviceOrientation[e]].tablet<.001&&(i=s.DeviceMode.TABLET),i},s.prototype.reTriggerSliderDeviceOrientation=function(){var t=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:t[0],lastOrientation:t[1],device:t[0],orientation:t[1]})},s.prototype.doResize=function(e,i,n,r,o){if(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.refreshMargin(),"center"==this.slider.parameters.align&&("fullpage"==this.parameters.type?this.alignElement.css("maxWidth","none"):this.alignElement.css("maxWidth",this.responsiveDimensions.startWidth)),!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,u=this.containerElement.parent(),c=u.offset().left;d=nextend.rtl.isRtl?p-(c+u.outerWidth()):c,this.containerElement.css(nextend.rtl.marginLeft,-d-parseInt(u.css("paddingLeft"))-parseInt(u.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==s.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:s._DeviceOrientation[y],orientation:s._DeviceOrientation[v]})),i||(this.orientationMode!=s.OrientationMode.SCREEN_WIDTH_ONLY&&(S=this._getDevice(m)),this.deviceMode!=S&&(this.deviceMode=S,this.sliderElement.removeClass("n2-ss-"+s._DeviceMode[g]).addClass("n2-ss-"+s._DeviceMode[S]),this.sliderElement.trigger("SliderDevice",{lastDevice:s._DeviceMode[g],device:s._DeviceMode[S]}),f=!0)),!this.slider.isAdmin&&"fullpage"==this.parameters.type){var b=0;if(window.matchMedia&&/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||window.opera)){var w,E=!1;e&&"orientationchange"==e.type&&(E=!0),w=n2const.isIOS?document.documentElement.clientHeight:window.innerHeight,window.matchMedia("(orientation: landscape)").matches?(b=Math.min(screen.width,w),90!=this.lastOrientation&&(E=!0,this.lastOrientation=90)):(b=Math.min(screen.height,w),0!=this.lastOrientation&&(E=!0,this.lastOrientation=0)),!E&&Math.abs(b-this.lastClientHeight)<100?b=this.lastClientHeight:this.lastClientHeight=b}else b=window.n2ClientHeight||document.documentElement.clientHeight||document.body.clientHeight;this.parameters.maximumHeightRatio[this.getDeviceModeOrientation()]=this.parameters.minimumHeightRatio=(b-this.getVerticalOffsetHeight())/this.responsiveDimensions.startHeight}if(f){var A=this._normalizeMode(s._DeviceMode[g],s._DeviceOrientation[y]),T=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);A[0]==T[0]&&A[1]==T[1]||(this.normalizedMode=T[0]+T[1],this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:A[0],lastOrientation:A[1],device:T[0],orientation:T[1]}))}var I=this.parameters.sliderWidthToDevice[this.normalizedMode]/this.parameters.sliderWidthToDevice.desktopPortrait;!this.parameters.downscale&&I>m?m=I:!this.parameters.upscale&&m>I&&(m=I),this._doResize(m,n,r,o),"center"==this.slider.parameters.align&&this.alignElement.css("maxWidth",this.responsiveDimensions.slider.width+this.staticSizes.paddingLeft+this.staticSizes.paddingRight+this.responsiveDimensions.startSliderMarginhorizontal)},s.prototype._normalizeMode=function(t,e){return this.parameters.normalizedDeviceModes[t+e]},s.prototype.getNormalizedModeString=function(){var t=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);return t.join("")},s.prototype.getModeString=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.enabled=function(t,e){return this.parameters.deviceModes[t+e]},s.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))},s.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},s.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)},s.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)},s.prototype.finishVerticalResize=function(e){this.loadDeferred.done(t.proxy(function(){this.finishVerticalResize=this._finishVerticalResize,this.finishVerticalResize(e)},this))},s.prototype._finishVerticalResize=function(t){this.resizeVerticalElements(t,!1,0),this.lastRatios=t,this.triggerResize(t,!1)},s.prototype.triggerResize=function(t,e){this.sliderElement.trigger("SliderResize",[t,this,e])},s.prototype._buildRatios=function(t,e,i){var s=this.getDeviceModeOrientation();this.parameters.maximumSlideWidthRatio[s]>0&&t.slideW>this.parameters.maximumSlideWidthRatio[s]&&(t.slideW=this.parameters.maximumSlideWidthRatio[s]),t.slideW=t.slideH=Math.min(t.slideW,t.slideH);var n=this.parameters.verticalRatioModifiers[s];if(t.slideH*=n,"fullpage"==this.parameters.type)t.h*=n,this.parameters.minimumHeightRatio>0&&(t.h=Math.max(t.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(t.h=Math.min(t.h,this.parameters.maximumHeightRatio[s])),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[s]>0&&t.slideW>this.parameters.maximumSlideWidthRatio[s]&&(t.slideW=this.parameters.maximumSlideWidthRatio[s]),t.slideH=t.h);else if(t.h*=n,this.parameters.minimumHeightRatio>0&&(t.h=Math.max(t.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(t.h=Math.min(t.h,this.parameters.maximumHeightRatio[s])),t.slideH=Math.min(t.slideH,t.h),t.slideW=t.slideH/n,"showcase"==this.slider.type&&(t.slideW=Math.min(t.slideW,t.w),t.slideH=Math.min(t.slideW,t.slideH)),e){var r=this.slider.currentSlide.backgroundImage;if("undefined"!=typeof i&&(r=i.backgroundImage),r.width>0&&r.height>0){var o=this.responsiveDimensions.startSlideWidth/r.width*(r.height/this.responsiveDimensions.startSlideHeight);-1!=o&&(t.slideH*=o,t.h*=o)}}this.sliderElement.triggerHandler("responsiveBuildRatios",[t])},s.prototype.setOrientation=function(t){"portrait"==t?this.orientationMode=s.OrientationMode.ADMIN_PORTRAIT:"landscape"==t&&(this.orientationMode=s.OrientationMode.ADMIN_LANDSCAPE)},s.prototype.setMode=function(t,e){var i;if(this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?i=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(i=s.DeviceOrientation.LANDSCAPE),
this==e){var n=this.parameters.sliderWidthToDevice[t+s._DeviceOrientation[i]];if("mobile"==t)switch(s._DeviceOrientation[i]){case"Portrait":n=Math.max(nextend.smallestZoom,320)}this.setSize(n)}},s.prototype.setSize=function(t){this.containerElement.width(t),this.doResize()},s.prototype.getVerticalOffsetHeight=function(){for(var t=0,e=0;e<this.verticalOffsetSelectors.length;e++)t+=this.verticalOffsetSelectors.eq(e).outerHeight();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},s.prototype.addMargin=function(t,e){this.widgetMargins[t].push(e),e.isVisible()&&(this._addMarginSize(t,e.getSize()),this.enabledWidgetMargins.push(e)),this.doNormalizedResize()},s.prototype.addStaticMargin=function(t,e){"Bottom"!=t&&"Top"!=t&&(this.widgetStaticMargins||(this.widgetStaticMargins={Top:[],Right:[],Bottom:[],Left:[]}),this.widgetStaticMargins[t].push(e),this.doNormalizedResize())},s.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()},s.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}},s.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},s}),N2Require("SmartSliderResponsiveElement",[],[],function(t,e,i){function s(t){return t.charAt(0).toUpperCase()+t.slice(1)}function n(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 n.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()},n.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 n in this.data)i["start"+s(this.name)+s(n)]=this.data[n]}},n.prototype.ready=function(t){this._readyDeferred.done(t)},n.prototype.resize=function(e,i){this.ready(t.proxy(this.resize,this,e,i)),this._lastRatio=i},n.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},n.prototype.getHorizontalMargin=function(t){return t},n.prototype.getVerticalMargin=function(t){return t},n.prototype._refreshResize=function(){this.responsive.ready.done(t.proxy(function(){this._resize(this.responsive.responsiveDimensions,this.responsive.lastRatios[this.ratioName])},this))},n.prototype.widthPrepare=function(t){return Math.round(t)},n.prototype.heightPrepare=function(t){return Math.round(t)},n.prototype.marginLeftPrepare=function(t){return parseInt(t)},n.prototype.marginRightPrepare=function(t){return parseInt(t)},n.prototype.lineHeightPrepare=function(t){return t+"px"},n.prototype.borderLeftWidthPrepare=function(t){return parseInt(t)},n.prototype.borderRightWidthPrepare=function(t){return parseInt(t)},n.prototype.borderTopWidthPrepare=function(t){return parseInt(t)},n.prototype.borderBottomWidthPrepare=function(t){return parseInt(t)},n.prototype.fontSizePrepare=function(t){var e=this.responsive.getNormalizedModeString();return t<this.helper.fontSize[e]?this.helper.fontSize[e]:t},n.prototype.setCentered=function(){this.helper.parent=this.element.parent(),this.helper.centered=!0},n.prototype.unsetCentered=function(){this.helper.centered=!1},n.prototype.onModeChange=function(){this.setFontSizeByMode()},n.prototype.setFontSizeByMode=function(){this.element.css("fontSize",this.fontSizePrepare(this.data.fontSize*this._lastRatio))},n}),N2Require("FrontendItemAudio",[],[],function(t,e,i){function s(e,i,s){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},s),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()}return s.prototype.initAutoplay=function(){this.isStatic?this.audio.play():(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.audio.play()},this)),t.inArray(this.slide,this.slider.getVisibleSlides())>=0&&this.audio.play())},s.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.audio.play()},this)),this.$node.find(".n2-ss-item-audio-pause").on("click",t.proxy(function(){this.audio.pause()},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("mousedown",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.updateUITime(e),t("body").on({"mousemove.volume":t.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.updateUITime(t)},this),"mouseup.volume":t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.updateUITime(e),t("body").off(".volume")},this),"mouseleave.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("mousedown",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.updateUIVolume(e),t("body").on({"mousemove.volume":t.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.updateUIVolume(t)},this),"mouseup.volume":t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.updateUIVolume(e),t("body").off(".volume")},this),"mouseleave.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.audio.pause()},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()},s.prototype.updateTime=function(){this.$time.html(this.timeFormat(this.audio.currentTime)+" / "+this.timeFormat(this.audio.duration))},s.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")},s.prototype.onPause=function(){this.isPaused=!0,this.$node.attr("data-state","paused"),this.$layer.triggerHandler("n2pause")},s.prototype.onEnded=function(){1==this.parameters.loop?(this.audio.currentTime=0,this.audio.play()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.id),this.$layer.triggerHandler("n2stop"))},s.prototype.onTimeUpdate=function(){this.updateTime(),this.$playhead.css("width",this.audio.currentTime/this.audio.duration*100+"%")},s.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)},s.prototype.refreshCurrentTime=function(){this.$playhead.css("width",this.audio.currentTime/this.audio.duration*100+"%"),this.isPaused||requestAnimationFrame(t.proxy(this.refreshCurrentTime,this))},s.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()))},s.prototype.updateUIVolume=function(t){this.audio.volume=Math.max(0,Math.min(1,Math.round(t.pageX-this.$volume.offset().left)/this.$volume.width()))},s.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(":")},s.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}),N2Require("FrontendItemCaption",[],[],function(t,e,i){function s(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 s.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)},s.prototype.resizeSimple=function(){var t={};t[this.direction]=-this.content.height(),this.content.css(t)},s.prototype._outSimple=function(){var t={};t[this.direction]=-this.content.height(),this.tweenContent(t)},s.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)},s.prototype.initFade=function(){this.content.css({opacity:0,left:0,top:0}),this._in=this._inFade,this._out=this._outFade},s.prototype._inFade=function(){this.tweenContent({opacity:1})},s.prototype._outFade=function(){this.tweenContent({opacity:0})},s.prototype["in"]=function(){this._in(),this.scale&&this.tweenImage({scale:1.2})},s.prototype._in=function(){var t={};t[this.direction]=0,this.tweenContent(t)},s.prototype.out=function(){this._out(),this.scale&&this.tweenImage({scale:1})},s.prototype._out=function(){this.tweenContent(this.startCSS)},s.prototype.tweenContent=function(t){NextendTween.to(this.content,.5,t)},s.prototype.tweenImage=function(t){NextendTween.to(this.image,.5,t)},s}),N2Require("FrontendItemCounter",[],[],function(t,e,i){function s(e,i,s){this.slider=e,this.id=i,this.data=s,this.currentPercent=0,this.node=t("#"+i).data("counter",this),this.data.displayMode&&(this.$display=this.node.find(s.display)),this.$countingDiv=this.node.find(s.counting),this.layer=this.node.closest(".n2-ss-layer").on("needExtendTimelineIn."+i,t.proxy(this.needExtendTimelineIn,this)).on("layerExtendTimelineIn."+i,t.proxy(this.extendTimelineIn,this))}return s.prototype.needExtendTimelineIn=function(){return!0},s.prototype._animateData=function(e,i,s){return s=s||"easeOutExpo",{percent:i,ease:s,onUpdate:t.proxy(function(){switch(this.currentPercent=e.percent,this.data.displayMode){case"circle":this.$display.attr("stroke-dashoffset",(1-e.percent)*this.data.c);break;case"width":this.$display.css("width",100*e.percent+"%")}this.$countingDiv.html(this.data.pre+(this.data.min+e.percent*(this.data.total-this.data.min)).toFixed(0)+this.data.post)},this)}},s.prototype.extendTimelineIn=function(t,e,i){var s={percent:this.data.fromPercent};this.currentPercent=this.data.fromPercent,e.to(s,this.data.duration/1e3,this._animateData(s,this.data.toPercent),i+this.data.delay/1e3)},s.prototype.to=function(t,e){var i={percent:this.currentPercent};NextendTween.to(i,this.data.duration/1e3,this._animateData(i,t,e))},s.prototype.fromTo=function(t,e,i){var s={percent:t};NextendTween.to(s,this.data.duration/1e3,this._animateData(s,e,i))},s}),N2Require("FrontendItemHeadingSplitText",[],[],function(t,e,i){function s(e,i,s,n,r,o,a,l){if(r||a){this.id=i,this.node=t("#"+i),this.slider=e,this.splitText=!1;var h=this.node.find("a");h.length&&(this.node=h),this.slider.started(t.proxy(this.started,this,s,n,r,o,a,l))}}var n={opacity:1,x:0,y:0,rotationX:0,rotationY:0,rotationZ:0,scale:1};return s.prototype.started=function(e,i,s,n,r,o){this.transformOrigin=e,this.backfaceVisibility=i;var a={chars:0,words:0,lines:0};s?(this.splitTextIn=this.optimize(s.data,n),a[this.splitTextIn.mode]=1):this.splitTextIn=!1,r?(this.splitTextOut=this.optimize(r.data,o),a[this.splitTextOut.mode]=1):this.splitTextOut=!1;var l=[];for(var h in a)a[h]&&l.push(h);a.chars&&!a.words&&l.push("words"),"words,chars"==a&&(a="chars"),this.mode=a,this.modes=l,this.layer=this.node.closest(".n2-ss-layer").on("refreshTimeline."+this.id,t.proxy(this.refreshTimeline,this)).on("needExtendTimelineIn."+this.id,t.proxy(this.needExtendTimelineIn,this)).on("layerExtendTimelineIn."+this.id,t.proxy(this.extendTimelineIn,this)).on("needExtendTimelineOut."+this.id,t.proxy(this.needExtendTimelineOut,this)).on("layerExtendTimelineOut."+this.id,t.proxy(this.extendTimelineOut,this)),NextendTween.set(this.layer,{perspective:1e3}),this.node.css("text-rendering","auto")},s.prototype.refreshTimeline=function(){if(this.needExtendTimelineIn()||this.needExtendTimelineOut()){this.splitText&&(this.splitText.revert(),this.splitText=!1),this.splitText=new NextendSplitText(this.node,{type:this.modes.join(",")});for(var t in this.mode)this.mode[t]&&NextendTween.set(this.splitText[t],{transformOrigin:this.transformOrigin,backfaceVisibility:this.backfaceVisibility})}},s.prototype.needExtendTimelineIn=function(){return!!this.splitTextIn},s.prototype.extendTimelineIn=function(e,i,s){if(this.splitTextIn){var r=this.splitTextIn;this._animate(i,"staggerFromTo",r.mode,r.sort,r.duration,t.extend(!0,{},r.from),t.extend(!0,{ease:r.ease},n),r.stagger,s+r.delay)}},s.prototype.needExtendTimelineOut=function(){return!!this.splitTextOut},s.prototype.extendTimelineOut=function(e,i,s){if(this.splitTextOut){var r=this.splitTextOut;this._animate(i,"staggerFromTo",r.mode,r.sort,r.duration,t.extend(!0,{},n),t.extend(!0,{ease:r.ease},r.from),-r.stagger,s+r.delay)}},s.prototype._animate=function(e,i,s,n,r,o,a,l,h){var d=t.extend([],this.splitText[s]),p=null;switch(n){case"reversed":d.reverse();break;case"random":var u=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};u(d);break;case"side":case"center":var c=[];for(p=[];d.length>1;)c.push(d.shift()),p.push(d.pop());1==d.length&&c.push(d.shift()),d=c,"center"==n&&(d.reverse(),p.reverse());break;case"sideShifted":case"centerShifted":for(var c=[];d.length>1;)c.push(d.shift()),c.push(d.pop());1==d.length&&c.push(d.shift()),d=c,"centerShifted"==n&&d.reverse()}e[i](d,r,o,a,l,h),p&&p.length&&e[i](p,r,o,a,l,h)},s.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},s}),N2Require("FrontendItemTransition",[],[],function(t,e,i){function s(e,i,s){this.slider=e,n2const.isIE&&(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 s.prototype.initFade=function(){this.images.eq(1).css("opacity",0)},s.prototype.inFade=function(){NextendTween.to(this.images.eq(1),.5,{opacity:1}),NextendTween.to(this.images.eq(0),.5,{opacity:0})},s.prototype.outFade=function(){NextendTween.to(this.images.eq(1),.5,{opacity:0}),NextendTween.to(this.images.eq(0),.5,{opacity:1})},s.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"})},s.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"})},s.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"})},s.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"})},s.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"})},s.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"})},s}),N2Require("FrontendItemVideo",[],[],function(t,e,i){function s(e,i,s){this.state={scroll:!1,slide:!0,play:!1,continuePlay:!1},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},s),this.slide=e.findSlideByElement(this.videoPlayer),this.videoPlayer.videoWidth>0?this.initVideoPlayer():this.videoPlayer.addEventListener("loadedmetadata",t.proxy(this.initVideoPlayer,this)),this.playerElement.prop("volume",this.playerElement.data("volume"))}return s.prototype.initVideoPlayer=function(){1==this.parameters.center&&(this.onResize(),this.slider.sliderElement.on("SliderResize",t.proxy(this.onResize,this)));var e=this.playerElement.parent();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==this.parameters.loop?(this.videoPlayer.currentTime=0,this.videoPlayer.play()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),e.triggerHandler("n2stop"),this.state.play=!1)},this)),this.playerElement.on("pause",t.proxy(function(){e.triggerHandler("n2pause"),this.state.continuePlay?(this.state.continuePlay=!1,this.state.play=!0):this.state.play=!1},this)),1==this.parameters.autoplay&&this.initAutoplay(),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",t.proxy(function(e,i,s,n,r){-1==t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[n]))?this.setState("slide",!1):this.setState("slide",!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))),nextend.scrollTracker.add(this.playerElement,t.proxy(function(){this.setState("scroll",!0)},this),t.proxy(function(){this.state.continuePlay=!0,this.setState("scroll",!1)},this))},s.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[nextend.rtl.marginLeft]=0,e/i>s?(n.height=e*s,n.marginTop=(i-n.height)/2):(n.width=i*s,n[nextend.rtl.marginLeft]=(e-n.width)/2),this.playerElement.css(n)},s.prototype.initAutoplay=function(){this.isStatic?(this.state.play=!0,this.setState("slide",!0)):(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.playerElement.is(":visible")?(this.state.play=!0,this.setState("slide",!0)):this.setState("slide",!1)},this)),t.inArray(this.slide,this.slider.getVisibleSlides())>=0&&(this.state.play=!0,this.setState("slide",!0)))},s.prototype.setState=function(t,e){this.state[t]=e,this.state.play&&this.state.slide&&this.state.scroll?this.play():this.pause()},s.prototype.play=function(){this.isStopped()&&(this.slider.sliderElement.trigger("mediaStarted",this.playerId),this.videoPlayer.play())},s.prototype.pause=function(){this.isStopped()||this.videoPlayer.pause()},s.prototype.isStopped=function(){return this.videoPlayer.paused},s}),N2Require("FrontendItemVimeo",[],[],function(t,e,i){function s(e,i,s,n,r,o){this.state={scroll:!1,slide:!0,play:!1,continuePlay:!1},this.readyDeferred=t.Deferred(),this.slider=e,this.playerId=i,this.start=o,this.parameters=t.extend({vimeourl:"//vimeo.com/144598279",center:0,autoplay:"0",reset:"0",title:"1",byline:"1",portrait:"0",loop:"0",color:"00adef",volume:"-1"},n),navigator.userAgent.toLowerCase().indexOf("android")>-1&&(this.parameters.autoplay=0),1==this.parameters.autoplay||!r||n2const.isMobile?this.ready(t.proxy(this.initVimeoPlayer,this)):t("#"+this.playerId).on("click.vimeo n2click.vimeo",t.proxy(function(e){t(e.currentTarget).off(".vimeo"),e.preventDefault(),e.stopPropagation(),this.ready(t.proxy(function(){this.readyDeferred.done(t.proxy(function(){this.play()},this)),this.initVimeoPlayer()},this))},this))}return s.vimeoDeferred=null,s.prototype.ready=function(e){null===s.vimeoDeferred&&(s.vimeoDeferred=t.getScript("https://player.vimeo.com/api/player.js")),s.vimeoDeferred.done(e)},s.prototype.initVimeoPlayer=function(){var e=n2('<iframe id="'+this.playerId+'_video" 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>');t("#"+this.playerId).append(e),this.isStatic=e.closest(".n2-ss-static-slide").length,this.playerElement=e,this.player=new Vimeo.Player(e[0]),this.player.ready().then(t.proxy(this.onReady,this))},s.prototype.onReady=function(){var e=parseFloat(this.parameters.volume);e>=0&&this.setVolume(e),this.slide=this.slider.findSlideByElement(this.playerElement),1==this.parameters.center&&(this.onResize(),this.slider.sliderElement.on("SliderResize",t.proxy(this.onResize,this)));var i=this.playerElement.parent().parent();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.state.continuePlay=!1,this.state.play=!0):this.state.play=!1},this)),this.player.on("ended",t.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"),this.state.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.getVisibleSlides(this.slider.slides[n]))?(parseInt(this.parameters.reset)&&this.reset(),this.setState("slide",!1)):this.setState("slide",!0)},this)),nextend.scrollTracker.add(this.playerElement,t.proxy(function(){this.setState("scroll",!0)},this),t.proxy(function(){this.state.continuePlay=!0,this.setState("scroll",!1)},this))),1==this.parameters.autoplay&&this.slider.visible(t.proxy(this.initAutoplay,this)),this.playerElement.parent().css("background",""),this.readyDeferred.resolve()},s.prototype.onResize=function(){var t=52,e=this.playerElement.parent(),i=e.width()+t,s=e.height()+t,n=16/9,r={width:i,height:s,marginTop:0};r[nextend.rtl.marginLeft]=0,i/s>n?(r.height=i*n,r.marginTop=(s-r.height)/2):(r.width=s*n,r[nextend.rtl.marginLeft]=(i-r.width)/2),this.playerElement.css(r)},s.prototype.initAutoplay=function(){this.isStatic?(this.state.play=!0,this.setState("slide",!0)):(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.state.play=!0,this.setState("slide",!0)):this.setState("slide",!1)},this)),t.inArray(this.slide,this.slider.getVisibleSlides())>=0&&(this.state.play=!0,this.setState("slide",!0)))},s.prototype.setState=function(t,e){this.state[t]=e,this.state.play&&this.state.slide&&this.state.scroll?this.play():this.pause()},s.prototype.play=function(){this.slider.sliderElement.trigger("mediaStarted",this.playerId),0!=this.start&&this.player.setCurrentTime(this.start),this.player.play(),this.player.getCurrentTime().then(t.proxy(function(t){t<this.start&&0!=this.start&&this.player.setCurrentTime(this.start),this.player.play()},this))["catch"](t.proxy(function(t){this.player.play()},this))},s.prototype.pause=function(){this.player.pause()},s.prototype.reset=function(){this.player.setCurrentTime(this.start)},s.prototype.setVolume=function(t){this.player.setVolume(t)},s}),N2Require("FrontendItemYouTube",[],[],function(t,e,i){function s(e,i,s,n){if(this.state={scroll:!1,slide:!0,play:!1,continuePlay:!1},this.readyDeferred=t.Deferred(),this.slider=e,this.playerId=i,this.parameters=t.extend({youtubeurl:"//www.youtube.com/watch?v=MKmIwHAFjSU",youtubecode:"MKmIwHAFjSU",center:0,autoplay:"1",theme:"dark",related:"1",vq:"default",volume:"-1",loop:0,showinfo:1,modestbranding:1,reset:0,query:[],playsinline:0},s),1==this.parameters.autoplay&&(navigator.userAgent.toLowerCase().indexOf("android")>-1||n2const.isIOS)){this.parameters.autoplay=0;try{"playsInline"in document.createElement("video")&&(this.parameters.autoplay=1,this.parameters.playsinline=1,this.parameters.volume=0)}catch(r){}}1==this.parameters.autoplay||!n||n2const.isMobile?this.ready(t.proxy(this.initYoutubePlayer,this)):t("#"+this.playerId).on("click.youtube n2click.youtube",t.proxy(function(e){t(e.currentTarget).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 s.YTDeferred=null,s.prototype.ready=function(e){if(null===s.YTDeferred)if(s.YTDeferred=t.Deferred(),"undefined"==typeof YT){var i=function(){};"function"==typeof window.onYouTubeIframeAPIReady&&(i=window.onYouTubeIframeAPIReady),window.onYouTubeIframeAPIReady=function(){s.YTDeferred.resolve(),i()},t.getScript("https://www.youtube.com/iframe_api")}else if(YT.loaded)s.YTDeferred.resolve();else var n=setInterval(function(){YT.loaded&&(s.YTDeferred.resolve(),clearInterval(n))},200);s.YTDeferred.done(e)},s.prototype.initYoutubePlayer=function(){var e=t("#"+this.playerId),i=e.closest(".n2-ss-layer");this.isStatic=e.closest(".n2-ss-static-slide").length;var s={enablejsapi:1,origin:window.location.protocol+"//"+window.location.host,theme:this.parameters.theme,wmode:"opaque",rel:this.parameters.related,vq:this.parameters.vq,start:this.parameters.start,showinfo:this.parameters.showinfo,modestbranding:this.parameters.modestbranding,playsinline:this.parameters.playsinline};1==this.parameters.center&&(s.controls=0,s.showinfo=0),1!=this.parameters.controls&&(s.autohide=1,s.controls=0),+(navigator.platform.toUpperCase().indexOf("MAC")>=0&&navigator.userAgent.search("Firefox")>-1)&&(s.html5=1);for(var n in this.parameters.query)this.parameters.query.hasOwnProperty(n)&&(s[n]=this.parameters.query[n]);this.player=new YT.Player(this.playerId,{videoId:this.parameters.youtubecode,wmode:"opaque",playerVars:s,events:{onReady:t.proxy(this.onReady,this),onStateChange:t.proxy(function(t){switch(t.data){case YT.PlayerState.PLAYING:this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play");break;case YT.PlayerState.PAUSED:i.triggerHandler("n2pause"),this.state.continuePlay?(this.state.continuePlay=!1,this.state.play=!0):this.state.play=!1;break;case YT.PlayerState.ENDED:1==this.parameters.loop?(this.player.seekTo(0),this.player.playVideo()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"),this.state.play=!1)}},this)}}),this.playerElement=t("#"+this.playerId),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)))},s.prototype.onReady=function(){var e=parseFloat(this.parameters.volume);e>0?this.setVolume(e):this.player.mute(),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.getVisibleSlides(this.slider.slides[n]))?this.setState("slide",!1):this.setState("slide",!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]))&&this.player.seekTo(0)},this))),this.readyDeferred.resolve(),nextend.scrollTracker.add(this.playerElement,t.proxy(function(){this.setState("scroll",!0)},this),t.proxy(function(){this.state.continuePlay=!0,this.setState("scroll",!1)},this))},s.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[nextend.rtl.marginLeft]=0,
i/s>n?(r.height=i*n,r.marginTop=(s-r.height)/2):(r.width=s*n,r[nextend.rtl.marginLeft]=(i-r.width)/2),this.playerElement.css(r)},s.prototype.initAutoplay=function(){this.isStatic?(this.state.play=!0,this.setState("slide",!0)):(this.state.slide=!1,this.slider.sliderElement.on("mainAnimationComplete",t.proxy(function(e,i,s,n){t.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[n]))>=0?(this.state.play=!0,this.setState("slide",!0)):this.setState("slide",!1)},this)),t.inArray(this.slide,this.slider.getVisibleSlides())>=0&&(this.state.play=!0,this.setState("slide",!0)))},s.prototype.setState=function(t,e){this.state[t]=e,this.state.play&&this.state.slide&&this.state.scroll?this.play():this.pause()},s.prototype.play=function(){this.isStopped()&&(this.slider.sliderElement.trigger("mediaStarted",this.playerId),this.player.playVideo())},s.prototype.pause=function(){this.isStopped()||this.player.pauseVideo()},s.prototype.stop=function(){this.player.stopVideo()},s.prototype.isStopped=function(){var t=this.player.getPlayerState();switch(t){case-1:case 0:case 2:case 5:return!0;default:return!1}},s.prototype.setVolume=function(t){this.player.setVolume(100*t)},s});