PageSourceSearch

https://www.linkgenius.ai/wp-content/cache/autoptimize/js/autoptim…_single_6c2b63649cebbd01e29e8b57e04ab7e1.js

js linkgenius.ai collected 2026-10-05 13:09:35 UTC 12,360 bytes, 38 lines download raw bytes

1jQuery(document).ready(function($){var form_validation=$(".comment-form-url input, .comment-form-author input, .comment-form-email input, .comment-form-comment textarea");$(form_validation).blur(function(){if(!$(this).val()){$(this).parent().removeClass("keydesign-not-empty");}else{$(this).parent().addClass("keydesign-not-empty");}});var contact_form=$(".keydesign-label input, .keydesign-label textarea");$(contact_form).blur(function(){if(!$(this).val()){$(this).closest(".keydesign-label").removeClass("keydesign-not-empty");}else{$(this).closest(".keydesign-label").addClass("keydesign-not-empty");}});});;
2/*!
3 * Check if an element is out of the viewport
4 * (c) 2018 Chris Ferdinandi, MIT License, https://gomakethings.com
5 * @param  {Node}  elem The element to check
6 * @return {Object}     A set of booleans for each side of the element
7 * @source https://gomakethings.com/how-to-check-if-any-part-of-an-element-is-out-of-the-viewport-with-vanilla-js/
8 */
9var isOutOfViewport=function(elem){var bounding=elem.getBoundingClientRect();var out={};out.top=bounding.top<0;out.left=bounding.left<0;out.bottom=bounding.bottom>(window.innerHeight||document.documentElement.clientHeight);out.right=bounding.right>(window.innerWidth||document.documentElement.clientWidth);out.any=out.top||out.left||out.bottom||out.right;return out;};(function($){var responsivenav=1025;var html;var body;var container;var button;var menu;var menuWrapper;var links;var subMenus;var i;var len;var focusableElements;var firstFocusableElement;var lastFocusableElement;const menuItems=document.querySelectorAll('.menu-item');menuItems.forEach((li)=>{li.addEventListener('mouseover',function(){this.classList.add('hover-intent');this.parentNode.classList.add('hover-intent');document.addEventListener('keydown',(keydownMouseoverEvent)=>{if(keydownMouseoverEvent.key==='Escape'){li.classList.remove('hover-intent');li.parentNode.classList.remove('hover-intent');li.parentNode.parentNode.classList.remove('hover-intent');}});});li.addEventListener('mouseleave',function(){this.classList.remove('hover-intent');this.parentNode.classList.remove('hover-intent');document.addEventListener('keydown',(keydownMouseleaveEvent)=>{if(keydownMouseleaveEvent.key==='Escape'){li.classList.remove('hover-intent');li.parentNode.classList.remove('hover-intent');li.parentNode.parentNode.classList.remove('hover-intent');}});});});checkForSubmenuOverflow();function checkForSubmenuOverflow(){menuItems.forEach((li)=>{var subMenusUnderMenuItem=li.querySelectorAll('.sub-menu');subMenusUnderMenuItem.forEach((subMenu)=>{if(typeof subMenusUnderMenuItem!=='undefined'){var isOut=isOutOfViewport(subMenu);if(isOut.right){subMenu.classList.add('is-out-of-viewport');subMenu.parentElement.parentElement.classList.add('is-out-of-viewport');}else{subMenu.classList.remove('is-out-of-viewport');subMenu.parentElement.parentElement.classList.remove('is-out-of-viewport');}}});});}
10window.addEventListener('resize',checkForSubmenuOverflow);var menuContainer=$('.nav-container');var menuToggle=menuContainer.find('#nav-toggle');var siteHeaderMenu=menuContainer.find('#main-navigation-wrapper');var siteNavigation=menuContainer.find('#nav');var screenReaderText={"expand":"Expand child menu","collapse":"Collapse child menu"};$('.menu-item a, .dropdown button').on('keyup',function(e){const isSubMenuDropdownOpen=$(this).parent().parent().parent().find('.sub-menu').prev('.dropdown-toggle').attr('aria-expanded');const isMainMenuDropdownOpen=$(this).closest('.menu-item').find('.dropdown-toggle').attr('aria-expanded');const areWeInDropdown=$(this).parent().parent().hasClass('sub-menu');if(isSubMenuDropdownOpen==='true'||isMainMenuDropdownOpen==='true'){if($('.dropdown').find(':focus').length!==0){if(e.code==='Escape'){var thisDropdown=$(this).parent().parent().parent();var screenReaderSpan=thisDropdown.find('.screen-reader-text');var dropdownToggle=thisDropdown.find('.dropdown-toggle');thisDropdown.find('.sub-menu').removeClass('toggled-on');thisDropdown.find('.dropdown-toggle').removeClass('toggled-on');thisDropdown.find('.dropdown').removeClass('toggled-on');dropdownToggle.attr('aria-expanded','false');
10screenReaderSpan.text(screenReaderText.expand);if(areWeInDropdown===true){thisDropdown.find('.dropdown-toggle:first').trigger('focus');}}}}
11if(window.innerWidth>responsivenav){var prevDropdown=$(this).parent().prev();var screenReaderSpanPrev=prevDropdown.find('.screen-reader-text');var dropdownTogglePrev=prevDropdown.find('.dropdown-toggle');prevDropdown.find('.sub-menu').removeClass('toggled-on');prevDropdown.find('.dropdown-toggle').removeClass('toggled-on');prevDropdown.find('.dropdown').removeClass('toggled-on');dropdownTogglePrev.attr('aria-expanded','false');screenReaderSpanPrev.text(screenReaderText.expand);var nextDropdown=$(this).parent().next();var screenReaderSpanNext=nextDropdown.find('.screen-reader-text');var dropdownToggleNext=nextDropdown.find('.dropdown-toggle');nextDropdown.find('.sub-menu').removeClass('toggled-on');nextDropdown.find('.dropdown-toggle').removeClass('toggled-on');nextDropdown.find('.dropdown').removeClass('toggled-on');dropdownToggleNext.attr('aria-expanded','false');screenReaderSpanNext.text(screenReaderText.expand);}});siteHeaderMenu.find('.menu-item-has-children').attr('aria-haspopup','true');$('.dropdown-toggle').each(function(){$(this).attr('aria-label',`${screenReaderText.expand_for} ${$(this).prev().text()}`);});siteHeaderMenu.find('.dropdown-toggle').on('click',function(e){var dropdownMenu=$(this).nextAll('.sub-menu');$(this).toggleClass('toggled-on');dropdownMenu.toggleClass('toggled-on');$(this).attr('aria-expanded',$(this).attr('aria-expanded')==='false'?'true':'false',);$(this).attr('aria-label',$(this).attr('aria-label')===`${screenReaderText.collapse_for} ${$(this).prev().text()}`?`${screenReaderText.expand_for} ${$(this).prev().text()}`:`${screenReaderText.collapse_for} ${$(this).prev().text()}`,);});$('.sub-menu .menu-item-has-children').parent('.sub-menu').addClass('has-sub-menu');$('.menu-item a, button.dropdown-toggle').on('keydown',function(e){if(['ArrowUp','ArrowDown','ArrowLeft','ArrowRight'].indexOf(e.code)==-1){return;}
12switch(e.code){case'ArrowLeft':e.stopPropagation();if($(this).hasClass('dropdown-toggle')){$(this).prev('a').trigger('focus');}else if($(this).parent().prev().children('button.dropdown-toggle').length){$(this).parent().prev().children('button.dropdown-toggle').trigger('focus');}else{$(this).parent().prev().children('a').trigger('focus');}
13if($(this).is('ul ul ul.sub-menu.toggled-on li:first-child a')){$(this).parents('ul.sub-menu.toggled-on li').children('button.dropdown-toggle').trigger('focus');}
14break;case'ArrowRight':e.stopPropagation();if($(this).next('button.dropdown-toggle').length){$(this).next('button.dropdown-toggle').trigger('focus');}else if($(this).parent().next().find('input').length){$(this).parent().next().find('input').trigger('focus');}else{$(this).parent().next().children('a').trigger('focus');}
15if($(this).is('ul.sub-menu .dropdown-toggle.toggled-on')){$(this).parent().find('ul.sub-menu li:first-child a').trigger('focus');}
16break;case'ArrowDown':e.stopPropagation();if($(this).next().length){$(this).next().find('li:first-child a').first().trigger('focus');}else if($(this).parent().next().find('input').length){$(this).parent().next().find('input').trigger('focus');}else{$(this).parent().next().children('a').trigger('focus');}
17if($(this).is('ul.sub-menu a')&&$(this).next('button.dropdown-toggle').length){$(this).parent().next().children('a').trigger('focus');}
18if($(this).is('ul.sub-menu .dropdown-toggle')&&$(this).parent().next().children('.dropdown-toggle').length){$(this).parent().next().children('.dropdown-toggle').trigger('focus');}
19break;case'ArrowUp':e.stopPropagation();if($(this).parent().prev().length){$(this).parent().prev().children('a').trigger('focus');}else{$(this).parents('ul').first().prev('.dropdown-toggle.toggled-on').trigger('focus');}
20if($(this).is('ul.sub-menu .dropdown-toggle')&&$(this).parent().prev().children('.dropdown-toggle').length){$(this).parent().prev().children('.dropdown-toggle').trigger('focus');}
21break;}});container=document.getElementById('nav');if(!container){return;}
22button=document.getElementById('nav-toggle');
22if(typeof button==='undefined'){return;}
23html=document.getElementsByTagName('html')[0];body=document.getElementsByTagName('body')[0];menu=container.getElementsByTagName('ul')[0];menuWrapper=document.getElementById('main-navigation-wrapper');function mobileNav(){var mobileNavInstance;if(!menuToggle.length){return;}
24if(window.innerWidth<responsivenav){menuToggle.add(siteNavigation).attr('aria-expanded','false');}
25menuToggle.on('click',function(){$(this).add(siteHeaderMenu).toggleClass('toggled-on');$(this).attr('aria-expanded',$(this).attr('aria-expanded')==='false'?'true':'false',);$('#nav-toggle-label').text($('#nav-toggle-label').text()===screenReaderText.expand_toggle?screenReaderText.collapse_toggle:screenReaderText.expand_toggle,);$(this).attr('aria-label',$(this).attr('aria-label')===screenReaderText.expand_toggle?screenReaderText.collapse_toggle:screenReaderText.expand_toggle,);$(this).add(siteNavigation).attr('aria-expanded',$(this).add(siteNavigation).attr('aria-expanded')==='false'?'true':'false',);window.scrollTo(0,0);});if(typeof menu==='undefined'){button.style.display='none';return;}
26if(window.innerWidth<responsivenav){menu.setAttribute('aria-expanded','false');}
27if(menu.className.indexOf('nav-menu')===-1){menu.className+=' nav-menu';}
28if(window.innerWidth<responsivenav){firstFocusableElement=null;lastFocusableElement=null;var navElements=container.querySelectorAll(['.nav-primary a[href]','.nav-primary button',]);for(var ii=0;ii<navElements.length;ii++){navElements[ii].addEventListener('keydown',focusTrap);}}
29button.onclick=function(){if(container.className.indexOf('is-active')!==-1){closeMenu();}else{html.className+=' disable-scroll';body.className+=' js-nav-active';container.className+=' is-active';button.className+=' is-active';button.setAttribute('aria-expanded','true');menu.setAttribute('aria-expanded','true');button.addEventListener('keydown',focusTrap,false);}};document.addEventListener('keyup',(event)=>{if(event.code=='Escape'||event.code=='Esc'){if(container.className.indexOf('is-active')!==-1){closeMenu();}}});menuWrapper.onclick=function(e){if(e.target==menuWrapper&&container.className.indexOf('is-active')!==-1){closeMenu();}};}
30if(window.innerWidth<responsivenav){mobileNav();}
31function closeMenu(){button.removeEventListener('keydown',focusTrap,false);html.className=html.className.replace(' disable-scroll','');body.className=body.className.replace(' js-nav-active','');container.className=container.className.replace(' is-active','');button.className=button.className.replace(' is-active','');button.setAttribute('aria-expanded','false');menu.setAttribute('aria-expanded','false');$('#nav-toggle-label').text(screenReaderText.expand_toggle);button.focus();}
32links=menu.getElementsByTagName('a');subMenus=menu.getElementsByTagName('ul');for(i=0,len=links.length;i<len;i++){links[i].addEventListener('focus',toggleFocus,true);links[i].addEventListener('blur',toggleFocus,true);}
33function toggleFocus(){var self=this;while(self.className.indexOf('nav-menu')===-1){if(self.tagName.toLowerCase()==='li'){if(self.className.indexOf('focus')!==-1){self.className=self.className.replace(' focus','');}else{self.className+=' focus';}}
34self=self.parentElement;}}
35function focusTrap(e){focusableElements=[...container.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])',)].filter((el)=>!el.hasAttribute('disabled')).filter((el)=>!!(el.offsetWidth||el.offsetHeight||el.getClientRects().length));firstFocusableElement=focusableElements[0];lastFocusableElement=focusableElements[focusableElements.length-1];if(lastFocusableElement===e.target&&e.code==='Tab'&&!e.shiftKey){button.focus();}
36if(firstFocusableElement===e.target&&e.code==='Tab'&&e.shiftKey){button.focus();}
37if(button===e.target&&e.code==='Tab'&&e.shiftKey){lastFocusableElement.focus();}}
38$(window).on('resize',()=>{if(window.innerWidth>responsivenav&&body.className.indexOf('js-nav-active')!==-1){closeMenu();}else if(window.innerWidth<responsivenav&&typeof window.mobileNavInstance=='undefined'){mobileNav();}});}(jQuery));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.