!function(o){etTheme.autoinit.mainNavigation=etTheme.mainNavigation=function(){etTheme.et_global.w_width>etTheme.et_global.mob_header_start&&o("body").on("mousemove",function(t){var e=o(".menu-main-container .menu, .et_b_header-menu .menu");let i=[];i.boxed=-1<o.inArray(etConfig.layoutSettings.layout,["boxed","framed"]),i.extraBoxedOffset=i.boxed?o(".page-wrapper").offset().left:0,e.find(".item-design-mega-menu:not(.mega-menu-full-width) > .nav-sublist-dropdown, .item-design-posts-subcategories:not(.mega-menu-full-width) > .nav-sublist-dropdown").each(function(){var e=[];e.li=o(this).parent(),e.li.hasClass("dropdown-calculated")||etTheme.isNear(e.li,70,t)&&(e.liOffset=e.li.offset().left-i.extraBoxedOffset,e.liOffsetTop=e.li.offset().top,e.liWidth=o(this).parent().width(),e.dropdownMarginLeft=e.liWidth/2,e.dropdownWidth=o(this).outerWidth(),e.dropdownLeft=e.liOffset-e.dropdownWidth/2,e.dropdownBottom=e.liOffsetTop-o(window).scrollTop()+o(this).outerHeight(),e.fitHeight=!1,e.dropdownLeft<0?(e.left=e.liOffset-10,e.dropdownMarginLeft=0):e.left=e.dropdownWidth/2,etConfig.layoutSettings.is_rtl?o(this).css({right:-e.left,marginLeft:e.dropdownMarginLeft}):o(this).css({left:-e.left,marginLeft:e.dropdownMarginLeft}),etTheme.et_global.w_width-2*i.extraBoxedOffset-(e.liOffset-e.left+e.dropdownWidth+e.dropdownMarginLeft)<0&&o(this).css({left:"auto",right:-(etTheme.et_global.w_width-e.liOffset-e.liWidth-10)+2*i.extraBoxedOffset}),e.li.addClass("dropdown-calculated"),delete e)}),delete i})}}(jQuery);