if(window.NodeList&&!NodeList.prototype.forEach){NodeList.prototype.forEach=function(callback,thisArg){thisArg=thisArg||window;for(var i=0;iscreenWidth;if(isMobile){navs.forEach(function(nav){if(!nav.classList.contains('mobile')){nav.classList.add('mobile');self.toggleHoverEventListeners(nav)}})}else{navs.forEach(function(nav){if(nav.classList.contains('mobile')){nav.classList.remove('mobile');self.toggleHoverEventListeners(nav)}})}},liMouseEnterEvent:function(){this.classList.add('hover')},liMouseLeaveEvent:function(){this.classList.remove('hover')},toggleHoverEventListeners:function(nav){if(nav.classList.contains('mobile')){this.removeHoverEventListeners(nav)}else{this.addHoverEventListeners(nav)}},addHoverEventListeners:function(nav){nav.querySelectorAll('li').forEach(function(li){li.addEventListener('mouseenter',window.alxMediaMenu.liMouseEnterEvent);li.addEventListener('mouseleave',window.alxMediaMenu.liMouseLeaveEvent)})},removeHoverEventListeners:function(nav){nav.querySelectorAll('li').forEach(function(li){li.removeEventListener('mouseenter',window.alxMediaMenu.liMouseEnterEvent);li.removeEventListener('mouseleave',window.alxMediaMenu.liMouseLeaveEvent)})},toggleFocus:function(){var self=this;while(-1===self.className.indexOf('nav-menu')){if('li'===self.tagName.toLowerCase()){if(-1!==self.className.indexOf('focus')){self.className=self.className.replace(' focus','')}else{self.className+=' focus'}} self=self.parentElement}},toggleFocusTouch:function(el){var touchStartFn,parentLinks=el.querySelectorAll('.menu-item-has-children > a, .page_item_has_children > a');if('ontouchstart' in window){touchStartFn=function(e){var menuItem=this.parentNode;if(!menuItem.classList.contains('focus')){e.preventDefault();menuItem.parentNode.children.forEach(function(child){if(menuItem!==child){child.classList.remove('focus')}});menuItem.classList.add('focus')}else{menuItem.classList.remove('focus')}};parentLinks.forEach(function(parentLink){parentLink.addEventListener('touchstart',touchStartFn,!1)})}},helper:{toggleClass:function(el,className){if(el.classList.contains(className)){el.classList.remove(className)}else{el.classList.add(className)}},firstAncestorMatch:function(el,selector){if(el.parentNode.matches(selector)){return el.parentNode} return this.firstAncestorMatch(el.parentNode,selector)}}};window.alxMediaMenu.init({selector:'.main-navigation.nav-menu',breakpoint:720}) ;