var dbug={logged:[],timers:{},firebug:false,enabled:false,log:function(){dbug.logged.push(arguments)},nolog:function(a){dbug.logged.push(arguments)},time:function(a){dbug.timers[a]=new Date().getTime()},timeEnd:function(b){if(dbug.timers[b]){var a=new Date().getTime()-dbug.timers[b];dbug.timers[b]=false;dbug.log("%s: %s",b,a)}else{dbug.log("no such timer: %s",b)}},enable:function(a){if(dbug.firebug){try{dbug.enabled=true;dbug.log=function(){(console.debug||console.log).apply(console,arguments)};dbug.time=function(){console.time.apply(console,arguments)};dbug.timeEnd=function(){console.timeEnd.apply(console,arguments)};if(!a){dbug.log("enabling dbug")}for(var b=0;b<dbug.logged.length;b++){dbug.log.apply(console,dbug.logged[b])}dbug.logged=[]}catch(c){dbug.enable.delay(400)}}},disable:function(){if(dbug.firebug){dbug.enabled=false}dbug.log=dbug.nolog;dbug.time=function(){};dbug.timeEnd=function(){}},cookie:function(d){var c=document.cookie.match("(?:^|;)\\s*jsdebug=([^;]*)");var b=c?unescape(c[1]):false;if((b!="true"||d)&&!d){dbug.enable();dbug.log("setting debugging cookie");var a=new Date();a.setTime(a.getTime()+(24*60*60*1000));document.cookie="jsdebug=true;expires="+a.toGMTString()+";path=/;"}else{dbug.disableCookie()}},disableCookie:function(){dbug.log("disabling debugging cookie");document.cookie="jsdebug=false;path=/;"}};(function(){var c=typeof console!="undefined";var b=["debug","info","warn","error","assert","dir","dirxml"];var a=["trace","group","groupEnd","profile","profileEnd","count"];function d(g,e){for(var f=0;f<g.length;f++){dbug[g[f]]=(c&&console[g[f]])?console[g[f]]:e}}d(b,dbug.log);d(a,function(){})})();if(typeof console!="undefined"&&console.warn){dbug.firebug=true;var value=document.cookie.match("(?:^|;)\\s*jsdebug=([^;]*)");var debugCookie=value?unescape(value[1]):false;if(window.location.href.indexOf("jsdebug=true")>0||debugCookie=="true"){dbug.enable()}if(debugCookie=="true"){dbug.log("debugging cookie enabled")}if(window.location.href.indexOf("jsdebugCookie=true")>0){dbug.cookie();if(!dbug.enabled){dbug.enable()}}if(window.location.href.indexOf("jsdebugCookie=false")>0){dbug.disableCookie()}}Element.implement({isVisible:function(){return this.getStyle("display")!="none"},toggle:function(){return this[this.isVisible()?"hide":"show"]()},hide:function(){var b;try{b=this.getStyle("display")}catch(a){}this.store("originalDisplay",b||"block");this.setStyle("display","none");return this},show:function(a){original=this.retrieve("originalDisplay")?this.retrieve("originalDisplay"):this.get("originalDisplay");this.setStyle("display",(a||original||"block"));return this},swapClass:function(a,b){return this.removeClass(a).addClass(b)},fxOpacityOk:function(){return !Browser.Engine.trident4}});Fx.Marquee=new Class({Extends:Fx.Morph,options:{mode:"horizontal",message:"",revert:true,delay:5000,cssClass:"msg",showEffect:{opacity:1},hideEffect:{opacity:0},revertEffect:{opacity:[0,1]},currentMessage:null},initialize:function(a,b){a=$(a);var c=this.options.currentMessage||(a.getChildren().length==1)?a.getFirst():"";var d=new Element("div",{styles:{position:"relative"},"class":"fxMarqueeWrapper"}).inject(a);this.parent(d,b);this.current=this.wrapMessage(c)},wrapMessage:function(a){if($(a)&&$(a).hasClass("fxMarquee")){var b=$(a)}else{var b=new Element("span",{"class":"fxMarquee",styles:{position:"relative"}});if($(a)){b.grab($(a))}else{if($type(a)=="string"){b.set("html",a)}}}return b.inject(this.element)},announce:function(a){this.setOptions(a).showMessage();return this},showMessage:function(a){(function(){var b=this.$chain?$A(this.$chain):[];this.clearChain();this.element=$(this.element);this.current=$(this.current);this.message=$(this.message);this.start(this.options.hideEffect).chain(function(){if(a){this.message.hide();if(this.current){this.current.show()}}else{if(this.message){this.message.dispose()}this.message=this.wrapMessage(this.options.message);if(this.current){this.current.hide()}}this.start((a)?this.options.revertEffect:this.options.showEffect).chain(function(){if(this.$chain){this.$chain.combine(b)}else{this.$chain=b}this.fireEvent((a)?"onRevert":"onMessage");if(!a&&this.options.revert){this.showMessage(true)}else{this.callChain.delay(this.options.delay,this)}}.bind(this))}.bind(this))}).delay((a)?this.options.delay:10,this);return this}});