!function(){let b=document.getElementById("site-navigation");if(!b)return;let c=b.getElementsByTagName("button")[0];if(void 0===c)return;let a=b.getElementsByTagName("ul")[0];if(void 0===a){c.style.display="none";return}a.classList.contains("nav-menu")||a.classList.add("nav-menu"),c.addEventListener("click",function(){b.classList.toggle("toggled"),"true"===c.getAttribute("aria-expanded")?c.setAttribute("aria-expanded","false"):c.setAttribute("aria-expanded","true")}),document.addEventListener("click",function(a){let d=b.contains(a.target);d||(b.classList.remove("toggled"),c.setAttribute("aria-expanded","false"))});let e=a.getElementsByTagName("a"),f=a.querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a");for(let d of e)d.addEventListener("focus",h,!0),d.addEventListener("blur",h,!0);for(let g of f)g.addEventListener("touchstart",h,!1);function h(){if("focus"===event.type||"blur"===event.type){let a=this;for(;!a.classList.contains("nav-menu");)"li"===a.tagName.toLowerCase()&&a.classList.toggle("focus"),a=a.parentNode}if("touchstart"===event.type){let b=this.parentNode;for(let c of(event.preventDefault(),b.parentNode.children))b!==c&&c.classList.remove("focus");b.classList.toggle("focus")}}}()