com.csg.FlyOut=com.csg.Class.extend({rootNode:null,menuItems_:null,currentShown_:null,speed_:400,layer_:null,spot_:null,initialize:function(B){var C=this;C.rootNode=$(B);C.menuItems_=new Array();var A=0;C.rootNode.find("li").each(function(){var H,E=null;if(!$(this).hasClass("link-only")){H=$("body:first").find("div.menu-content").eq(A);if(H!=null){$(this).find("a:first").attr("href","javascript:void(0);");E=H.find("a.close:first")}A++}var D=new Array(4);var G=C.rootNode.height();if(!$(this).hasClass("link-only")){$(this).click(function(){C.handleLinkClick.apply(C,[this])})}if(E!=null){E.click(function(){C.handleCloseClick.call(C)})}if(H!=null){H.removeClass("visible")}D[0]=this;D[1]=H!=null?H.get(0):null;D[2]=E!=null?E.get(0):null;D[3]=$(this).find("span:first");$(D[0]).removeClass("active");C.menuItems_.push(D);if(!$(this).hasClass("last-item")){$(this).hover(function(){C.handleHover.apply(C,[this])},function(){C.handleUnhover.apply(C,[this])})}if($(this).hasClass("border-bottom")){$(this).hover(function(){$(this).removeClass("border-bottom")},function(){$(this).addClass("border-bottom")})}var I=0;if((C.rootNode.css("top").indexOf("px"))>0){I=com.csg.Page.calculateEm(parseFloat(C.rootNode.css("top")))}else{I=parseFloat(C.rootNode.css("top"))}if($.browser.mozilla&&$.browser.version.substr(0,3)=="1.8"){var J=0.9167}else{var J=2.0833}if($.browser.mozilla&&$.browser.version.substr(0,3)=="1.8"&&$("body").attr("id")==="klp2"){$(D[1]).css("top","16.8333em");if(($(D[1]).height())<(G-65)){var F=G-65;$(D[1]).height(com.csg.Page.calculateEm(F)+"em");$(D[1]).css("padding-bottom","1.0833em")}}else{$(D[1]).css("top",(I-J)+"em");if(($(D[1]).height()+30)<(G+25)){var F=G-5;$(D[1]).height(com.csg.Page.calculateEm(F)+"em");$(D[1]).css("padding-bottom","1.0833em")}}});C.layer_=$("div#overlay");if($.browser.msie&&$.browser.version<7){C.spot_=$("span#overlayspot_ie6")}else{C.spot_=$("div#overlayspotcontainer")}C.layer_.click(function(){C.handleCloseClick.call(C)});C.spot_.click(function(){C.handleCloseClick.call(C)});C.hideLayer(0)},handleHover:function(C){var B=this,A=B.findElemIndex(C);if(A<0||A>=B.menuItems_.length-1){return }B.menuItems_[A+1][3].addClass("no-border")},handleUnhover:function(B){var A=this;for(key in A.menuItems_){key=parseInt(key);if(key>0&&$(A.menuItems_[key-1][0]).hasClass("active")){}else{A.menuItems_[key][3].removeClass("no-border")}}},findElemIndex:function(C){var B=this,A=B.menuItems_.length-1;for(;A>=0;A--){if(B.menuItems_[A][0]===C){return A}}return -1},handleLinkClick:function(C){var B=this,A=B.findElemIndex(C);if(A<0){return }if(B.currentShown_!=null){if(B.currentShown_==A){return ;B.hideLayer();B.hideContent();return }B.hideContent(0);B.showContent(A)}else{B.showLayer();B.showContent(A)}},handleCloseClick:function(){var A=this;if(A.currentShown_==null){return }A.hideContent();A.hideLayer()},showContent:function(A,C){var B=this,D;if(A<0||B.currentShown_==A){return }C=C!=null?C:B.speed_;$(B.menuItems_[A][0]).addClass("active");$(B.menuItems_[A][1]).fadeIn(C);$(B.menuItems_[A][1]).addClass("visible");if($("html").attr("dir")==="rtl"){D="right";if($("html").width()<999){$(B.menuItems_[A][1]).css("right",com.csg.Page.calculateEm(498)+"em")}}else{D="left"}$(B.menuItems_[A][1]).find("a:first").focus().css({"background-position":""+D+" -2096px",color:"#094981",outline:"0"});B.currentShown_=A},hideContent:function(B){var A=this;if(A.currentShown_==null){return }B=B!=null?B:A.speed_;$(A.menuItems_[A.currentShown_][0]).removeClass("active");if(A.currentShown_<A.menuItems_.length-1){$(A.menuItems_[A.currentShown_+1][3]).removeClass("no-border")}B=0;if(B<1){$(A.menuItems_[A.currentShown_][1]).hide().removeClass("visible")}else{$(A.menuItems_[A.currentShown_][1]).fadeOut(B).removeClass("visible")}A.currentShown_=null},hideLayer:function(B){var A=this;if(A.layer_==null){return }B=B!=null?B:A.speed_;if(B<1){A.layer_.css("opacity","0.0").css("filter","alpha(opacity=0)").hide()}else{A.layer_.fadeOut(B)}A.spot_.hide()},showLayer:function(B){var A=this;if(A.layer_==null){return }if($.browser.msie&&$.browser.version<7){if($("body").get(0).offsetHeight>document.documentElement.clientHeight){$("div#overlay").height($("body").get(0).offsetHeight+"px")}else{$("div#overlay").height(document.documentElement.clientHeight+"px")}}B=B!=null?B:A.speed_;if(B<1){A.layer_.show();A.spot_.show()}else{A.layer_.css({opacity:"0.0",filter:"alpha(opacity=0)",display:"block"}).fadeTo(B,0.8);A.spot_.css({display:"block"}).fadeIn(B*5/3)}}});