!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&"object"==typeof module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function b(b){var i=".smartmenus_mouse";if(h||b)h&&b&&(a(document).off(i),h=!1);else{var j=!0,k=null,l={mousemove:function(b){var c={x:b.pageX,y:b.pageY,timeStamp:(new Date).getTime()};if(k){var d=Math.abs(k.x-c.x),g=Math.abs(k.y-c.y);if((d>0||g>0)&&d<=4&&g<=4&&c.timeStamp-k.timeStamp<=300&&(f=!0,j)){var h=a(b.target).closest("a");h.is("a")&&a.each(e,function(){if(a.contains(this.$root[0],h[0]))return this.itemEnter({currentTarget:h[0]}),!1}),j=!1}}k=c}};l[g?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(a){c(a.originalEvent)&&(f=!1)},a(document).on(d(l,i)),h=!0}}function c(a){return!/^(4|mouse)$/.test(a.pointerType)}function d(a,b){b||(b="");var c={};for(var d in a)c[d.split(" ").join(b+" ")+b]=a[d];return c}var e=[],f=!1,g="ontouchstart"in window,h=!1,i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||function(a){clearTimeout(a)},k=!!a.fn.animate;return a.SmartMenus=function(b,c){this.$root=a(b),this.opts=c,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in b.style||"webkitPerspective"in b.style,this.wasCollapsible=!1,this.init()},a.extend(a.SmartMenus,{hideAll:function(){a.each(e,function(){this.menuHideAll()})},destroy:function(){for(;e.length;)e[0].destroy();b(!0)},prototype:{init:function(c){var f=this;if(!c){e.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var g=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(d({"mouseover focusin":a.proxy(this.rootOver,this),"mouseout focusout":a.proxy(this.rootOut,this),keydown:a.proxy(this.rootKeyDown,this)},g)).on(d({mouseenter:a.proxy(this.itemEnter,this),mouseleave:a.proxy(this.itemLeave,this),mousedown:a.proxy(this.itemDown,this),focus:a.proxy(this.itemFocus,this),blur:a.proxy(this.itemBlur,this),click:a.proxy(this.itemClick,this)},g),"a"),g+=this.rootId,this.opts.hideOnClick&&a(document).on(d({touchstart:a.proxy(this.docTouchStart,this),touchmove:a.proxy(this.docTouchMove,this),touchend:a.proxy(this.docTouchEnd,this),click:a.proxy(this.docClick,this)},g)),a(window).on(d({"resize orientationchange":a.proxy(this.winResize,this)},g)),this.opts.subIndicators&&(this.$subArrow=a("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),b()}if(this.$firstSub=this.$root.find("ul").each(function(){f.menuInit(a(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var h=/(index|default)\.[^#\?\/]*/i,i=/#.*/,j=window.location.href.replace(h,""),k=j.replace(i,"");this.$root.find("a:not(.mega-menu a)").each(function(){var b=this.href.replace(h,""),c=a(this);b!=j&&b!=k||(c.addClass("current"),f.opts.markCurrentTree&&c.parentsUntil("[data-smartmenus-id]","ul").each(function(){a(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(b){if(!b){var c=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(c),c+=this.rootId,a(document).off(c),a(window).off(c),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var d=this;this.$root.find("ul").each(function(){var b=a(this);b.dataSM("scroll-arrows")&&b.dataSM("scroll-arrows").remove(),b.dataSM("shown-before")&&((d.opts.subMenusMinWidth||d.opts.subMenusMaxWidth)&&b.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),b.dataSM("scroll-arrows")&&b.dataSM("scroll-arrows").remove(),b.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(b.attr("id")||"").indexOf(d.accessIdPrefix)&&b.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var b=a(this);0==b.attr("id").indexOf(d.accessIdPrefix)&&b.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),b||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),e.splice(a.inArray(this,e),1))},disable:function(b){if(!this.disabled){if(this.menuHideAll(),!b&&!this.opts.isPopup&&this.$root.is(":visible")){var c=this.$root.offset();this.$disableOverlay=a('<div class="sm-jquery-disable-overlay"/>').css({position:"absolute",top:c.top,left:c.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(b){return this.$touchScrollingSub?void(this.$touchScrollingSub=null):void((this.visibleSubMenus.length&&!a.contains(this.$root[0],b.target)||a(b.target).closest("a").length)&&this.menuHideAll())},docTouchEnd:function(b){if(this.lastTouch){if(this.visibleSubMenus.length&&(void 0===this.lastTouch.x2||this.lastTouch.x1==this.lastTouch.x2)&&(void 0===this.lastTouch.y2||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!a.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var c=this;this.hideTimeout=setTimeout(function(){c.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(a){if(this.lastTouch){var b=a.originalEvent.touches[0];this.lastTouch.x2=b.pageX,this.lastTouch.y2=b.pageY}},docTouchStart:function(a){var b=a.originalEvent.touches[0];this.lastTouch={x1:b.pageX,y1:b.pageY,target:b.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(b){for(var c=a(b).closest("ul");c.dataSM("in-mega");)c=c.parent().closest("ul");return c[0]||null},getHeight:function(a){return this.getOffset(a,!0)},getOffset:function(a,b){var c;"none"==a.css("display")&&(c={position:a[0].style.position,visibility:a[0].style.visibility},a.css({position:"absolute",visibility:"hidden"}).show());var d=a[0].getBoundingClientRect&&a[0].getBoundingClientRect(),e=d&&(b?d.height||d.bottom-d.top:d.width||d.right-d.left);return e||0===e||(e=b?a[0].offsetHeight:a[0].offsetWidth),c&&a.hide().css(c),e},getStartZIndex:function(a){var b=parseInt(this[a?"$root":"$firstSub"].css("z-index"));return!a&&isNaN(b)&&(b=parseInt(this.$root.css("z-index"))),isNaN(b)?1:b},getTouchPoint:function(a){return a.touches&&a.touches[0]||a.changedTouches&&a.changedTouches[0]||a},getViewport:function(a){var b=a?"Height":"Width",c=document.documentElement["client"+b],d=window["inner"+b];return d&&(c=Math.min(c,d)),c},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(a){return this.getOffset(a)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(a){return this.handleEvents()&&!this.isLinkInMegaMenu(a)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var b="fixed"==this.$root.css("position");return b||this.$root.parentsUntil("body").each(function(){if("fixed"==a(this).css("position"))return b=!0,!1}),b},isLinkInMegaMenu:function(b){return a(this.getClosestMenu(b[0])).hasClass("mega-menu")},isTouchMode:function(){return!f||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(b,c){var d=b.closest("ul"),e=d.dataSM("level");if(e>1&&(!this.activatedItems[e-2]||this.activatedItems[e-2][0]!=d.dataSM("parent-a")[0])){var f=this;a(d.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(d).each(function(){f.itemActivate(a(this).dataSM("parent-a"))})}if(this.isCollapsible()&&!c||this.menuHideSubMenus(this.activatedItems[e-1]&&this.activatedItems[e-1][0]==b[0]?e:e-1),this.activatedItems[e-1]=b,this.$root.triggerHandler("activate.smapi",b[0])!==!1){var g=b.dataSM("sub");g&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(g)}},itemBlur:function(b){var c=a(b.currentTarget);this.handleItemEvents(c)&&this.$root.triggerHandler("blur.smapi",c[0])},itemClick:function(b){var c=a(b.currentTarget);if(this.handleItemEvents(c)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==c.closest("ul")[0])return this.$touchScrollingSub=null,b.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",c[0])===!1)return!1;var d=c.dataSM("sub"),e=!!d&&2==d.dataSM("level");if(d){var f=a(b.target).is(".sub-arrow"),g=this.isCollapsible(),h=/toggle$/.test(this.opts.collapsibleBehavior),i=/link$/.test(this.opts.collapsibleBehavior),j=/^accordion/.test(this.opts.collapsibleBehavior);if(d.is(":visible")){if(!g&&this.opts.showOnClick&&e)return this.menuHide(d),this.clickActivated=!1,this.focusActivated=!1,!1;if(g&&(h||f))return this.itemActivate(c,j),this.menuHide(d),!1}else if((!i||!g||f)&&(!g&&this.opts.showOnClick&&e&&(this.clickActivated=!0),this.itemActivate(c,j),d.is(":visible")))return this.focusActivated=!0,!1}return!(!g&&this.opts.showOnClick&&e||c.hasClass("disabled")||this.$root.triggerHandler("select.smapi",c[0])===!1)&&void 0}},itemDown:function(b){var c=a(b.currentTarget);this.handleItemEvents(c)&&c.dataSM("mousedown",!0)},itemEnter:function(b){var c=a(b.currentTarget);if(this.handleItemEvents(c)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var d=this;this.showTimeout=setTimeout(function(){d.itemActivate(c)},this.opts.showOnClick&&1==c.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",c[0])}},itemFocus:function(b){var c=a(b.currentTarget);this.handleItemEvents(c)&&(!this.focusActivated||this.isTouchMode()&&c.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==c[0]||this.itemActivate(c,!0),this.$root.triggerHandler("focus.smapi",c[0]))},itemLeave:function(b){var c=a(b.currentTarget);this.handleItemEvents(c)&&(this.isTouchMode()||(c[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),c.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",c[0]))},menuHide:function(b){if(this.$root.triggerHandler("beforehide.smapi",b[0])!==!1&&(k&&b.stop(!0,!0),"none"!=b.css("display"))){var c=function(){b.css("z-index","")};this.isCollapsible()?k&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,b,c):b.hide(this.opts.collapsibleHideDuration,c):k&&this.opts.hideFunction?this.opts.hideFunction.call(this,b,c):b.hide(this.opts.hideDuration,c),b.dataSM("scroll")&&(this.menuScrollStop(b),b.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),b.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),b.attr({"aria-expanded":"false","aria-hidden":"true"});var d=b.dataSM("level");this.activatedItems.splice(d-1,1),this.visibleSubMenus.splice(a.inArray(b,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",b[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var a=this.opts.isPopup?1:0,b=this.visibleSubMenus.length-1;b>=a;b--)this.menuHide(this.visibleSubMenus[b]);this.opts.isPopup&&(k&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(k&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(a){for(var b=this.activatedItems.length-1;b>=a;b--){var c=this.activatedItems[b].dataSM("sub");c&&this.menuHide(c)}},menuInit:function(a){if(!a.dataSM("in-mega")){a.hasClass("mega-menu")&&a.find("ul").dataSM("in-mega",!0);for(var b=2,c=a[0];(c=c.parentNode.parentNode)!=this.$root[0];)b++;var d=a.prevAll("a").eq(-1);d.length||(d=a.prevAll().find("a").eq(-1)),d.addClass("has-submenu").dataSM("sub",a),a.dataSM("parent-a",d).dataSM("level",b).parent().dataSM("sub",a);var e=d.attr("id")||this.accessIdPrefix+ ++this.idInc,f=a.attr("id")||this.accessIdPrefix+ ++this.idInc;d.attr({id:e,"aria-haspopup":"true","aria-controls":f,"aria-expanded":"false"}),a.attr({id:f,role:"group","aria-hidden":"true","aria-labelledby":e,"aria-expanded":"false"}),this.opts.subIndicators&&d[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(b){var c,e,f=b.dataSM("parent-a"),h=f.closest("li"),i=h.parent(),j=b.dataSM("level"),k=this.getWidth(b),l=this.getHeight(b),m=f.offset(),n=m.left,o=m.top,p=this.getWidth(f),q=this.getHeight(f),r=a(window),s=r.scrollLeft(),t=r.scrollTop(),u=this.getViewportWidth(),v=this.getViewportHeight(),w=i.parent().is("[data-sm-horizontal-sub]")||2==j&&!i.hasClass("sm-vertical"),x=this.opts.rightToLeftSubMenus&&!h.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&h.is("[data-sm-reverse]"),y=2==j?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,z=2==j?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(w?(c=x?p-k-y:y,e=this.opts.bottomToTopSubMenus?-l-z:q+z):(c=x?y-k:p-y,e=this.opts.bottomToTopSubMenus?q-z-l:z),this.opts.keepInViewport){var A=n+c,B=o+e;if(x&&A<s?c=w?s-A+c:p-y:!x&&A+k>s+u&&(c=w?s+u-k-A+c:y-k),w||(l<v&&B+l>t+v?e+=t+v-l-B:(l>=v||B<t)&&(e+=t-B)),w&&(B+l>t+v+.49||B<t)||!w&&l>v+.49){var C=this;b.dataSM("scroll-arrows")||b.dataSM("scroll-arrows",a([a('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],a('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).on({mouseenter:function(){b.dataSM("scroll").up=a(this).hasClass("scroll-up"),C.menuScroll(b)},mouseleave:function(a){C.menuScrollStop(b),C.menuScrollOut(b,a)},"mousewheel DOMMouseScroll":function(a){a.preventDefault()}}).insertAfter(b));var D=".smartmenus_scroll";if(b.dataSM("scroll",{y:this.cssTransforms3d?0:e-q,step:1,itemH:q,subH:l,arrowDownH:this.getHeight(b.dataSM("scroll-arrows").eq(1))}).on(d({mouseover:function(a){C.menuScrollOver(b,a)},mouseout:function(a){C.menuScrollOut(b,a)},"mousewheel DOMMouseScroll":function(a){C.menuScrollMousewheel(b,a)}},D)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:c+(parseInt(b.css("border-left-width"))||0),width:k-(parseInt(b.css("border-left-width"))||0)-(parseInt(b.css("border-right-width"))||0),zIndex:b.css("z-index")}).eq(w&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var E={};E[g?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(a){C.menuScrollTouch(b,a)},b.css({"touch-action":"none","-ms-touch-action":"none"}).on(d(E,D))}}}b.css({top:"auto",left:"0",marginLeft:c,marginTop:e-q})},menuScroll:function(a,b,c){var d,e=a.dataSM("scroll"),g=a.dataSM("scroll-arrows"),h=e.up?e.upEnd:e.downEnd;if(!b&&e.momentum){if(e.momentum*=.92,d=e.momentum,d<.5)return void this.menuScrollStop(a)}else d=c||(b||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(e.step));var j=a.dataSM("level");if(this.activatedItems[j-1]&&this.activatedItems[j-1].dataSM("sub")&&this.activatedItems[j-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(j-1),e.y=e.up&&h<=e.y||!e.up&&h>=e.y?e.y:Math.abs(h-e.y)>d?e.y+(e.up?d:-d):h,a.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+e.y+"px, 0)",transform:"translate3d(0, "+e.y+"px, 0)"}:{marginTop:e.y}),f&&(e.up&&e.y>e.downEnd||!e.up&&e.y<e.upEnd)&&g.eq(e.up?1:0).show(),e.y==h)f&&g.eq(e.up?0:1).hide(),this.menuScrollStop(a);else if(!b){this.opts.scrollAccelerate&&e.step<this.opts.scrollStep&&(e.step+=.2);var k=this;this.scrollTimeout=i(function(){k.menuScroll(a)})}},menuScrollMousewheel:function(a,b){if(this.getClosestMenu(b.target)==a[0]){b=b.originalEvent;var c=(b.wheelDelta||-b.detail)>0;a.dataSM("scroll-arrows").eq(c?0:1).is(":visible")&&(a.dataSM("scroll").up=c,this.menuScroll(a,!0))}b.preventDefault()},menuScrollOut:function(b,c){f&&(/^scroll-(up|down)/.test((c.relatedTarget||"").className)||(b[0]==c.relatedTarget||a.contains(b[0],c.relatedTarget))&&this.getClosestMenu(c.relatedTarget)==b[0]||b.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(b,c){if(f&&!/^scroll-(up|down)/.test(c.target.className)&&this.getClosestMenu(c.target)==b[0]){this.menuScrollRefreshData(b);var d=b.dataSM("scroll"),e=a(window).scrollTop()-b.dataSM("parent-a").offset().top-d.itemH;b.dataSM("scroll-arrows").eq(0).css("margin-top",e).end().eq(1).css("margin-top",e+this.getViewportHeight()-d.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(b){var c=b.dataSM("scroll"),d=a(window).scrollTop()-b.dataSM("parent-a").offset().top-c.itemH;this.cssTransforms3d&&(d=-(parseFloat(b.css("margin-top"))-d)),a.extend(c,{upEnd:d,downEnd:d+this.getViewportHeight()-c.subH})},menuScrollStop:function(a){if(this.scrollTimeout)return j(this.scrollTimeout),this.scrollTimeout=0,a.dataSM("scroll").step=1,!0},menuScrollTouch:function(b,d){if(d=d.originalEvent,c(d)){var e=this.getTouchPoint(d);if(this.getClosestMenu(e.target)==b[0]){var f=b.dataSM("scroll");if(/(start|down)$/i.test(d.type))this.menuScrollStop(b)?(d.preventDefault(),this.$touchScrollingSub=b):this.$touchScrollingSub=null,this.menuScrollRefreshData(b),a.extend(f,{touchStartY:e.pageY,touchStartTime:d.timeStamp});else if(/move$/i.test(d.type)){var g=void 0!==f.touchY?f.touchY:f.touchStartY;if(void 0!==g&&g!=e.pageY){this.$touchScrollingSub=b;var h=g<e.pageY;void 0!==f.up&&f.up!=h&&a.extend(f,{touchStartY:e.pageY,touchStartTime:d.timeStamp}),a.extend(f,{up:h,touchY:e.pageY}),this.menuScroll(b,!0,Math.abs(e.pageY-g))}d.preventDefault()}else void 0!==f.touchY&&((f.momentum=15*Math.pow(Math.abs(e.pageY-f.touchStartY)/(d.timeStamp-f.touchStartTime),2))&&(this.menuScrollStop(b),this.menuScroll(b),d.preventDefault()),delete f.touchY)}}},menuShow:function(a){if((a.dataSM("beforefirstshowfired")||(a.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",a[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",a[0])!==!1&&(a.dataSM("shown-before",!0),k&&a.stop(!0,!0),!a.is(":visible"))){var b=a.dataSM("parent-a"),c=this.isCollapsible();if((this.opts.keepHighlighted||c)&&b.addClass("highlighted"),c)a.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(a.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(a.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&a.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var d=this.getWidth(a);a.css("max-width",this.opts.subMenusMaxWidth),d>this.getWidth(a)&&a.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(a)}var e=function(){a.css("overflow","")};c?k&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,a,e):a.show(this.opts.collapsibleShowDuration,e):k&&this.opts.showFunction?this.opts.showFunction.call(this,a,e):a.show(this.opts.showDuration,e),b.attr("aria-expanded","true"),a.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(a),this.$root.triggerHandler("show.smapi",a[0])}},popupHide:function(a){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var b=this;this.hideTimeout=setTimeout(function(){b.menuHideAll()},a?1:this.opts.hideTimeout)},popupShow:function(a,b){if(!this.opts.isPopup)return void alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),k&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:a,top:b});var c=this,d=function(){c.$root.css("overflow","")};k&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,d):this.$root.show(this.opts.showDuration,d),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(b){if(this.handleEvents())switch(b.keyCode){case 27:var c=this.activatedItems[0];if(c){this.menuHideAll(),c[0].focus();var d=c.dataSM("sub");d&&this.menuHide(d)}break;case 32:var e=a(b.target);if(e.is("a")&&this.handleItemEvents(e)){var d=e.dataSM("sub");d&&!d.is(":visible")&&(this.itemClick({currentTarget:b.target}),b.preventDefault())}}},rootOut:function(a){if(this.handleEvents()&&!this.isTouchMode()&&a.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var b=this;this.hideTimeout=setTimeout(function(){b.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(a){this.handleEvents()&&!this.isTouchMode()&&a.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(a){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==a.type){var b=this.isCollapsible();this.wasCollapsible&&b||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=b}}else if(this.$disableOverlay){var c=this.$root.offset();this.$disableOverlay.css({top:c.top,left:c.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),a.fn.dataSM=function(a,b){return b?this.data(a+"_smartmenus",b):this.data(a+"_smartmenus")},a.fn.removeDataSM=function(a){return this.removeData(a+"_smartmenus")},a.fn.smartmenus=function(b){if("string"==typeof b){var c=arguments,d=b;return Array.prototype.shift.call(c),this.each(function(){var b=a(this).data("smartmenus");b&&b[d]&&b[d].apply(b,c)})}return this.each(function(){var c=a(this).data("sm-options")||null;c&&"object"!=typeof c&&(c=null,alert('ERROR\n\nSmartMenus jQuery init:\nThe value of the "data-sm-options" attribute must be valid JSON.')),c&&a.each(["showFunction","hideFunction","collapsibleShowFunction","collapsibleHideFunction"],function(){this in c&&delete c[this]}),new a.SmartMenus(this,a.extend({},a.fn.smartmenus.defaults,b,c))})},a.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(a,b){a.fadeOut(200,b)},collapsibleShowDuration:0,collapsibleShowFunction:function(a,b){a.slideDown(200,b)},collapsibleHideDuration:0,collapsibleHideFunction:function(a,b){a.slideUp(200,b)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},a});
!function(t){var o=function(o,s){var i,e,n,r,a=!1,c=!1,f=!1,p={},l={to:"top",offset:0,effectsOffset:0,parent:!1,classes:{sticky:"sticky",stickyActive:"sticky-active",stickyEffects:"sticky-effects",spacer:"sticky-spacer"},isRTL:!1,handleScrollbarWidth:!1},d=function(t,o,s){var i={},e=t[0].style;s.forEach((function(t){i[t]=void 0!==e[t]?e[t]:""})),t.data("css-backup-"+o,i)},m=function(t,o){return t.data("css-backup-"+o)};const u=()=>{if(r=b(i,"width"),n=i.offset().left,e.isRTL){const t=e.handleScrollbarWidth?window.innerWidth:document.body.offsetWidth;n=Math.max(t-r-n,0)}};var h=function(){p.$spacer=i.clone().addClass(e.classes.spacer).css({visibility:"hidden",transition:"none",animation:"none"}),i.after(p.$spacer)},y=function(){p.$spacer.remove()},k=function(){d(i,"unsticky",["position","width","margin-top","margin-bottom","top","bottom","inset-inline-start"]);const t={position:"fixed",width:r,marginTop:0,marginBottom:0};t[e.to]=e.offset,t["top"===e.to?"bottom":"top"]="",n&&(t["inset-inline-start"]=n+"px"),i.css(t).addClass(e.classes.stickyActive)},v=function(){i.css(m(i,"unsticky")).removeClass(e.classes.stickyActive)},b=function(t,o,s){var i=getComputedStyle(t[0]),e=parseFloat(i[o]),n="height"===o?["top","bottom"]:["left","right"],r=[];return"border-box"!==i.boxSizing&&r.push("border","padding"),s&&r.push("margin"),r.forEach((function(t){n.forEach((function(o){e+=parseFloat(i[t+"-"+o])}))})),e},w=function(t){var o=p.$window.scrollTop(),s=b(t,"height"),i=innerHeight,e=t.offset().top-o,n=e-i;return{top:{fromTop:e,fromBottom:n},bottom:{fromTop:e+s,fromBottom:n+s}}},g=function(){v(),y(),a=!1,i.trigger("sticky:unstick")},$=function(){var t=w(i),o="top"===e.to;if(c){(o?t.top.fromTop>e.offset:t.bottom.fromBottom<-e.offset)&&(p.$parent.css(m(p.$parent,"childNotFollowing")),i.css(m(i,"notFollowing")),c=!1)}else{var s=w(p.$parent),a=getComputedStyle(p.$parent[0]),f=parseFloat(a[o?"borderBottomWidth":"borderTopWidth"]),l=o?s.bottom.fromTop-f:s.top.fromBottom+f;(o?l<=t.bottom.fromTop:l>=t.top.fromBottom)&&function(){d(p.$parent,"childNotFollowing",["position"]),p.$parent.css("position","relative"),d(i,"notFollowing",["position","inset-inline-start","top","bottom"]);const t={position:"absolute"};if(n=p.$spacer.position().left,e.isRTL){const t=i.parent().outerWidth(),o=p.$spacer.position().left;r=p.$spacer.outerWidth(),n=Math.max(t-r-o,0)}t["inset-inline-start"]=n+"px",t[e.to]="",t["top"===e.to?"bottom":"top"]=0,i.css(t),c=!0}()}},T=function(){var t,o=e.offset;if(a){var s=w(p.$spacer);t="top"===e.to?s.top.fromTop-o:-s.bottom.fromBottom-o,e.parent&&$(),t>0&&g()}else{var n=w(i);(t="top"===e.to?n.top.fromTop-o:-n.bottom.fromBottom-o)<=0&&(u(),h(),k(),a=!0,i.trigger("sticky:stick"),e.parent&&$())}!function(t){f&&-t<e.effectsOffset?(i.removeClass(e.classes.stickyEffects),f=!1):!f&&-t>=e.effectsOffset&&(i.addClass(e.classes.stickyEffects),f=!0)}(t)},B=function(){T()},C=function(){a&&(v(),y(),u(),h(),k(),e.parent&&(c=!1,$()))};this.destroy=function(){a&&g(),p.$window.off("scroll",B).off("resize",C),i.removeClass(e.classes.sticky)},e=jQuery.extend(!0,l,s),i=t(o).addClass(e.classes.sticky),p.$window=t(window),e.parent&&(p.$parent=i.parent(),"parent"!==e.parent&&(p.$parent=p.$parent.closest(e.parent))),p.$window.on({scroll:B,resize:C}),T()};t.fn.sticky=function(s){var i="string"==typeof s;return this.each((function(){var e=t(this);if(i){var n=e.data("sticky");if(!n)throw Error("Trying to perform the `"+s+"` method prior to initialization");if(!n[s])throw ReferenceError("Method `"+s+"` not found in sticky instance");n[s].apply(n,Array.prototype.slice.call(arguments,1)),"destroy"===s&&e.removeData("sticky")}else e.data("sticky",new o(this,s))})),this},window.Sticky=o}(jQuery);
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
window.matchMedia||(window.matchMedia=function(){
'use strict';
var styleMedia=(window.styleMedia||window.media);
if(!styleMedia){
var style=document.createElement('style'),
script=document.getElementsByTagName('script')[0],
info=null;
style.type='text/css';
style.id='matchmediajs-test';
if(!script){
document.head.appendChild(style);
}else{
script.parentNode.insertBefore(style, script);
}
info=('getComputedStyle' in window)&&window.getComputedStyle(style, null)||style.currentStyle;
styleMedia={
matchMedium: function(media){
var text='@media ' + media + '{ #matchmediajs-test { width: 1px; }}';
if(style.styleSheet){
style.styleSheet.cssText=text;
}else{
style.textContent=text;
}
return info.width==='1px';
}};}
return function(media){
return {
matches: styleMedia.matchMedium(media||'all'),
media: media||'all'
};};
}());
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){var b="waitForImages",c=function(a){return a.srcset&&a.sizes}(new Image);a.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},a.expr.pseudos["has-src"]=function(b){return a(b).is('img[src][src!=""]')},a.expr.pseudos.uncached=function(b){return!!a(b).is(":has-src")&&!b.complete},a.fn.waitForImages=function(){var d,e,f,g=0,h=0,i=a.Deferred(),j=this,k=[],l=a.waitForImages.hasImageProperties||[],m=a.waitForImages.hasImageAttributes||[],n=/url\(\s*(['"]?)(.*?)\1\s*\)/g;if(a.isPlainObject(arguments[0])?(f=arguments[0].waitForAll,e=arguments[0].each,d=arguments[0].finished):1===arguments.length&&"boolean"===a.type(arguments[0])?f=arguments[0]:(d=arguments[0],e=arguments[1],f=arguments[2]),d=d||a.noop,e=e||a.noop,f=!!f,!a.isFunction(d)||!a.isFunction(e))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var b=a(this);f?b.find("*").addBack().each(function(){var b=a(this);b.is("img:has-src")&&!b.is("[srcset]")&&k.push({src:b.attr("src"),element:b[0]}),a.each(l,function(a,c){var d,e=b.css(c);if(!e)return!0;for(;d=n.exec(e);)k.push({src:d[2],element:b[0]})}),a.each(m,function(a,c){var d=b.attr(c);return!d||void k.push({src:b.attr("src"),srcset:b.attr("srcset"),element:b[0]})})}):b.find("img:has-src").each(function(){k.push({src:this.src,element:this})})}),g=k.length,h=0,0===g&&(d.call(j),i.resolveWith(j)),a.each(k,function(f,k){var l=new Image,m="load."+b+" error."+b;a(l).one(m,function b(c){var f=[h,g,"load"==c.type];if(h++,e.apply(k.element,f),i.notifyWith(k.element,f),a(this).off(m,b),h==g)return d.call(j[0]),i.resolveWith(j[0]),!1}),c&&k.srcset&&(l.srcset=k.srcset,l.sizes=k.sizes),l.src=k.src}),i.promise()}});
(function(e){e.fn.appear=function(t,n){var r=e.extend({data:undefined,one:true,accX:0,accY:0},n);return this.each(function(){var n=e(this);n.appeared=false;if(!t){n.trigger("appear",r.data);return}var i=e(window);var s=function(){if(!n.is(":visible")){n.appeared=false;return}var e=i.scrollLeft();var t=i.scrollTop();var s=n.offset();var o=s.left;var u=s.top;var a=r.accX;var f=r.accY;var l=n.height();var c=i.height();var h=n.width();var p=i.width();if(u+l+f>=t&&u<=t+c+f&&o+h+a>=e&&o<=e+p+a){if(!n.appeared)n.trigger("appear",r.data)}else{n.appeared=false}};var o=function(){n.appeared=true;if(r.one){i.unbind("scroll",s);var o=e.inArray(s,e.fn.appear.checks);if(o>=0)e.fn.appear.checks.splice(o,1)}t.apply(this,arguments)};if(r.one)n.one("appear",r.data,o);else n.bind("appear",r.data,o);i.scroll(s);e.fn.appear.checks.push(s);s()})};e.extend(e.fn.appear,{checks:[],timeout:null,checkAll:function(){var t=e.fn.appear.checks.length;if(t>0)while(t--)e.fn.appear.checks[t]()},run:function(){if(e.fn.appear.timeout)clearTimeout(e.fn.appear.timeout);e.fn.appear.timeout=setTimeout(e.fn.appear.checkAll,20)}});e.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(t,n){var r=e.fn[n];if(r){e.fn[n]=function(){var t=r.apply(this,arguments);e.fn.appear.run();return t}}})})(jQuery);
jQuery(function(){
ParallaxScroll.init();
});
var ParallaxScroll={
showLogs: false,
round: 1000,
init: function(){
this._log("init");
if(this._inited){
this._log("Already Inited");
this._inited=true;
return;
}
this._requestAnimationFrame=(function(){
return  window.requestAnimationFrame       ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame    ||
window.oRequestAnimationFrame      ||
window.msRequestAnimationFrame     ||
function( callback,  element){
window.setTimeout(callback, 1000 / 60);
};})();
this._onScroll(true);
},
_inited: false,
_properties: ['x', 'y', 'z', 'rotateX', 'rotateY', 'rotateZ', 'scaleX', 'scaleY', 'scaleZ', 'scale'],
_requestAnimationFrame:null,
_log: function(message){
if(this.showLogs) console.log("Parallax Scroll / " + message);
},
_onScroll: function(noSmooth){
var scroll=jQuery(document).scrollTop();
var windowHeight=jQuery(window).height();
this._log("onScroll " + scroll);
jQuery("[data-parallax]").each(jQuery.proxy(function(index, el){
var jQueryel=jQuery(el);
var properties=[];
var applyProperties=false;
var style=jQueryel.data("style");
if(style==undefined){
style=jQueryel.attr("style")||"";
jQueryel.data("style", style);
}
var datas=[jQueryel.data("parallax")];
var iData;
for(iData=2; ; iData++){
if(jQueryel.data("parallax"+iData)){
datas.push(jQueryel.data("parallax-"+iData));
}else{
break;
}}
var datasLength=datas.length;
for(iData=0; iData < datasLength; iData ++){
var data=datas[iData];
var scrollFrom=data["from-scroll"];
if(scrollFrom==undefined) scrollFrom=Math.max(0, jQuery(el).offset().top - windowHeight);
scrollFrom=scrollFrom | 0;
var scrollDistance=data["distance"];
var scrollTo=data["to-scroll"];
if(scrollDistance==undefined&&scrollTo==undefined) scrollDistance=windowHeight;
scrollDistance=Math.max(scrollDistance | 0, 1);
var easing=data["easing"];
var easingReturn=data["easing-return"];
if(easing==undefined||!jQuery.easing||!jQuery.easing[easing]) easing=null;
if(easingReturn==undefined||!jQuery.easing||!jQuery.easing[easingReturn]) easingReturn=easing;
if(easing){
var totalTime=data["duration"];
if(totalTime==undefined) totalTime=scrollDistance;
totalTime=Math.max(totalTime | 0, 1);
var totalTimeReturn=data["duration-return"];
if(totalTimeReturn==undefined) totalTimeReturn=totalTime;
scrollDistance=1;
var currentTime=jQueryel.data("current-time");
if(currentTime==undefined) currentTime=0;
}
if(scrollTo==undefined) scrollTo=scrollFrom + scrollDistance;
scrollTo=scrollTo | 0;
var smoothness=data["smoothness"];
if(smoothness==undefined) smoothness=30;
smoothness=smoothness | 0;
if(noSmooth||smoothness==0) smoothness=1;
smoothness=smoothness | 0;
var scrollCurrent=scroll;
scrollCurrent=Math.max(scrollCurrent, scrollFrom);
scrollCurrent=Math.min(scrollCurrent, scrollTo);
if(easing){
if(jQueryel.data("sens")==undefined) jQueryel.data("sens", "back");
if(scrollCurrent>scrollFrom){
if(jQueryel.data("sens")=="back"){
currentTime=1;
jQueryel.data("sens", "go");
}else{
currentTime++;
}}
if(scrollCurrent<scrollTo){
if(jQueryel.data("sens")=="go"){
currentTime=1;
jQueryel.data("sens", "back");
}else{
currentTime++;
}}
if(noSmooth) currentTime=totalTime;
jQueryel.data("current-time", currentTime);
}
this._properties.map(jQuery.proxy(function(prop){
var defaultProp=0;
var to=data[prop];
if(to==undefined) return;
if(prop=="scale"||prop=="scaleX"||prop=="scaleY"||prop=="scaleZ"){
defaultProp=1;
}else{
to=to | 0;
}
var prev=jQueryel.data("_" + prop);
if(prev==undefined) prev=defaultProp;
var next=((to-defaultProp) * ((scrollCurrent - scrollFrom) / (scrollTo - scrollFrom))) + defaultProp;
var val=prev + (next - prev) / smoothness;
if(easing&&currentTime>0&&currentTime<=totalTime){
var from=defaultProp;
if(jQueryel.data("sens")=="back"){
from=to;
to=-to;
easing=easingReturn;
totalTime=totalTimeReturn;
}
val=jQuery.easing[easing](null, currentTime, from, to, totalTime);
}
val=Math.ceil(val * this.round) / this.round;
if(val==prev&&next==to) val=to;
if(!properties[prop]) properties[prop]=0;
properties[prop] +=val;
if(prev!=properties[prop]){
jQueryel.data("_" + prop, properties[prop]);
applyProperties=true;
}}, this));
}
if(applyProperties){
if(properties["z"]!=undefined){
var perspective=data["perspective"];
if(perspective==undefined) perspective=800;
var jQueryparent=jQueryel.parent();
if(!jQueryparent.data("style")) jQueryparent.data("style", jQueryparent.attr("style")||"");
jQueryparent.attr("style", "perspective:" + perspective + "px; -webkit-perspective:" + perspective + "px; "+ jQueryparent.data("style"));
}
if(properties["scaleX"]==undefined) properties["scaleX"]=1;
if(properties["scaleY"]==undefined) properties["scaleY"]=1;
if(properties["scaleZ"]==undefined) properties["scaleZ"]=1;
if(properties["scale"]!=undefined){
properties["scaleX"] *=properties["scale"];
properties["scaleY"] *=properties["scale"];
properties["scaleZ"] *=properties["scale"];
}
var translate3d="translate3d(" + (properties["x"] ? properties["x"]:0) + "px, " + (properties["y"] ? properties["y"]:0) + "px, " + (properties["z"] ? properties["z"]:0) + "px)";
var rotate3d="rotateX(" + (properties["rotateX"] ? properties["rotateX"]:0) + "deg) rotateY(" + (properties["rotateY"] ? properties["rotateY"]:0) + "deg) rotateZ(" + (properties["rotateZ"] ? properties["rotateZ"]:0) + "deg)";
var scale3d="scaleX(" + properties["scaleX"] + ") scaleY(" + properties["scaleY"] + ") scaleZ(" + properties["scaleZ"] + ")";
var cssTransform=translate3d + " " + rotate3d + " " + scale3d + ";";
this._log(cssTransform);
jQueryel.attr("style", "transform:" + cssTransform + " -webkit-transform:" + cssTransform + " " + style);
}}, this));
if(window.requestAnimationFrame){
window.requestAnimationFrame(jQuery.proxy(this._onScroll, this, false));
}else{
this._requestAnimationFrame(jQuery.proxy(this._onScroll, this, false));
}}
};
var parseOpts=function(data){
if(typeof(data)=="object"){
return data;
}else if(typeof(data)=="string"){
try {
return JSON.parse(data.replace(/'/g, '"').replace(';', '') );
} catch(e){
return {};}}else{
return {};}};
(function($, window, document, undefined){
'use strict';
var deeperSpacer=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
this.config=parseOpts(this.$elm.data('config') );
};
deeperSpacer.prototype={
defaults: {
},
init: function(){
this.args=$.extend({}, this.defaults, this.opts, this.config);
var t=this;
$(window).on('load resize', function(){
var mode='desktop';
if(matchMedia('only screen and (max-width: 991px)').matches)
mode='mobile';
if(matchMedia('only screen and (max-width: 767px)').matches)
mode='smobile';
if('desktop'==mode) t.$elm.attr('style', 'height:' + t.args.desktop + 'px')
if('mobile'==mode) t.$elm.attr('style', 'height:' + t.args.mobile + 'px')
if('smobile'==mode) t.$elm.attr('style', 'height:' + t.args.smobile + 'px')
});
},
};
$.fn.deeperSpacer=function(opts){
return this.each(function(){
new deeperSpacer(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var deeperContentBox=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
this.config=parseOpts(this.$elm.data('config') );
};
deeperContentBox.prototype={
defaults: {
padding: '0',
mobipadding: '0',
margin: '0',
mobimargin: '0',
},
init: function(){
this.args=$.extend({}, this.defaults, this.opts, this.config);
var t=this;
$(window).on('load resize', function(){
var mode='desktop';
if(matchMedia('only screen and (max-width: 991px)').matches)
mode='mobile';
if('desktop'==mode)
t.$elm.css('margin', t.args.margin)
.children('.inner').css('padding', t.args.padding);
if('mobile'==mode)
t.$elm.css('margin', t.args.mobiMargin)
.children('.inner').css('padding', t.args.mobiPadding);
});
var
t=this,
bg, r, b, s, bgh, rh, bch, bwh, bsh, txh, tyh,
css='', cls='',
a=t.$elm.attr('class').split(' ');
$(a).each(function(i, e){ cls +='.' + e; });
bg=t.args.bg ? 'background-color:' + t.args.bg + ' !important;':'';
r=t.args.round ? 'border-radius:' + t.args.round + ' !important;':'';
b=t.args.border ? 'border:' + t.args.border + ' !important;':'';
s=t.args.shadow ? 'box-shadow:' + t.args.shadow + ' !important;':'';
bgh=t.args.bgHover ? 'background-color:' + t.args.bgHover + ' !important;':'';
rh=t.args.roundHover ? 'border-radius:' + t.args.roundHover + ' !important;':'';
bch=t.args.borderColorHover ? 'border-color:' + t.args.borderColorHover + ' !important;':'';
bwh=t.args.borderWidthHover ? 'border-width:' + t.args.borderWidthHover + ' !important;':'';
bsh=t.args.borderStyleHover ? 'border-style:' + t.args.borderStyleHover + ' !important;':'';
txh=t.args.translateXHover ? 'transform:translateX(' + t.args.translateXHover + ') !important;':'';
tyh=t.args.translateYHover ? 'transform:translateY(' + t.args.translateYHover + ') !important;':'';
if(bg||r || b||s)
css +=cls + ' .inner {' + bg + r + b + s + '}\n';
if(bgh||rh||bch||bwh||bsh||txh||tyh)
css +=cls + ':hover .inner {' + bgh + rh + bch + bwh + bsh + txh + tyh + '}\n';
css&&$("#deeper-dynamic").length
? $("#deeper-dynamic").append(css)
: $("head").append('<style type="text/css" id="deeper-dynamic">' + css + '</style>');
},
};
$.fn.deeperContentBox=function(opts){
return this.each(function(){
new deeperContentBox(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var deeperButton=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
this.config=parseOpts(this.$elm.data('config') );
};
deeperButton.prototype={
defaults: {
},
init: function(){
this.args=$.extend({}, this.defaults, this.opts, this.config);
if(! jQuery.isEmptyObject(this.args)){
var
t=this,
css='', cls='',
c, g, b, s, ch, gh, bh, sh, p, m, r, h,
a=t.$elm.attr('class').split(' ');
$(a).each(function(i, e){ cls +='.' + e; });
p=t.args.padding ? 'padding:' + t.args.padding + ' !important;':'';
m=t.args.margin ? 'margin:' + t.args.margin + ' !important;':'';
r=t.args.rounded ? 'border-radius:' + t.args.rounded + ' !important;':'';
c=t.args.color ? 'color:' + t.args.color + ' !important;':'';
g=t.args.bg ? 'background-color:' + t.args.bg + ' !important;':'';
b=t.args.border ? 'border:' + t.args.border + ' !important;':'';
s=t.args.shadow ? 'box-shadow:' + t.args.shadow + ' !important;':'';
ch=t.args.colorHover ? 'color:' + t.args.colorHover + ' !important;':'';
gh=t.args.bgHover ? 'background-color:' + t.args.bgHover + ' !important;':'';
bh=t.args.borderHover ? 'border:' + t.args.borderHover + ' !important;':'';
sh=t.args.shadowHover ? 'box-shadow:' + t.args.shadowHover + ' !important;':'';
css +=cls + ' {' + c + g + b + p + m + r + s + '}\n';
css +=(h=t.args.parentHover)
? '.' + h + ':hover ' + cls + ' {' + ch + gh + bh + sh + '}\n'
: cls + ':hover {' + ch + gh + bh + sh + '}\n';
if(css)
css&&$("#deeper-dynamic").length
? $("#deeper-dynamic").append(css)
: $("head").append('<style type="text/css" id="deeper-dynamic">' + css + '</style>');
}},
};
$.fn.deeperButton=function(opts){
return this.each(function(){
new deeperButton(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var deeperLink=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
this.config=parseOpts(this.$elm.data('config') );
};
deeperLink.prototype={
defaults: {
},
init: function(){
this.args=$.extend({}, this.defaults, this.opts, this.config);
if(! jQuery.isEmptyObject(this.args)){
var
t=this,
css='', cls='',
c, lc, ic, hc, hlc, hic, ph,
a=t.$elm.attr('class').split(' ');
$(a).each(function(i, e){ cls +='.' + e; });
if(c=t.args.color) c='color:' + t.args.color + ' !important;';
if(lc=t.args.lineColor) lc='background-color:' + t.args.lineColor + ' !important;';
if(ic=t.args.iconColor) ic='color:' + t.args.lineColor + ' !important;';
if(hc=t.args.hoverColor) hc='color:' + t.args.hoverColor + ' !important;';
if(hlc=t.args.hoverLineColor) hlc='background-color:' + t.args.hoverLineColor + ' !important;';
if(hic=t.args.hoverIconColor) hic='color:' + t.args.hoverIconColor + ' !important;';
if(c) css +=cls + ' {' + c + '}\n';
if(lc) css +=cls + ' .line {' + lc + '}\n';
if(ic) css +=cls + ' .icon {' + ic + '}\n';
if(ph=t.args.parentHover){
if(hc) css +='.' + ph + ':hover ' + cls + ' {' + hc + '}\n';
if(hlc) css +='.' + ph + ':hover ' + cls + ' .line {' + hlc + '}\n';
if(hic) css +='.' + ph + ':hover ' + cls + ' .icon {' + hic + '}\n';
}else{
if(hc) css +=cls + ':hover {' + hc + '}\n';
if(hlc) css +=cls + ':hover .line {' + hlc + '}\n';
if(hic) css +=cls + ':hover .icon {' + hic + '}\n';
}
css&&$("#deeper-dynamic").length
? $("#deeper-dynamic").append(css)
: $("head").append('<style type="text/css" id="deeper-dynamic">' + css + '</style>');
}},
};
$.fn.deeperLink=function(opts){
return this.each(function(){
new deeperLink(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var deeperCarousel=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
this.config=parseOpts(this.$elm.data('config') );
};
deeperCarousel.prototype={
defaults: {
contain: !1,
imagesLoaded: !0,
percentPosition: !0,
prevNextButtons: !1,
pageDots: !1,
adaptiveHeight: !1,
cellAlign: "left",
groupCells: !0,
dragThreshold: 20,
wrapAround: !1,
autoPlay: !1,
fullAside: !0,
navArrow: 1,
filters: !1,
equalHeightCells: !1,
randomVerOffset: !1,
buttonsAppendTo: null,
},
init: function(){
var
svg=this.config.arrowShapeStyle ;
this.$elm.children().wrap('<div class="item-flickity">');
switch (svg){
case "svg1":
svg='M97.5,47.5H98c-0.1,0-0.2,0-0.2,0h-89L24.3,32c1-1,1-2.6,0-3.5c-1-1-2.6-1-3.5,0L0.9,48.2c-1,1-1,2.6,0,3.5l0,0l0,0l19.8,19.8c1,1,2.6,1,3.5,0c1-1,1-2.6,0-3.5L8.7,52.5h14.6c0.1,0,0.2,0,0.2,0h74c1.4,0,2.5-1.1,2.5-2.5C100,48.6,98.9,47.5,97.5,47.5z';
break;
case "svg2":
svg='M10,50c0,2,1,3,2,4l34.5,34.5c2,2,5,2,7,0s2-5,0-7L27,55h58c3,0,5-2,5-5s-2-5-5-5H27l26.5-26.5c2-2,2-5,0-7c-1-1-2-1.5-3.5-1.5s-2.5,0.5-3.5,1.5L12,46C11,47,10,48,10,50z';
break;
case "svg3":
svg='M32.4,50L75.8,6.6c1.5-1.5,1.5-3.9,0-5.4s-3.9-1.5-5.4,0L24.2,47.3c-1.5,1.5-1.5,3.9,0,5.4l46.2,46.2c1.5,1.5,4,1.4,5.4-0.1s1.4-3.9,0-5.3L32.4,50z';
break;
default:
svg='M97.5,47.5H98c-0.1,0-0.2,0-0.2,0h-89L24.3,32c1-1,1-2.6,0-3.5c-1-1-2.6-1-3.5,0L0.9,48.2c-1,1-1,2.6,0,3.5l0,0l0,0l19.8,19.8c1,1,2.6,1,3.5,0c1-1,1-2.6,0-3.5L8.7,52.5h14.6c0.1,0,0.2,0,0.2,0h74c1.4,0,2.5-1.1,2.5-2.5C100,48.6,98.9,47.5,97.5,47.5z';
break;
}
this.config.arrowShape=svg;
this.args=$.extend({}, this.defaults, this.opts, this.config);
this.initFlickity();
this.event();
},
initFlickity: function(){
var t=this;
t.$elm.waitForImages(function(){
t.$elm.flickity(t.args);
t.flickityData=$(t.elm).data('flickity');
t.args.adaptiveHeight&&$(".flickity-viewport", t.$elm).css('transition', 'height 0.2s');
t.fullAside();
});
},
fullAside: function(){
if(this.args.fullAside){
var
t=this,
v=$(t.flickityData.viewport),
w=t.flickityData.size.width,
s=window.innerWidth - (w + v.offset().left),
i=$('<div class="flickity-aside-wrap" />');
v.wrap(i).css('overflow', 'visible')
.parent()
.css({
'padding-right': s,
'margin-right': -s,
'overflow': 'hidden'
});
}},
event: function(){
if(this.config.cellAlign=='center'){
var selected=this.$elm.find('.item-flickity.is-selected'),
item=this.$elm.find('.item-flickity');
if(selected.length > 1){
var column=selected.length,
centerIndex=selected.index() + Math.floor(column/2);
item.removeClass('center');
item.eq(centerIndex).addClass('center');
}else{
item.removeClass('center');
selected.addClass('center');
}
this.$elm.on('select.flickity', function(event, index){
var selected=$(this).find('.item-flickity.is-selected'),
item=$(this).find('.item-flickity');
if(selected.length > 1){
var column=selected.length,
centerIndex=selected.index() + Math.floor(column/2);
item.removeClass('center');
item.eq(centerIndex).addClass('center');
}else{
$(item).removeClass('center');
$(selected).addClass('center');
}});
}
if(this.$elm.hasClass('app-carousel')){
var selected=this.$elm.find('.item-flickity.is-selected'),
item=this.$elm.find('.item-flickity');
if(selected.length > 1){
var centerIndex=selected.index();
item.removeClass('selected');
item.eq(centerIndex).addClass('selected');
item.eq(centerIndex + 1).addClass('selected');
item.eq(centerIndex - 1).addClass('selected');
}
this.$elm.on('select.flickity', function(event, index){
var selected=$(this).find('.item-flickity.is-selected'),
item=$(this).find('.item-flickity');
var centerIndex=selected.index();
item.removeClass('selected');
item.eq(centerIndex).addClass('selected');
item.eq(centerIndex + 1).addClass('selected');
item.eq(centerIndex - 1).addClass('selected');
});
}}
};
$.fn.deeperCarousel=function(opts){
return this.each(function(){
new deeperCarousel(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var deeperSlick=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
this.config=parseOpts(this.$elm.data('config') );
};
deeperSlick.prototype={
defaults: {
},
init: function(){
$('.deeper-slick-slider').each(function (){
var slickNav=$(this).find('.slick-slider-nav'),
slickContent=$(this).find('.slick-content-item');
if(slickContent.length){
var navItem=slickContent.find('.slick-nav-item').remove();
navItem.appendTo(slickNav);
}});
var $containers=$('.slick-container');
if(!$containers.length) return;
var defaults={
speed: 700,
infinite: true,
focusOnSelect: true,
};
$containers.each(function(){
var $container=$(this);
var $sliders=$container.find('.slick-slider, .slick-slider-nav');
$sliders.each(function(){
var $slider=$(this);
var options=$slider.data('slick');
if(options===undefined||options===null) options={};
options=$.extend({}, defaults, options);
if($slider.data('navTarget')!==undefined&&$slider.data('navTarget').length){
options.asNavFor=$($slider.data('navTarget'));
}
var instance=$slider.slick(options);
if(this.unifato===undefined) this.unifato={};
this.unifato.slick={};
this.unifato.slick.instance=instance;
});
});
},
};
$.fn.deeperSlick=function(opts){
return this.each(function(){
new deeperSlick(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var deeperIcon=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
this.config=parseOpts(this.$elm.data('config') );
};
deeperIcon.prototype={
defaults: {
},
init: function(){
this.args=$.extend({}, this.defaults, this.opts, this.config);
if(! jQuery.isEmptyObject(this.args)){
var
t=this,
css='', cls='',
c, bg, fs, w, h, lh, r, s, m, b,
ch, bgh, sh, ph, bh,
a=t.$elm.attr('class').split(' ');
$(a).each(function(i, e){ cls +='.' + e; });
m=t.args.margin ? 'margin:' + t.args.margin + ' !important;':'';
w=t.args.width ? 'width:' + t.args.width + ' !important;':'';
h=t.args.height ? 'height:' + t.args.height + ' !important;':'';
r=t.args.rounded ? 'border-radius:' + t.args.rounded + ' !important;':'';
c=t.args.color ? 'color:' + t.args.color +' !important;':'';
bg=t.args.bg ? 'background-color:' + t.args.bg + ' !important;':'';
b=t.args.border ? 'border:' + t.args.border + ' !important;':'';
s=t.args.shadow ? 'box-shadow:' + t.args.shadow + ' !important;':'';
fs=t.args.fontSize ? 'font-size:' + t.args.fontSize + ' !important;':'';
lh=t.args.lineHeight ? 'line-height:' + t.args.lineHeight + ' !important;':'';
ch=t.args.colorHover ? 'color:' + t.args.colorHover + ' !important;':'';
bh=t.args.borderHover ? 'border:' + t.args.borderHover + ' !important;':'';
bgh=t.args.bgHover ? 'background-color:' + t.args.bgHover + ' !important;':'';
sh=t.args.borderHover ? 'border:' + t.args.borderHover + ' !important;':'';
css +=cls + ' .icon-wrap {' + m + w + h + r + c + bg + b + s + fs + lh + '}\n';
if(ch||bgh||bh||sh)
css +=(h=t.args.parentHover)
? '.' + h + ':hover ' + cls + ' .icon-wrap {' + ch + bgh + bh + sh + '}\n'
: cls + ':hover .icon-wrap {' + ch + bgh + bh + sh + '}\n';
css&&$("#deeper-dynamic").length
? $("#deeper-dynamic").append(css)
: $("head").append('<style type="text/css" id="deeper-dynamic">' + css + '</style>');
}},
};
$.fn.deeperIcon=function(opts){
return this.each(function(){
new deeperIcon(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var deeperGrixBox=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
};
deeperGrixBox.prototype={
init: function(){
var column=$(this.elm).data('column');
$(this.elm).children('div').wrap('<div class="grid-item">');
var item=$(this.elm).children('.grid-item');
for(var i=0; i < item.length; i +=column){
item.slice(i, i + column).wrapAll("<div class='grid-row clearfix'></div>");
}},
};
$.fn.deeperGrixBox=function(opts){
return this.each(function(){
new deeperGrixBox(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var deeperFancyImage=function(elm, opts){
this.elm=elm;
this.$elm=$(elm);
this.opts=opts;
this.config=parseOpts(this.$elm.data('config') );
};
deeperFancyImage.prototype={
defaults: {
},
init: function(){
this.args=$.extend({}, this.defaults, this.opts, this.config);
if(! jQuery.isEmptyObject(this.args)){
var
t=this,
css='', cls='',
sl, sr,
a=t.$elm.attr('class').split(' ');
$(a).each(function(i, e){
if(e.trim())
cls +='.' + e;
});
sl=t.args.stretchLeft ? 'margin-left:' + t.args.stretchLeft + ' !important;':'';
sr=t.args.stretchRight ? 'margin-right:' + t.args.stretchRight + ' !important;':'';
if(sl||sr)
css +='@media (min-width: 1200px){'+ cls +' {' + sl + sr + '}}\n';
css&&$("#deeper-dynamic").length
? $("#deeper-dynamic").append(css)
: $("head").append('<style type="text/css" id="deeper-dynamic">' + css + '</style>');
}},
};
$.fn.deeperFancyImage=function(opts){
return this.each(function(){
new deeperFancyImage(this, opts).init();
});
};}(jQuery, window, document));
(function($, window, document, undefined){
'use strict';
var halfBackground=function(){
$(window).on('load resize', function(){
$('.half-background').each(function(){
var $this=$(this),
screenw=$(window).width(),
containerw=$this.parent().width(),
col=$this.find('.vc-row-half-bg'),
index=$this.index(),
elm=0;
elm=(screenw - containerw) / 2;
if(elm > 0){
col.css({ position: 'absolute', top: 0, height: '100%' });
if(matchMedia('only screen and (max-width: 991px)').matches){
col.css({ left: '-30px', right: '-30px' });
}else{
if(index==0){
col.css({ left: -elm + 'px', right: 0 });
}else{
col.css({ right: -elm + 'px', left: 0 });
}}
}})
})
}
var accordions=function(){
$('.deeper-accordions').each(function(){
var args={easing:'easeOutExpo', duration:300};
$(this).children('.item.active').children('.content').show();
$(this).children('.item').find('.heading').on('click', function(){
if(!$(this).parent().is('.active')){
$(this).parent().toggleClass('active')
.children('.content').slideToggle(args)
.parent().siblings('.active').removeClass('active')
.children('.content').slideToggle(args);
}else{
$(this).parent().toggleClass('active');
$(this).next().slideToggle(args);
}})
})
}
var advtabs=function(){
$('.deeper-adv-tabs').each(function(){
var
list='',
title=$(this).find('.item-title').remove(),
titleWrap=$(this).children('.tab-title') ;
title.each(function(){
list +="<div class='item-title'>" + $(this).html() + "</div>";
});
titleWrap.append(list);
var first=$(this).find('.tab-title > div').filter(':first').addClass('active').find('.image-icon');
first.attr('src', first.data('hover-src'));
$(this).find('.tab-content-wrap').children().hide().filter(':first').show();
$(this).find('.tab-title > div').on('click', function(e){
var
idx=$(this).index(),
content=$(this).closest('.deeper-adv-tabs').find('.tab-content-wrap').children().eq(idx),
imgSibs=$(this).siblings('.item-title').find('.image-icon');
$(this).addClass('active').siblings().removeClass('active');
content.fadeIn('slow').siblings().hide();
$.each(imgSibs, function(){
$(this).attr('src', $(this).data('origin-src'));
});
e.preventDefault();
});
});
$(document).on('mouseover', '.anchor-link', function(){
if(! $(this).parent('div').hasClass('active')){
var hover_src=$(this).find('.image-icon').data('hover-src');
if(''!==hover_src){
$(this).find('.image-icon').attr('src', hover_src);
}}
})
$(document).on('mouseleave', '.anchor-link', function(){
if(! $(this).parent('div').hasClass('active')){
var origin_src=$(this).find('.image-icon').data('origin-src');
$(this).find('.image-icon').attr('src', origin_src);
}})
};
var imagePopup=function(){
if($().magnificPopup){
$('.deeper-portfolio, .deeper-galleries, .owl-carousel').each(function (){
$(this).find('.image-popup').magnificPopup({
disableOn: 700,
type: 'image',
gallery:{
enabled: true
},
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: true
});
});
};};
var videoPopup=function(){
if($().magnificPopup){
$('.popup-video').magnificPopup({
disableOn: 700,
type: 'iframe',
iframe: {
patterns: {
youtube: {
index: 'youtube.com/',
id: function(url){
var m=url.match(/[\\?\\&]v=([^\\?\\&]+)/);
if(!m||!m[1]) return null;
return m[1];
},
src: 'https://www.youtube.com/embed/%id%?autoplay=1&rel=0'
},
},
},
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: true
});
};};
var inViewport=function(){
if($().appear){
$('[data-inviewport="yes"]').appear(function(){
var $this=$(this);
$this.addClass('is-in-view');
if($this.hasClass("deeper-fancy-image")){
$this.addClass('animated');
}},{ accY: -200 });
}};
var progressBar=function(){
if($().appear){
$('.deeper-progress').appear(function(){
function init(){
var bar=$('.progress-animate'),
bar_width=$(this);
$(function(){
$(bar).each(function(){
bar_width=$(this).data('valuenow');
$(this).width(bar_width);
$(this).parents('.deeper-progress').find('.perc').addClass('show').width(bar_width);
});
});
}
init();
},{ accY: -200 });
}};
var progressCircle=function(){
if(! $('#piechart-gradient').length){
$('.deeper-piechart:first').append('<svg width="0" height="0" style="display:block;"><linearGradient id="piechart-gradient" gradientTransform="rotate(90)"><stop class="start-color" offset="0"/><stop class="end-color" offset="1"/></linearGradient></svg>');
}
$('.piechart').each(function (){
var $this=$(this);
var value=Number($this.data("value")) / 100;
var option;
option={
strokeWidth: 7.5,
trailWidth: 7.5,
duration: 1500,
text: {
value: '0%'
},
step: function (state, bar){
bar.setText((bar.value() * 100).toFixed(0) + "%");
}}
var circle=new ProgressBar.Circle($(this)[0], option);
$this.appear(function(direction){
circle.animate(value);
},{ accY: -200 })
});
};
var counter=function(){
if($().countTo){
$('.deeper-counter, .deeper-progress').appear(function(){
var $this=$(this);
function init(){
$this.find('.number').each(function(){
var to=$this.data('to'),
speed=$this.data('speed');
$(this).countTo({
to: to,
speed: speed
});
});
}
init();
});
}};
var animation=function(){
new WOW().init();
};
var parallaxImages=function(){
var parallaxBox=$('.deeper-parallax-box');
if(parallaxBox.length){
$(window).on('load resize', function(){
parallaxBox.each(function(){
var
wrap=$(this).find('.parallax-wrap'),
height=[];
$(this).waitForImages(function(){
$(this).find('.deeper-parallax-item').each(function(){
height.push(parseInt($(this).css('marginTop')) + $(this).height());
});
wrap.css('height', Math.max.apply(null, height));
});
});
});
}};
var canvasParallax=function(){
var parallaxBox=$('.deeper-canvas');
if(parallaxBox.length){
$(window).on('load resize', function(){
parallaxBox.each(function(){
var
wrap=$(this).find('.parallax-wrap'),
height=[];
$(this).waitForImages(function(){
$(this).find('.canvas-item').each(function(){
height.push(parseInt($(this).css('marginTop')) + $(this).height());
});
wrap.css('height', Math.max.apply(null, height));
});
});
});
}};
var fancyTexts=function(){
if($('.deeper-fancy-text').is('.scroll')){
$('.deeper-fancy-text.scroll').each(function(){
var
$this=$(this),
current=1,
height=$this.height(),
numberDivs=$this.children().length,
first=$this.children('.heading:nth-child(1)');
setInterval(function(){
var number=current * -height;
first.css('margin-top', number + 'px');
if(current===numberDivs){
first.css('margin-top', '0px');
current=1;
} else current++;
}, 2500);
});
}
if($('.deeper-fancy-text').is('.typed')){
if($().typed){
$('.deeper-fancy-text.typed').each(function(){
var
$this=$(this),
texts=$this.data('fancy').split(',');
$this.find('.text').typed({
strings: texts,
typeSpeed: 30,
loop: true,
backDelay: 4000
});
});
}}
if($('.deeper-fancy-text').is('.zoom')){
if($().animatedHeadline){
$('.deeper-fancy-text.zoom').animatedHeadline({
animationType: 'zoom'
});
}}
}
var cubePortfolio=function(){
if($().cubeportfolio){
$('.deeper-cubeportfolio.project-cube').each(function(){
var
$this=$(this),
item=$this.data("column"),
item2=$this.data("column2"),
item3=$this.data("column3"),
item4=$this.data("column4"),
gapH=Number($this.data("gaph")),
gapV=Number($this.data("gapv")),
filter=$this.data("filter");
if(!filter){ filter='*'; }else{ filter='.' + filter; }
$this.find('#portfolio-galleries').cubeportfolio({
filters: '#portfolio-filter',
defaultFilter: filter,
layoutMode: 'grid',
animationType: 'quicksand',
gapHorizontal: gapH,
gapVertical: gapV,
showNavigation: true,
showPagination: true,
gridAdjustment: 'responsive',
rewindNav: false,
auto: false,
mediaQueries: [{
width: 1500,
cols: item
}, {
width: 923,
cols: item
}, {
width: 878,
cols: item2
}, {
width: 675,
cols: item3
}, {
width: 502,
cols: item4
}],
caption: '',
displayType: 'bottomToTop',
displayTypeSpeed: 100
});
});
}};
var cubeNews=function(){
if($().cubeportfolio){
$('.deeper-cubeportfolio.news-cube').each(function(){
var
$this=$(this),
item=$this.data("column"),
item2=$this.data("column2"),
item3=$this.data("column3"),
item4=$this.data("column4"),
gapH=Number($this.data("gaph")),
gapV=Number($this.data("gapv")),
filter=$this.data("filter");
if(!filter){ filter='*'; }else{ filter='.' + filter; }
$this.find('#news-galleries').cubeportfolio({
filters: '#news-filter',
defaultFilter: filter,
layoutMode: 'grid',
animationType: 'quicksand',
gapHorizontal: gapH,
gapVertical: gapV,
showNavigation: true,
showPagination: true,
gridAdjustment: 'responsive',
rewindNav: false,
auto: false,
mediaQueries: [{
width: 1500,
cols: item
}, {
width: 923,
cols: item
}, {
width: 878,
cols: item2
}, {
width: 675,
cols: item3
}, {
width: 502,
cols: item4
}],
caption: '',
displayType: 'bottomToTop',
displayTypeSpeed: 100
});
});
}};
var cubeTeam=function(){
if($().cubeportfolio){
$('.deeper-cubeportfolio.team-cube').each(function(){
var
$this=$(this),
item=$this.data("column"),
item2=$this.data("column2"),
item3=$this.data("column3"),
item4=$this.data("column4"),
gapH=Number($this.data("gaph")),
gapV=Number($this.data("gapv")),
filter=$this.data("filter");
if(!filter){ filter='*'; }else{ filter='.' + filter; }
$this.find('#team-galleries').cubeportfolio({
filters: '#team-filter',
defaultFilter: filter,
layoutMode: 'grid',
animationType: 'quicksand',
gapHorizontal: gapH,
gapVertical: gapV,
showNavigation: true,
showPagination: true,
gridAdjustment: 'responsive',
rewindNav: false,
auto: false,
mediaQueries: [{
width: 1500,
cols: item
}, {
width: 923,
cols: item
}, {
width: 878,
cols: item2
}, {
width: 675,
cols: item3
}, {
width: 502,
cols: item4
}],
caption: '',
displayType: 'bottomToTop',
displayTypeSpeed: 100
});
});
}};
var heroLoaded=function(){
setTimeout(function(){
$('.deeper-slider').addClass('loaded'); }, 300);
}
var animationInit=function(){
$('.wow').css('visibility', 'hidden');
}
$('.deeper-spacer').deeperSpacer();
$('.deeper-content-box').deeperContentBox();
halfBackground();
parallaxImages();
canvasParallax();
$(function(){
$('.deeper-button').deeperButton();
$('.deeper-link').deeperLink();
$('.deeper-slick-slider').deeperSlick();
$('.deeper-icon').deeperIcon();
$('.deeper-gridbox').deeperGrixBox();
$('.deeper-fancy-image.stretch').deeperFancyImage();
animationInit();
inViewport();
accordions();
fancyTexts();
progressBar();
progressCircle();
advtabs();
imagePopup();
videoPopup();
counter();
cubePortfolio();
cubeNews();
cubeTeam();
});
$(window).on('load', function(){
$('.deeper-carousel-box').deeperCarousel();
animation();
heroLoaded();
});
}(jQuery, window, document));
(()=>{"use strict";var e,r,a,n={},b={};function __webpack_require__(e){var r=b[e];if(void 0!==r)return r.exports;var a=b[e]={exports:{}};return n[e](a,a.exports,__webpack_require__),a.exports}__webpack_require__.m=n,e=[],__webpack_require__.O=(r,a,n,b)=>{if(!a){var i=1/0;for(o=0;o<e.length;o++){for(var[a,n,b]=e[o],c=!0,t=0;t<a.length;t++)(!1&b||i>=b)&&Object.keys(__webpack_require__.O).every((e=>__webpack_require__.O[e](a[t])))?a.splice(t--,1):(c=!1,b<i&&(i=b));if(c){e.splice(o--,1);var _=n();void 0!==_&&(r=_)}}return r}b=b||0;for(var o=e.length;o>0&&e[o-1][2]>b;o--)e[o]=e[o-1];e[o]=[a,n,b]},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((r,a)=>(__webpack_require__.f[a](e,r),r)),[])),__webpack_require__.u=e=>635===e?"code-highlight.b9addbc842a50347c9ab.bundle.min.js":519===e?"video-playlist.909c41acbc73cb741e9d.bundle.min.js":375===e?"paypal-button.f4f64e46173f50701949.bundle.min.js":786===e?"0726b2d81686a5392236.bundle.min.js":857===e?"stripe-button.49130d6eecb5ebc8afbd.bundle.min.js":581===e?"progress-tracker.8cccdda9737c272489fc.bundle.min.js":961===e?"animated-headline.c009d6fa482515df23f8.bundle.min.js":692===e?"media-carousel.8d26e5df1a1527329fde.bundle.min.js":897===e?"carousel.3620fca501cb18163600.bundle.min.js":416===e?"countdown.0e9e688751d29d07a8d3.bundle.min.js":292===e?"hotspot.5033ed75928eff79cb95.bundle.min.js":325===e?"form.71055747203b48a65a24.bundle.min.js":543===e?"gallery.06be1c07b9901f53d709.bundle.min.js":970===e?"lottie.a287ccfe024bea61e651.bundle.min.js":334===e?"nav-menu.8521a0597c50611efdc6.bundle.min.js":887===e?"popup.f7b15b2ca565b152bf98.bundle.min.js":535===e?"load-more.8b46f464e573feab5dd7.bundle.min.js":396===e?"posts.aec59265318492b89cb5.bundle.min.js":726===e?"portfolio.4cd5da34009c30cb5d70.bundle.min.js":316===e?"share-buttons.63d984f8c96d1e053bc0.bundle.min.js":829===e?"slides.c0029640cbdb48199471.bundle.min.js":158===e?"social.d71d263bd937f0906192.bundle.min.js":404===e?"table-of-contents.3be1ab725f562d10dd86.bundle.min.js":345===e?"archive-posts.16a93245d08246e5e540.bundle.min.js":798===e?"search-form.b7065999d77832a1b764.bundle.min.js":6===e?"woocommerce-menu-cart.54f2e75f6769dce707e2.bundle.min.js":80===e?"woocommerce-purchase-summary.88a2d8ca449739e34f9f.bundle.min.js":354===e?"woocommerce-checkout-page.6ba1f1f2aa99210fa1cf.bundle.min.js":4===e?"woocommerce-cart.480d117b95956d1f28a5.bundle.min.js":662===e?"woocommerce-my-account.d54826f355f9822b0ec0.bundle.min.js":621===e?"woocommerce-notices.00f9132bbbd683277a27.bundle.min.js":787===e?"product-add-to-cart.c32f5d5e404511d68720.bundle.min.js":993===e?"loop.89cc81d2188312a17a17.bundle.min.js":932===e?"loop-carousel.cd9a95b2e4dd2a239b81.bundle.min.js":550===e?"ajax-pagination.2090b5f4906bcda1dcc2.bundle.min.js":727===e?"mega-menu.82093824ddb3f5531ab4.bundle.min.js":87===e?"mega-menu-stretch-content.480e081cebe071d683e8.bundle.min.js":912===e?"menu-title-keyboard-handler.f0362773c21105d2c65c.bundle.min.js":33===e?"nested-carousel.db797a097fdc5532ef4a.bundle.min.js":225===e?"taxonomy-filter.a32526f3e4a201b5fce1.bundle.min.js":579===e?"off-canvas.137463f629e2b7cbaf02.bundle.min.js":1===e?"contact-buttons.99a987d66bcc2ade0ee6.bundle.min.js":61===e?"contact-buttons-var-10.16cf733dc3d3b250fef4.bundle.min.js":249===e?"floating-bars-var-2.75c36e8b0bacbac6105e.bundle.min.js":440===e?"floating-bars-var-3.cdf99fd0b063a0032d53.bundle.min.js":187===e?"search.5d88e65c03029f91931d.bundle.min.js":void 0,__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},a="elementor-pro:",__webpack_require__.l=(e,n,b,i)=>{if(r[e])r[e].push(n);else{var c,t;if(void 0!==b)for(var _=document.getElementsByTagName("script"),o=0;o<_.length;o++){var d=_[o];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==a+b){c=d;break}}c||(t=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,__webpack_require__.nc&&c.setAttribute("nonce",__webpack_require__.nc),c.setAttribute("data-webpack",a+b),c.src=e),r[e]=[n];var onScriptComplete=(a,n)=>{c.onerror=c.onload=null,clearTimeout(u);var b=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),b&&b.forEach((e=>e(n))),a)return a(n)},u=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=onScriptComplete.bind(null,c.onerror),c.onload=onScriptComplete.bind(null,c.onload),t&&document.head.appendChild(c)}},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var r=__webpack_require__.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var a=r.getElementsByTagName("script");if(a.length)for(var n=a.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=a[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={978:0};__webpack_require__.f.j=(r,a)=>{var n=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==n)if(n)a.push(n[2]);else if(978!=r){var b=new Promise(((a,b)=>n=e[r]=[a,b]));a.push(n[2]=b);var i=__webpack_require__.p+__webpack_require__.u(r),c=new Error;__webpack_require__.l(i,(a=>{if(__webpack_require__.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var b=a&&("load"===a.type?"missing":a.type),i=a&&a.target&&a.target.src;c.message="Loading chunk "+r+" failed.\n("+b+": "+i+")",c.name="ChunkLoadError",c.type=b,c.request=i,n[1](c)}}),"chunk-"+r,r)}else e[r]=0},__webpack_require__.O.j=r=>0===e[r];var webpackJsonpCallback=(r,a)=>{var n,b,[i,c,t]=a,_=0;if(i.some((r=>0!==e[r]))){for(n in c)__webpack_require__.o(c,n)&&(__webpack_require__.m[n]=c[n]);if(t)var o=t(__webpack_require__)}for(r&&r(a);_<i.length;_++)b=i[_],__webpack_require__.o(e,b)&&e[b]&&e[b][0](),e[b]=0;return __webpack_require__.O(o)},r=self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))})()})();