var OverLabel = 
{
	init:function()
	{
		$$('label.overlabel').each(function(o,i)
		{
			var f = o.next('input');
			o.className = 'overlabel-apply';
			if(f.value != '') o.style.textIndent = '-10000px';
			f.onfocus = function(){$(this).previous('label').style.textIndent = '-10000px';};
			f.onblur = function() { if(this.value == '') $(this).previous('label').style.textIndent = '0px';};
			// safari only
			o.onclick = function () {$(this).next('input').focus();};
      	});
      	
      	$$('label.pretty').each(function(o,i)
		{
			var f = o.next('div').down('input');
			
			o.className = 'pretty-apply';
			if(f.value != '') o.style.textIndent = '-10000px';
			f.onfocus = function(){$(this).up('div').previous('label').style.textIndent = '-10000px';};
			f.onblur = function() { if(this.value == '') $(this).up('div').previous('label').style.textIndent = '0px';};
			// safari only
			o.onclick = function () {$(this).next('div').down('input').focus();};
      	});
      	
	}
};
Event.onReady(OverLabel.init);