(function(o){o(window).scroll(function(){o(this).scrollTop()>300?o(".scroll-to-top").addClass("show"):o(".scroll-to-top").removeClass("show")}),o(".scroll-to-top").click(function(t){t.preventDefault(),o("html, body").animate({scrollTop:0},300)}),document.addEventListener("keydown",function(t){if(t.keyCode===27||t.key==="Escape"){var r=document.getElementById("navbarToggle");r&&r.checked&&(r.checked=!1);var c=document.querySelectorAll(".submenu-checkbox:checked");c.forEach(function(l){l.checked=!1})}}),document.addEventListener("DOMContentLoaded",function(){var t=document.querySelector('label[for="navbarToggle"]');t&&t.addEventListener("keydown",function(e){(e.keyCode===32||e.keyCode===13||e.key===" "||e.key==="Enter")&&(e.preventDefault(),e.stopPropagation(),this.click(),this.focus())});var r=document.querySelectorAll(".dropdown-caret"),c=document.querySelector("nav[data-text-toggle]"),l=c?c.getAttribute("data-text-toggle"):"Toggle submenu";r.forEach(function(e){e.setAttribute("tabindex","0"),e.setAttribute("role","button"),e.setAttribute("aria-label",l),e.addEventListener("keydown",function(n){(n.keyCode===32||n.keyCode===13||n.key===" "||n.key==="Enter")&&(n.preventDefault(),n.stopPropagation(),this.click(),this.focus())})})})})(jQuery);
