var GrayHintClass = new Class({
	initialize: function(options) {
		options = $merge({
			'hint':''			
			}, options);
		this.hint = options.hint;
		this.input=options.input;
		this.inputStyle = "bigbox tooltip";
		this.inputStyleGrey = "bigBoxGrey";
		this.inputStyleBlack = "bigbox";		
		window.addEvent('load', this.init.bind(this));
	},
	
	init: function(){
		if($(this.input)){
			$(this.input).addEvents({
				'focus': this.hideHint.bind(this),
				'blur': this.showHint.bind(this)});
			$(this.input).grayHint = this;
			this.showHint();
		}
	},
	showHint: function(){
		if (this.hint=='') return;
		var input =  $(this.input);
		if (input.value == ''){
			input.value = this.hint;
			input.removeClass(this.inputStyleBlack);
			input.addClass(this.inputStyleGrey);
		}
	},
	
	hideHint: function(){
		if (this.hint=='') return;
		var input =  $(this.input);
		if (input.value == this.hint){
			input.value = '';
			input.removeClass(this.inputStyleGrey);
			input.addClass(this.inputStyleBlack);
		}
	}
	
});

