

window.addEvent('domready',function(){


var Overlay = new Element('div', { id: 'LightsOffOverlay', class:'LightsOutOverlay'});
	Overlay.inject($(document.body), 'top');
	Overlay.setStyle('opacity',0);
	Overlay.setStyle('height',window.getScrollSize().y);
	var Switch = new Element('a', { id: 'LightSwitch'});
	
	Switch.inject($('Caption'), 'top');
	Switch.set('text','Turn Off Lights');
	Switch.set('href','javascript:void(0);');
	Switch.setStyle('display','block');
	Switch.setStyle('z-index','1000');
	Switch.addEvent('click',function(){
		if(this.get('text')=="Turn Off Lights"){
			Overlay.setStyle('display','block');
			new Fx.Style(Overlay, 'opacity', {duration: 1000}).addEvent('onComplete',function(){}).start(.9)
			this.set('text','Turn On Lights');
			new Fx.Style($('FeatureGallery'), 'border-color', {duration: 1000}).addEvent('onComplete',function(){}).start('#FFF');
		}else{
			new Fx.Style(Overlay, 'opacity', {duration: 1000}).addEvent('onComplete',function(){
				Overlay.setStyle('display','none');
			}).start(0)
			this.set('text','Turn Off Lights');
			new Fx.Style($('FeatureGallery'), 'border-color', {duration: 1000}).addEvent('onComplete',function(){}).start('#000');
		}
	});

		
	
});



