$(document).ready(function() {
	
	$('.username-label, .email-label, .subject-label, .message-label').animate({ opacity: "0.9" })
		.click(function() {
			var thisFor	= $(this).attr('for');
			$('.'+thisFor).focus();
	});

	$('.name').focus(function() {
	
		$('.username-label').animate({ opacity: "0" }, "fast");
	
			if($(this).val() == "name")
				$(this).val() == "";

		}).blur(function() {
	
			if($(this).val() == "") {
				$(this).val() == "name";
				$('.username-label').animate({ opacity: "0.9" }, "fast");
			}
		});

	$('.email').focus(function() {
	
		$('.email-label').animate({ opacity: "0" }, "fast");
	
			if($(this).val() == "email") {
				$(this).val() == "";
			}
		}).blur(function() {
	
			if($(this).val() == "") {
				$(this).val() == "email";
				$('.email-label').animate({ opacity: "0.9" }, "fast");
			}
	});
	
	
	$('.subject').focus(function() {
	
		$('.subject-label').animate({ opacity: "0" }, "fast");
	
			if($(this).val() == "subject") {
				$(this).val() == "";
			}
		}).blur(function() {
	
			if($(this).val() == "") {
				$(this).val() == "subject";
				$('.subject-label').animate({ opacity: "0.9" }, "fast");
			}
	});
	
	
	$('.message').focus(function() {
	
		$('.message-label').animate({ opacity: "0" }, "fast");
	
			if($(this).val() == "message") {
				$(this).val() == "";
			}
		}).blur(function() {
	
			if($(this).val() == "") {
				$(this).val() == "message";
				$('.message-label').animate({ opacity: "0.9" }, "fast");
			}
	});
});
