var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opens = _____WB$wombat$assign$function_____("opens"); function moreButton($nav) { var lisInRow = 0; var langNavChildren = $("nav.mainMenu ul.languageNav>li", $nav); var hasLangNav = $(langNavChildren).length; var menuItemsNav = $('nav.mainMenu>ul.menuItemsNav', $nav); var menuItemsNavChildren = $('nav.mainMenu>ul.menuItemsNav>li:not(".moreButton, .moreButtonMeasure")', $nav); var menuItemsNavChildrenWidth = 0; var langNavWidth = 0; var moreButtonMeasureContainerWidth = 0; var navMenuWidth = parseInt($('nav.mainMenu', $nav).outerWidth(), 10); var navMenuWidthAfterCalc; var topRowWidth = 0; var lisInRowArr = []; var moreVerbiage='More'; menuItemsNavChildren.each(function(index) { menuItemsNavChildrenWidth += parseInt($(this).outerWidth(true), 10) + 1; // + 1 pixel to counteract some browsers' subpixel calculation }); if ( hasLangNav > 0 ) { langNavChildren.each(function(index) { langNavWidth += parseInt($(this).outerWidth(true), 10); }); } if ((menuItemsNavChildrenWidth + langNavWidth) > $('nav.mainMenu', $nav).outerWidth()) { menuItemsNavChildren.each(function() { lisInRow++; }); menuItemsNav .append($('
  • ') .append('
    '+moreVerbiage+'
    ') ); moreButtonMeasureContainerWidth = $(".moreButtonContent").outerWidth(true); menuItemsNavChildren.slice(0,lisInRow).each(function(i) { topRowWidth += parseInt($(this).outerWidth(true), 10); lisInRowArr.push(topRowWidth); }); navMenuWidthAfterCalc = navMenuWidth - langNavWidth - moreButtonMeasureContainerWidth; for (var i = lisInRowArr.length; i > 0 ; i--) { if ( lisInRowArr[i] < navMenuWidthAfterCalc ) { break; } if ( lisInRowArr[i] > navMenuWidthAfterCalc ) { lisInRow--; } } menuItemsNav.find('.moreButton') .append($('