"use strict";!function(o,d,e,a){var s=o(".js-megamenu"),r=o(".js-megamenu-morenav"),t=o(".js-megamenu-morenav-bg"),i=o(".js-megamenu-more"),u=o(".js-megamenu-morenav-menu"),n=function(){var i=!1,t=0,n=o(".js-megamenu").outerWidth(!0)-100;o(".js-megamenu-item").each(function(e){var a=o(this);a.hasClass("is-outside")||a.data("megamenu-width",o(this).outerWidth(!0));var s=a.data("megamenu-width");n<=(t+=s)&&960<=o(d).width()?(a.addClass("is-outside"),u.children().eq(e).removeClass("is-outside"),i=!0):(o(this).removeClass("is-outside"),u.children().eq(e).addClass("is-outside"))}),i?r.addClass("is-active"):r.removeClass("is-active"),m()},m=function(){var s=null,i=0;o(".js-megamenu-item").each(function(e){var a=o(this);a.hasClass("is-outside")&&960<=o(d).width()?(s?a.css({top:s.outerHeight(!0)+s.position().top+"px"}):a.css({top:""}),i=a.outerHeight(!0)+a.position().top-106,s=a):a.css({top:""})}),t.css({height:i+"px"})};s.length&&(i.on("click",function(){"true"===i.attr("aria-expanded")?(i.attr("aria-expanded","false"),s.removeClass("is-moreOpen")):(i.attr("aria-expanded","true"),s.addClass("is-moreOpen")),m()}),o(d).on("orientationchange resize load",function(){n(),s.hide().show(0)}),s.on("hide.zf.dropdownmenu",function(){m()}),s.on("show.zf.dropdownmenu",function(){m()}),n(),s.hide().show(0),s.find('[data-toggle="primarynavigation"]').attr("aria-expanded","false"))}(jQuery,window,document);