window.addEvent('domready', function()
{	
    //clear textinputs when focus and empty layer with selects
    $$(".textinput.grey").each(function(textinput) 
	{
		textinput.title = textinput.getAttribute('title');
		textinput.addEvents
		({	
			'focus': function(){
                if(this.value == this.title){
                    this.value = '';
                    this.setStyle('color', '#bbbbbb');
                }
			},		
			'blur': function(){
				if(this.value == this.title || this.value == ''){
                    this.value = this.title;
				    this.setStyle('color', '#bbbbbb');
				} else this.setStyle('color', '#545454');
				
				/*this.addEvent('keydown', function(event){
                    this.setStyle('color', '#545454');
                });*/
			},
			
			'keydown': function(){
                this.setStyle('color', '#545454');
            }
		})	
	});	

});