jQuery.fn.prompt = function(text, color){
	
	if(!color) color = "#999";
	
	var originalColor = this.css("color");
	
	this.css("color", color);
	this.val(text);
	
	this.focus(function(){
		if($(this).val() == text){
			$(this).css("color", originalColor);
			$(this).val("");
		}
	});
	
	this.blur(function(){
		if($(this).val() == ""){
			$(this).css("color", color);
			$(this).val(text);
		}
	});
	
	this.attr("prompt", text);
	
	return this;
}