var OldBrowserNotifier = new Class({ Implements : [Options,Events], containerHTML : "
", options :{ img_folder : './images/', text : '', url : '#', show : false }, initialize : function(options){ this.setOptions(options); this.show(); //if (this.options.show) this.show(); }, toElement : function(){ return this.container; }, show : function(){ this.container = new Element('a',{id:'activebar-container', href:this.options.url}).set('html',this.containerHTML); var p=new Element('p'); p.set('html',this.options.text); p.inject(this.container); var icon = this.container.getElements('.icon'), close = this.container.getElements('.close'), container = this.container, url = this.options.url, self = this; icon.setStyle('background-image','url('+this.options.img_folder+'sprites.png)'); close.setStyle('background-image','url('+this.options.img_folder+'sprites.png)'); close.addEvent('click',function(e){ self.hide(); e.stop(); }); this.container.inject(document.body); this.container.tween('height',($(document.body).getSize().y/4).toInt()); this.fireEvent('open',this.toElement()); }, hide : function(){ this.container.dispose(); this.fireEvent('close',this.toElement()); } });