$(function () {
	
	//background color on hover
	$("input").hover(function() {
		$(this).animate({ backgroundColor: "#e9f5ff" }, 250);},
		
		function() {
			$(this).animate({ backgroundColor: "#ffffff" }, 250);
		});
	
	
	//password box
		if ($("input.password").attr("value")==""){
			$("input.password").css("background","#fff url(/assets/images/password.gif) 4px 2px no-repeat");
				$("input.password").focus(function() {
					$(this).attr("style",null)
					.blur(function(){
					if ($("input.password").attr("value")==""){
						$(this).css("background","#fff url(/assets/images/password.gif) 4px 2px no-repeat")
					}
				});
		});
	}
	
	//empty input and replace if nothing entered
	$("input").focus(function() {
		val = $(this).attr("value");
		
		$(this).attr("value","")
			   .blur(function(){
								 
			if ($(this).attr("value")==""){
				$(this).attr("value",val);
			}
		});
	});
});