function NavigationExpander(element){this.element=element;this.attachEvent();this.expandedImage="expandedArrowPurple";this.collapsedImage="collapsedArrowPurple";this.selectedExpandedImage="expandedArrowWhite";this.selectedCollapsedImage="collapsedArrowWhite";}NavigationExpander.prototype.attachEvent=function(){var arrowsItems=Elements.getElementsByClassName(this.element,"arrow");var self=this;for(var i=0;i<arrowsItems.length;i++){var item=arrowsItems[i];item=Elements.fix(item);this.element.onclick=function(e){self.switchit(e);};}};NavigationExpander.prototype.switchit=function(event){var arrowDOMElement=(new BrowserEvent(event)).htmlTarget();var nestedListDOMElement=Elements.getElementById(arrowDOMElement.id.replace("arrow","nested-list"));this.toggleVisibility(nestedListDOMElement);this.toggleArrow(arrowDOMElement);};NavigationExpander.prototype.setTooltip=function(element,tooltip){element.setAttribute("alt",tooltip);element.setAttribute("title",tooltip);};NavigationExpander.prototype.toggleVisibility=function(element){var className=new ClassName(element);if(className.contains("hide")){className.removeClass("hide");return ;}className.addClass("hide");};NavigationExpander.prototype.toggleArrow=function(element){var className=new ClassName(element);if(className.contains(this.selectedExpandedImage)){className.removeClass(this.selectedExpandedImage);className.addClass(this.selectedCollapsedImage);this.setTooltip(element,"Expand");return ;}else{if(className.contains(this.selectedCollapsedImage)){className.removeClass(this.selectedCollapsedImage);className.addClass(this.selectedExpandedImage);this.setTooltip(element,"Collapse");return ;}}if(className.contains(this.expandedImage)){className.removeClass(this.expandedImage);className.addClass(this.collapsedImage);this.setTooltip(element,"Expand");return ;}else{if(className.contains(this.collapsedImage)){className.removeClass(this.collapsedImage);className.addClass(this.expandedImage);this.setTooltip(element,"Collapse");return ;}}};