/**
* Lightbox
*
* This libary is used to create a lightbox in a web application.  This library
* requires the Prototype 1.6 library and Script.aculo.us core, effects, and dragdrop
* libraries.  To use, add a div containing the content to be displayed anywhere on 
* the page.  To create the lightbox, add the following code:
*
*	var test;
*	
*	Event.observe(window, 'load', function () {
*		test = new Lightbox('idOfMyDiv');
*	});
*	
*	Event.observe('lightboxLink', 'click', function () {
*		test.open();
*	});
*
*	Event.observe('closeLink', 'click', function () {
*		test.close();
*	});
*     
*/

var state = 0;

var Lightbox = Class.create({
			
	open_surfride : function () {
		
		
			this._fade('open', 'surfride');
		
	},
	
	close_surfride : function () {
			
		
			
			this._fade('close', 'surfride');
		
		
	},
	open_sculpt : function () {
		
		
			this._fade('open', "sculpt");
		
	},
	
	close_sculpt : function () {
			
		
			
			this._fade('close',"sculpt");
		
		
	},
	
	_fade : function fadeBg(userAction,whichDiv){
		
		var d = document.getElementById(whichDiv);
		if(userAction=='close'){
			
			
			
			
			d.style.visibility = "hidden";
			d.style.block ="none";
			
			
		}else{
			d.style.block ="display";
			d.style.visibility = "visible";
			
		}
	},
	
	_makeVisible : function makeVisible(mydiv){
		mydiv.style.visibility="visible";
	},

	_makeInvisible : function makeInvisible(mydiv) {
		mydiv.style.visibility="hidden";
	},

	_showLayer : function showLayer(userAction){
		$(userAction).style.display="block";
	},
	
	_hideLayer : function hideLayer(userAction){
		$(userAction).style.display="none";
	},
	
	
	
	initialize : function() {
	   
		
	}
});

