function setExpandStatus(e){var t=jQuery(e),n=jQuery(t).parent(),i=jQuery(n).hasClass("open"),s=t.find("span.hidden-for-sighted"),o=i?I18n.t("js.label_menu_collapse"):I18n.t("js.label_menu_expand");t.attr("title",o),s.text(o)}function initMainMenuExpandStatus(){jQuery("#main-menu .toggler").each(function(){var e=jQuery(this),t=e.closest("li").find("a.selected");1==t.length?e.trigger("click"):setExpandStatus(e)})}jQuery(document).ready(function(e){e("#main-menu .toggler").remove();var t=e('<a class="toggler"><span class="icon6 icon-toggler icon-arrow-right5-2"/><span class="hidden-for-sighted"></span></a>').click(function(){var t=e(this);if(t.hasClass("toggler")){var n=t.parent(),i=n.toggleClass("open").parent().find("ul").not("ul ul ul");i.mySlide(),n.hasClass("open")?(i.show(),i.find("li > a:first").focus()):i.hide(),setExpandStatus(t)}return!1});e("#main-menu li > a").not("ul ul a").wrap('<div class="main-item-wrapper"/>'),e("#main-menu li:has(ul) .main-item-wrapper > a").not("ul ul a").unbind("click").wrapInner('<span class="ellipsis"/>').after(t);var n;n="undefined"!=typeof window.sessionStorage?function(e){return"undefined"==typeof e?sessionStorage.getItem("openproject:navigation-toggle"):sessionStorage.setItem("openproject:navigation-toggle",e.length>0?"collapsed":"expanded")}:function(){return!1};var i=function(){e("#wrapper").toggleClass("hidden-navigation"),e("#content, #breadcrumb").toggleClass("hidden-navigation"),e("#toggle-project-menu").removeAttr("style").toggleClass("show"),n(e("#toggle-project-menu.show"))};jQuery("#toggle-project-menu .navigation-toggler").click(i),e("#main-menu").length>0&&"collapsed"===n()&&i()});