var DyTeRe=new Class({Implements:[Options,Events],options:{fSize:20,fColor:null,useWordwrap:true,onReplaced:$empty(),onReplacementComplete:$empty()},initialize:function(c,a,b){this.setOptions(b);if(!$chk(a)||!$chk(c)){return}this.requestFile=a;this.elements=($type(c)=="string")?$$(c):c;this.elementToReplace=null;if(this.elements.length>0){this.elements.each(function(e){var f=this.getText(e);if(f){var d=this.getColor(e);this.elementToReplace=e;this.elementToReplace.empty();e.empty();f.each(function(h,g){if(g>0){h=" "+h}this.buildImage(escape(h),d)}.bind(this))}}.bind(this))}},buildImage:function(e,c){var b=this;var d=((this.requestFile.contains("?"))?"&":"?")+"text="+e+"&fsize="+this.options.fSize+"&fcolor="+c;var a=new Asset.image(this.requestFile+d,{id:"myImage",alt:unescape(e).clean(),onload:function(){b.fireEvent("onReplaced",this)}}).inject(this.elementToReplace)},getText:function(a){var b=($chk(a.get("text")))?a.get("text"):null;if(b){if(this.options.useWordwrap){b=b.split(" ")}else{b=$splat(b)}}return b},getColor:function(a){return(!$defined(this.options.fColor))?a.getStyle("color").replace(/#/,""):this.options.fColor.replace(/#/,"")}});var SITE={start:function(){SITE.appendMainMenu();if(!(Browser.Engine.trident&&Browser.Engine.version<=4)){var a=new DyTeRe("#MainMenu > ul > li > a, #content h1","resources/dytere/dytere.php",{fSize:19,onReplaced:function(b){}});var a=new DyTeRe("#MainMenu ul ul li a, #ServiceMenu ul li a, #ServiceMenuSmall ul li a, #ly_foot h2","resources/dytere/dytere.php",{fSize:16,onReplaced:function(b){}})}SITE.appendGofR();SITE.appendTooltips2()},appendMainMenu: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")}})})},appendGofR:function(){if($defined($("gallery_of_references"))){var c=$("gallery_of_references");var a=c.getElements(".gofr-item");var d=c.getElement(".gofr-buttons").getElements("span");var b=new SimpleCarousel(c,a,d,{slideInterval:5000,rotateAction:"click",buttonOnClass:"current",buttonOffClass:"",onShowSlide:function(e){c.morph({height:a[e].getSize().y})}});new Element("div",{"class":"gofr-overlay",html:"&nbsp;",events:{click:function(){this.pause=!this.pause;if(this.pause){this.addClass("gofr-overlay_pause");b.stop()}else{this.removeClass("gofr-overlay_pause");b.rotate();b.autoplay()}},mouseenter:function(){this.morph({opacity:0.7})},mouseleave:function(){if(!this.pause){this.morph({opacity:0.2})}}}}).inject(c).setOpacity(0.2)}},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.length>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)}})},appendTooltips2:function(){var a={offsets:{x:14,y:6},onShow:function(b){b.setStyle("opacity",0.8)},onHide:function(b){b.setStyle("opacity",0)}};SITE.tooltipsEnabled2=new Tips([],$merge(a,{className:"tooltipsEnabled2"}));SITE.tooltipsDisabled2=new Tips([],$merge(a,{className:"tooltipsDisabled2"}));$$(".tooltip2").filter(function(b){return(b.get("title").clean()!="")}).each(function(e){var d="",b="",c=e.get("title").split("::").clean();if(c.length>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.tooltipsDisabled2.attach(e)}else{SITE.tooltipsEnabled2.attach(e)}})}};window.addEvent("domready",SITE.start);