/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var e,o=location.hash.substring(1);/^[A-z0-9_-]+$/.test(o)&&(e=document.getElementById(o))&&(/^(?:a|select|input|button|textarea)$/i.test(e.tagName)||(e.tabIndex=-1),e.focus())},!1),function(e){"use strict";e.fn.stopScrolling=function(){return e("html").on("wheel.modal mousewheel.modal",function(){return!1}),this},e.fn.restoreScrolling=function(){return e("html").off("wheel.modal mousewheel.modal"),this};var o=e(".body-overlay");if(e(".hamburger-menu").on("click",function(){o.addClass("is-active"),e(".main-navigation").toggleClass("is-active"),e(this).toggleClass("cross"),e.fn.stopScrolling()}),e(".hamburger-menu.cross, .close-navigation").on("click",function(){e(".hamburger-menu").removeClass("cross"),o.removeClass("is-active"),e(".main-navigation").removeClass("is-active"),e.fn.restoreScrolling()}),e(".header-search").on("click",function(){e(".search-popup").addClass("show"),setTimeout(function(){e(".search-popup").find(".search-field").focus()},50),e.fn.stopScrolling()}),e(".search-close, .slide-in-box-close").on("click",function(){e(".search-popup").removeClass("show"),o.removeClass("is-active")}),e(".search-close.popup-search-close").on("click",function(){e(".header-search").focus()}),e(".header-search").on("click",function(){e(".search-close.popup-search-close").focus()}),e(".close-navigation").on("click",function(){e(".hamburger-menu").focus()}),e(".hamburger-menu").on("click",function(){e("body").toggleClass("menu-open")}),e(".close-navigation, .body-overlay").on("click",function(){e("body").removeClass("menu-open")}),e(".hamburger-menu").on("click",function(){e(".close-navigation").focus()}),jQuery(document).on("focus",".circular-focus",function(){jQuery(jQuery(this).data("goto")).focus()}),e(document).keyup(function(n){27===n.keyCode&&(e(".search-popup").removeClass("show"),e(".hamburger-menu").removeClass("cross"),o.removeClass("is-active"),e(".main-navigation").removeClass("is-active"),e(".header-social .social-profiles-section").removeClass("is-active"),e.fn.restoreScrolling())}),e(document).on("click",function(n){0===e(n.target).closest(".hamburger-menu,.main-navigation, .header-search .icon-search").length&&(o.removeClass("is-active"),e(".main-navigation").removeClass("is-active"),e(".hamburger-menu").removeClass("cross"),e.fn.restoreScrolling())}),e(".wp-block-gallery, .gallery").magnificPopup({delegate:"a",type:"image",tLoading:"Loading image #%curr%...",closeOnContentClick:!1,closeBtnInside:!1,mainClass:"mfp-with-zoom mfp-img-mobile",image:{verticalFit:!0,tError:"The image can not be loaded.",titleSrc:function(e){return e.el.attr("title")}},gallery:{enabled:!0},zoom:{enabled:!0,duration:300,opener:function(e){return e.find("img")}}}),e(".back-to-top").length){var n=function(){e(window).scrollTop()>500?e(".back-to-top").addClass("show"):e(".back-to-top").removeClass("show")};n(),e(window).on("scroll",function(){n()}),e(".back-to-top").on("click",function(o){o.preventDefault(),e("html,body").animate({scrollTop:0},800)})}}(jQuery);