(function(a){'use strict';var b={_timeOutHoverMenu:[],_timeOutHoverOutMenu:[],_timeOutDuration:200,init:function(){this.menuHover(),this.subMenuSize(),this.menuPosition(),this.megaMenuActive()},isMobile:function(){var c=991,d=a('body');return'undefined'==typeof d.data('responsive-breakpoint')||isNaN(parseInt(d.data('responsive-breakpoint'),10))||(c=parseInt(d.data('responsive-breakpoint'),10)),window.matchMedia('(max-width: '+c+'px)').matches},menuHover:function(){var c=this;a('.x-nav-menu li.menu-item').each(function(){var d=a(this),e=0;d.hover(function(){if(!c.isMobile()){var f=a(this),g=f.prop('id'),h=f.data('transition');e=g,'undefined'!=typeof c._timeOutHoverMenu[g]&&clearTimeout(c._timeOutHoverMenu[g]),c._timeOutHoverMenu[g]=setTimeout(function(){f.addClass('x-active')},c._timeOutDuration)}},function(){if(!c.isMobile()){var f=a(this),g=f.prop('id'),h=f.data('transition');clearTimeout(c._timeOutHoverMenu[g]),null==h?f.removeClass('x-active'):(e=0,c._timeOutHoverOutMenu[g]=setTimeout(function(){e===g||(f.find(' > ul.sub-menu').addClass(h+'-out'),setTimeout(function(){f.removeClass('x-active'),f.find(' > ul.sub-menu').removeClass(h+'-out')},300))},c._timeOutDuration))}})})},subMenuSize:function(){var c=this;c.isMobile()?a('.x-nav-menu li.menu-item > ul.sub-menu').each(function(){var d=a(this),e=d.parent();(e.hasClass('x-submenu-width-fullwidth')||e.hasClass('x-submenu-width-container'))&&d.css({width:'',left:''})}):a('.x-nav-menu li.menu-item > ul.sub-menu').each(function(){var f,g,h,d=a(this),e=d.parent();e.hasClass('x-submenu-width-fullwidth')?(g=a(window).width(),h=-e.offset().left):e.hasClass('x-submenu-width-container')&&(f=a('.x-nav-menu-container'),f.length?g=f.width():(g=1200,a(window).width() li.menu-item > .x-submenu-custom-width').each(function(){var d=a(this);d.css({left:''})}):a('.x-nav-menu > li.menu-item > .x-submenu-custom-width').each(function(){var i,j,d=a(this),e=d.parent(),f=a('.x-nav-menu-container'),g=d.outerWidth(),h=0,k='right';f.length?(h=f.width(),j=(a(window).width()-h)/2):(h=a(window).width()-30,j=15),e.hasClass('x-submenu-position-left')&&(k='left'),e.hasClass('x-submenu-width-fullwidth')||e.hasClass('x-submenu-width-container')||('right'==k?e.offset().left+g>j+h&&(i=j+h-(e.offset().left+g),d.css('left',i+'px')):e.offset().left+e.width()