!function(){const e=document.getElementById("site-navigation");if(!e)return;const t=e.getElementsByTagName("ul")[0];t.classList.contains("nav-menu")||t.classList.add("nav-menu");const n=t.getElementsByTagName("a"),s=t.querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a");for(const e of n)e.addEventListener("focus",a,!0),e.addEventListener("blur",a,!0);for(const e of s)e.addEventListener("touchstart",a,!1);function a(){if("focus"===event.type||"blur"===event.type){let e=this;for(;!e.classList.contains("nav-menu");)"li"===e.tagName.toLowerCase()&&e.classList.toggle("focus"),e=e.parentNode}if("touchstart"===event.type){const e=this.parentNode;event.preventDefault();for(const t of e.parentNode.children)e!==t&&t.classList.remove("focus");e.classList.toggle("focus")}}}();