jQuery(document).ready(function(a){var e,n,t,o;function i(){910<=window.innerWidth?(a(document.body).on("touchstart.educationHub",function(e){a(e.target).closest(".main-navigation li").length||a(".main-navigation li").removeClass("focus")}),e.find(".menu-item-has-children > a, .page_item_has_children > a").on("touchstart.educationHub",function(e){var n=a(this).parent("li");n.hasClass("focus")||(e.preventDefault(),n.toggleClass("focus"),n.siblings(".focus").removeClass("focus"))})):e.find(".menu-item-has-children > a, .page_item_has_children > a").unbind("touchstart.educationHub")}n=a(".main-navigation"),t=a("<button />",{class:"dropdown-toggle","aria-expanded":!1}).append(a("<span />",{class:"screen-reader-text",text:EducationHubScreenReaderText.expand.expand})),n.find(".menu-item-has-children > a, .page_item_has_children > a").after(t),n.find(".current-menu-ancestor > button").addClass("toggled-on"),n.find(".current-menu-ancestor > .sub-menu").addClass("toggled-on"),n.find(".menu-item-has-children, .page_item_has_children").attr("aria-haspopup","true"),n.find(".dropdown-toggle").on("click",function(e){var n=a(this),t=n.find(".screen-reader-text");e.preventDefault(),n.toggleClass("toggled-on"),n.attr("aria-expanded","false"===n.attr("aria-expanded")?"true":"false"),t.text(t.text()===EducationHubScreenReaderText.expand.expand?EducationHubScreenReaderText.expand.collapse:EducationHubScreenReaderText.expand.expand)}),t=a("#main-nav"),n=t.find(".menu-toggle"),e=t.find("#site-navigation"),quickLinks=a(".quick-links"),o=0,n.length&&(n.on("click.educationHub",function(){a(this).add(e).attr("aria-expanded","false"===a(this).add(e).attr("aria-expanded")?"true":"false")}),n.add(e).attr("aria-expanded","false"),n.on("click.educationHub",function(){var e=a(this).parents(".wrap-menu-content"),e=(a(".menu-toggle").not(this).removeClass("selected"),a(".wrap-menu-content").not(e).removeClass("is-open"),a(this).toggleClass("selected"),a(e).toggleClass("is-open"),a(e).hasClass("is-open"));e&&!jQuery("body").hasClass("menu-open")?(0===o&&(o=a("body").scrollTop()),a("body").addClass("menu-open")):e||(a("body").removeClass("menu-open"),a("body").scrollTop(o),o=0),a(".wrap-menu-content").toggle("slow"),a("#site-navigation").toggleClass("toggled-on")}),a(document).on("click touchstart",function(){a("body").removeClass("menu-open"),a(".menu-toggle").removeClass("selected"),a(".wrap-menu-content").removeClass("is-open")}),a(".site-header-menu,.menu-toggle, .dropdown-toggle, .search-field, #site-navigation, #social-search-wrapper, #social-navigation .search-submit").on("click touchstart",function(e){e.stopPropagation()})),e.length&&e.children().length&&("ontouchstart"in window&&(a(window).on("resize.educationHub",i),i()),e.find("a").on("focus.educationHub blur.educationHub",function(){a(this).parents(".menu-item").toggleClass("focus")}),a(".main-navigation button.dropdown-toggle").on("click",function(){a(this).toggleClass("active"),a(this).parent().find(".children, .sub-menu").first().toggleClass("toggled-on")})),quickLinks.length&&quickLinks.children().length&&quickLinks.find("a").on("focus.educationHub blur.educationHub",function(){quickLinks.toggleClass("focus")}),a(document).ready(function(){a(document.body),a(window).on("load.educationsoul resize.educationsoul",function(){window.innerWidth<768&&a("#site-navigation .wrap-menu-content").on("focusout",function(){var e=a(this);setTimeout(function(){e.find(":focus").length||a("#site-navigation .menu-toggle").trigger("click")},0)})})})});