(function(n,t,i){function e(n){let t;return n.hasClass(".dropdown-toggle")||(t=n.hasClass(".dropdown")?n.find(".dropdown-toggle").first():n.closest(".dropdown").find(".dropdown-toggle").first()),t}function u(n){e(n).dropdown("toggle")}function o(t){t.on("mouseenter mouseleave",function(t){const e=t.type,f=i(t.currentTarget);if(n.innerWidth>=r)switch(e){case"mouseenter":f.find(".dropdown-toggle").hasClass("show")||(u(f.find(".dropdown-toggle")),f.blur().find("a").blur());break;case"mouseleave":f.find(".dropdown-toggle").hasClass("show")&&(u(f.find(".dropdown-toggle")),f.blur().find("a").blur())}})}function s(t,r){const u=i(t.currentTarget);let f;r.on("keyup",function(n){f=n.keyCode});setTimeout(function(){if(f!==27){let t="";u.hasClass("dropdown-toggle")&&(t=u.focus().attr("href"),n.location.href=t)}else t.preventDefault()},250)}function h(n,t){const r=i(n.currentTarget);switch(t){case 27:r.hasClass("show")&&(u(r),r.focus());break;case 9:r.hasClass("show")||u(r);break;case 32:r.click()}}function c(t,r){const f=i(t.currentTarget);if(f.hasClass("show")){t.preventDefault();t.stopPropagation();let i="";i=f.is("a")?f.focus().attr("href"):f.hasClass("link-text")||f.closest("a").hasClass("arrow-link")?f.closest("a").focus().attr("href"):f.find("a").first().focus().attr("href");n.location.href=i}else if(f.data("bs-toggle")==="dropdown")t.preventDefault(),t.stopPropagation(),r.find(".dropdown-toggle.show").each(function(){u(i(this))}),u(f);else return}function l(t,u){t.on("touchstart click keyup",function(t){if(n.innerWidth>=r){const n=t.keyCode||t.which,r=t.type;switch(r){case"keyup":h(t,n);break;case"click":s(t,i(this));break;case"touchstart":c(t,u)}}})}function a(t){t.find(".hamburger-mobile .secondary-link, .search-mobile .secondary-link").on("keydown",function(t){if(n.innerWidth<r){const i=t.keyCode||t.which,n=t.currentTarget;i===32&&(t.preventDefault(),n.classList.contains("secondary-link")&&n.click())}})}const r=768,f=function(){if(n.innerWidth>=r){const u=i(".navbar-dotcom .navbar-nav").width(),f=i(".navbar-dotcom .navbar-nav .hamburger").width(),e=i(".navbar-dotcom .navbar-nav .dropdown-hallmark").outerWidth(!0);let n=0,t=0,r=0;i(".navbar-dotcom .navbar-nav .dropdown-named-items").each(function(){r++;r<=3&&(n+=i(this).outerWidth(!0))});t=u/2-n-f-e/2;i(".navbar-dotcom .navbar-nav .hamburger").css("margin-right",t)}else i(".navbar-dotcom .navbar-nav .hamburger").css("margin-right","")};i(t).ready(function(){const t=i(".navbar-dotcom");let e=n.innerWidth;t.find(".dropdown-large.dropdown-named-items > .dropdown-menu").on("click touchstart",function(n){n.stopPropagation()});t.find(".dropdown.search > .dropdown-toggle").on("hide.bs.dropdown",function(){i(this).focus()});const s=t.find(".nav :not(.hamburger, .search).dropdown-named-items");o(s);const h=t.find(".nav :not(.hamburger, .search).dropdown-named-items > .dropdown-toggle");l(h,t);t.find(".mobile-nav-container .bottom-divider").on("click touchstart",function(n){n.stopPropagation()});a(t);t.find("[data-toggle=offcanvas]").on("click",function(t){n.innerWidth<r&&(i(t.target).hasClass("offcanvas")||i(t.target).hasClass("offcanvas-link")||i(t.target).parent().parent().hasClass("offcanvas-dropdown")||i(t.target).parent().hasClass("offcanvas-link"))&&(t.stopPropagation(),t.preventDefault(),i(this).find(".sidebar-offcanvas .sub-menu").css("min-height",i(".mobile-nav-container").height()+"px"),i(this).find(".row-offcanvas").toggleClass("active").animate({right:"100%"},100))});t.find("[data-toggle=offcanvas-hide]").on("click",function(t){if(n.innerWidth<r){t.stopPropagation();t.preventDefault();const n=i(this).closest(".row-offcanvas");n.animate({right:"-15px"},100,function(){setTimeout(function(){n.toggleClass("active")},250)})}});f();i(n).resize(function(){n.innerWidth>e&&n.innerWidth>=r?u(t.find(".hamburger-mobile >  .dropdown-toggle.show, .search-mobile >  .dropdown-toggle.show")):n.innerWidth<e&&n.innerWidth<r&&u(t.find(".dropdown-named-items > .dropdown-toggle.show, .dropdown-large.search > .dropdown-toggle.show"));e=n.innerWidth;f()})})})(window,document,jQuery)