var panelManagerRegistry=[];function PanelManager(){var A=this;this.panels=[];this.panelIndex={};this.currentPanelIdx=null;this.propsActive=null;this.propsInactive=null;this.propsHoverActive=null;this.propsHoverInactive=null;this.closeCurrent=false;this.setPanelCSS=function(E,B,C,D){this.propsActive=E;
this.propsActiveHover=B;this.propsInactive=C;this.propsInactiveHover=D};this.addPanel=function(F,D,E,C){var B={"title":F,"content":D,"obj":E,"func":C};if(this.panels.length==0){this.currentPanelIdx=0}this.panelIndex[D]=this.panels.length;this.panels.push(B)};this.setCloseCurrent=function(B){this.closeCurrent=B
};this.setDefault=function(C){var B=this.panelIndex[C];if(B===undefined){this.currentPanelIdx=-1}else{this.currentPanelIdx=B}};this.isCurrent=function(C){var B=this.panelIndex[C];return(B==this.currentPanelIdx)};this.showPanel=function(C){var B=this.panelIndex[C];if(this.currentPanelIdx!=B){jQuery("#"+C).slideDown("medium");
jQuery("#"+this.panels[B].title+"_title").css(this.propsActive);if(this.currentPanelIdx>=0){jQuery("#"+this.panels[this.currentPanelIdx].content).slideUp("medium");jQuery("#"+this.panels[this.currentPanelIdx].title).css(this.propsInactive)}this.currentPanelIdx=B;this.hoverPanel(C,true);if(this.panels[B].obj){this.panels[B].obj[this.panels[B].func]()
}}else{if(this.closeCurrent){if(this.currentPanelIdx>=0){jQuery("#"+this.panels[this.currentPanelIdx].content).slideUp("medium");jQuery("#"+this.panels[this.currentPanelIdx].title).css(this.propsInactive)}this.currentPanelIdx=-1;this.hoverPanel(C,false)}}};this.hoverPanel=function(C,D){var B=this.panelIndex[C];
if(this.currentPanelIdx!=B){if(D){jQuery("#"+this.panels[B].title).css(this.propsInactiveHover)}else{jQuery("#"+this.panels[B].title).css(this.propsInactive)}}else{if(D){jQuery("#"+this.panels[B].title).css(this.propsActiveHover)}else{jQuery("#"+this.panels[B].title).css(this.propsActive)}}};this.start=function(){for(var C=0;
C<this.panels.length;C++){var B=this.panels[C].content;jQuery("#"+this.panels[C].title).click(generateObjMethodRef(this,"showPanel",[B]));jQuery("#"+this.panels[C].title).hover(generateObjMethodRef(this,"hoverPanel",[B,true]),generateObjMethodRef(this,"hoverPanel",[B,false]))}}};