/** textInInput class is for input boxes that contain greyed text until user starts typing.
	class is called by default.
	
	Just create this class with the following variables to activate
	
	input: input DOM object
	text: string to display
	grey: grey color
	defaultCol: default color
	*/
function textInInput(input, text, grey, resetOnBlur) {
	
	//if($(input).val()!="") { //If a value is loaded onload, overwrite doesn't happen.
		//text = $(input).val();
	//}
	var defaultCol = $(input).css("color");
	this.text = text;
	
	$(input).css("color",grey);
	$(input).val(text);
	
	// bind events
	
	$(input).click(function() {
		$(input).css("color",defaultCol);
		$(input).val("");	
	});
	
	$(input).blur(function() {
		if(resetOnBlur) {
			$(input).css("color",grey);
			$(input).val(text);
		}
	});
	
	this.getText = function() {
		return this.text;
	}
	
}
