var SITE={start:function(){SITE.appendHighslide();SITE.zebraTables()},appendMenu:function(){var a=$splat($$("#MainMenu ul>li"));a.each(function(c,b){c.addEvents({mouseover:function(d){this.addClass("iehover")},mouseout:function(d){this.removeClass("iehover")},focus:function(d){this.fireEvent("mouseover")},blur:function(d){this.fireEvent("mouseout")}})})},appendQuickstart:function(){if($("sel_quicklink")){$("sel_quicklink").addEvent("change",function(){var a=this.options[this.selectedIndex].value;if(["-1","0"].contains(a)){this.selectedIndex=0}else{document.location.href=this.options[this.selectedIndex].value}})}},appendTooltips:function(){var a={offsets:{x:14,y:6},onShow:function(b){b.setStyle("opacity",0.9)},onHide:function(b){b.setStyle("opacity",0)}};SITE.tooltipsEnabled=new Tips([],$merge(a,{className:"tooltipsEnabled"}));SITE.tooltipsDisabled=new Tips([],$merge(a,{className:"tooltipsDisabled"}));$$(".tooltip").filter(function(b){return(b.get("title").clean()!="")}).each(function(e){var d="",b="",c=e.get("title").split("::").clean();if(c.count()>1){d=c[0].clean();b=c[1].clean()}else{b=c[0].clean()}e.store("tip:title",d);e.store("tip:text",b);if(e.getProperty("disabled")||e.hasClass("disabled")){SITE.tooltipsDisabled.attach(e)}else{SITE.tooltipsEnabled.attach(e)}})},appendFormElements:function(){$$("button, input, textarea, select").each(function(b){var f,c,a=b.get("tag"),e=b.get("type");var d=false;if(["textarea","select"].contains(a)){if(a=="select"){f="frm_hovered"}else{f="input_textarea_over"}}else{if(["text","password"].contains(e)){d=true;f="frm_hovered";c="frm_focused"}else{if(["button","submit","reset"].contains(e)){d=true;f="frm_hovered";c="frm_focused"}}}b.addEvents({mouseenter:function(g){if(!this.focused){this.addClass(f)}},mouseleave:function(g){this.focused=false;this.removeClass(f)}});if(d){b.addEvents({focus:function(g){if(!this.hasClass(f)){this.addClass(c);this.focused=true}},blur:function(g){this.removeClass(c);this.focused=false}})}})},appendHighslide:function(){hs.graphicsDir="resources/themes/standard/highslide/";hs.showCredits=false;hs.outlineType=null;hs.loadingOpacity=0.75;hs.align="center";hs.transitions=["expand","crossfade"];hs.wrapperClassName="dark borderless floating-caption";hs.fadeInOut=true;hs.dimmingOpacity=0.75;if(hs.addSlideshow){hs.addSlideshow({interval:5000,repeat:false,useControls:true,fixedControls:"fit",overlayOptions:{opacity:0.6,position:"bottom center",hideOnMouseOut:true}})}if($$("span.iBlock").length>0){$$("span.iBlock").each(function(a){if(a.getElement(".iBlock_Thumb a")){a.addEvents({mouseenter:function(b){if(!this.hasClass("iBlock_over")){this.addClass("iBlock_over")}},mouseleave:function(b){this.removeClass("iBlock_over")},focus:function(b){if(!this.hasClass("iBlock_over")){this.addClass("iBlock_over")}},blur:function(b){this.removeClass("iBlock_over")}})}})}},appendFLV:function(){var b=new SWFObject("resources/mplayer.swf","ply","400","200","9","#ffffff");var a="file=video/animation.flv&type=video&bufferlength=3&controlbar=over&volume=50";b.addParam("allowfullscreen","true");b.addParam("allowscriptaccess","always");b.addParam("flashvars",a);b.write("video_container")},imageAutoMover:function(c,b,a){if(c.length>0){c.each(function(d){var d=$(d);if($chk(d.src)){if(d.src.indexOf(a)>0){d.addEvent("mouseenter",function(){d.src=d.src.replace(a,b)}).addEvent("mouseleave",function(){d.src=d.src.replace(b,a)})}}})}},zebraTables:function(b){var a=$merge({classOdd:"bg-light",classEven:"bg-lighter"},b||{});$$("table").each(function(d){if(d.hasClass("tbl-zebra")){var c=true;d.getElements("tbody tr").each(function(e){e.addClass(((c)?a.classOdd:a.classEven));c=!c})}})},openWindow:function(a,h,e,d,b,c){if(window.screen){if(c){var i=(screen.width-d)/2;var f=(screen.height-b)/2;e+=(e!="")?",":"";e+=",left="+i+",top="+f}}var g=window.open(a,h,e+((e!="")?",":"")+"width="+d+",height="+b);g.focus()}};window.addEvent("domready",SITE.start);
