!function(r){function e(e,n){var a,t,o=r(e),i=r(n);i.length&&o.length&&(a=r("",{class:"dropdown-toggle","aria-expanded":!1}).append(napoliScreenReaderText.icon).append(r("",{class:"screen-reader-text",text:napoliScreenReaderText.expand})),i.find(".menu-item-has-children > a, .page_item_has_children > a").after(a),i.find(".current-menu-ancestor > button").addClass("toggled-on").attr("aria-expanded","true").find(".screen-reader-text").text(napoliScreenReaderText.collapse),i.find(".current-menu-ancestor > .sub-menu").addClass("toggled-on"),i.find(".dropdown-toggle").click(function(e){var n=r(this),a=n.find(".screen-reader-text");e.preventDefault(),n.toggleClass("toggled-on"),n.next(".children, .sub-menu").toggleClass("toggled-on"),n.attr("aria-expanded","false"===n.attr("aria-expanded")?"true":"false"),a.text(a.text()===napoliScreenReaderText.expand?napoliScreenReaderText.collapse:napoliScreenReaderText.expand)}),(t=i.children("ul.menu")).length&&t.children().length&&("ontouchstart"in window&&(r(window).on("resize.napoli_",l),l()),t.find("a").on("focus.napoli_ blur.napoli_",function(){r(this).parents(".menu-item, .page_item").toggleClass("focus")})));function l(){"none"===r(".menu-toggle").css("display")?(r(document.body).on("touchstart.napoli_",function(e){r(e.target).closest(n+" li").length||r(n+" li").removeClass("focus")}),t.find(".menu-item-has-children > a, .page_item_has_children > a").on("touchstart.napoli_",function(e){var n=r(this).parent("li");n.hasClass("focus")||(e.preventDefault(),n.toggleClass("focus"),n.siblings(".focus").removeClass("focus"))})):t.find(".menu-item-has-children > a, .page_item_has_children > a").unbind("touchstart.napoli_")}}var n;e(".primary-navigation",".main-navigation"),e(".secondary-navigation",".header-navigation"),(n=r(".mobile-menu-toggle")).length&&(n.attr("aria-expanded","false"),n.on("click.napoli_",function(){r(".primary-navigation").toggleClass("toggled-on"),r(".secondary-navigation").toggleClass("toggled-on"),r(this).attr("aria-expanded",r(".primary-navigation").hasClass("toggled-on"))}))}(jQuery);