//set $().date("enter",true) when shadow is dissable
(function($) {
	$.fn.formshadow = function(options){
		var options = $.extend({
			defaultColor : "#333333",
			defaultBorder : "",
			hColor : "#c7d5dd",
			hBorder : "2px solid #9ca5ae"
		}, options);
		
		return this.each(function() {
			$(this).click(function()
			{
				if(!$(this).data("enter"))
				{
					if($.browser.msie)
					{
						var r = this.createTextRange();
						r.collapse(true);
						r.select();
					}
					else
					{
						this.selectionStart = 0;
						this.selectionEnd = 0;
					}
					$(this)
						.css("color",options.hColor)
						.css("border",options.hBorder);
				}
			}).blur(function()
			{
				if(!$(this).data("enter"))
				{
					$(this)
						.css("color",options.defaultColor)
						.css("border",options.defaultBorder);
				}
			}).keydown(function()
			{	
				if(!$(this).data("enter"))
				{
					$(this).data("enter",true).val("");
				}
				$(this)
					.css("color",options.defaultColor)
					.css("border",options.defaultBorder);
			});
		});
	};
})(jQuery)

