var Overlay = new Class({	
	
	initialize: function(e)
	{
		this.setElement(e);
		this.layer = this.e.getElement('.layer');
		this.text = this.e.getElement('.text');
		this.text.setStyle('display', 'none');
		this.layer.setStyle('display', 'none');
		this.layer.setStyle('opacity', .7);
		
	},
	
	setElement: function(element)
	{
		this.e = element;
		this.setEvents();
	},
	
	setController: function(controller, event)
	{
		this.c = controller;
		this.event = event;
	},
	
	setEvents: function()
	{
		this.e.addEvents
		({
			'mouseover': this.doMouseover.bind(this),
			'mouseout': this.doMouseout.bind(this),
			//'click': this.doClick.bind(this)//,
			//'mousemove': this.doMouseover.bind(this)
		});
		
		this.e.onclick = function()
		{
			return false;
		};	
		
		this.e.onmouseover = function()
		{
			return false;
		};
		
		this.e.onmouseout = function()
		{
			return false;
		};
	},
	
	doMouseover: function()
	{
		this.e.style.cursor = 'pointer';
		this.text.setStyle('display', 'block');
		this.layer.setStyle('display', 'block');
	},
	
	doMouseout: function()
	{
		this.e.style.cursor = 'default';
		this.text.setStyle('display', 'none');
		this.layer.setStyle('display', 'none');
	},
	
	doClick: function()
	{
		alert('hi');
	}
});