$(document).ready(function() {
	
	$("input#subject, input#uname, input#email, input#company, input#phone, input#theurl, input#website, input#recaptcha_response_field").focus(function(){
			$(this).css('background-position', '0 0');
	});	
	$("input#subject").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 0');
		} else {
			$(this).css('background-position', '10px -64px');
		}
	});
	$("textarea#message").focus(function(){
			$(this).css('background-position', '0 -10000px');
	});	
	$("textarea#message").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 -10000px');
		} else {
			$(this).css('background-position', '10px -352px');
		}
	});	
	$("input#recaptcha_response_field").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 -10000px');
		} else {
			$(this).css('background-position', '10px -320px');
		}
	});	
	$("input#uname").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 0');
		} else {
			$(this).css('background-position', '10px -96px');
		}
	});
	$("input#email").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 0');
		} else {
			$(this).css('background-position', '10px -127px');
		}
	});
	$("input#company").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 0');
		} else {
			$(this).css('background-position', '10px -159px');
		}
	});
	$("input#phone").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 0');
		} else {
			$(this).css('background-position', '10px -194px');
		}
	});
	$("input#theurl").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 0');
		} else {
			$(this).css('background-position', '10px -226px');
		}
		if ($(this).val() == 'http://') {
			$(this).attr('value','');
		}
	}).focus(function(){
		if ($(this).val() == '') {
			$(this).attr('value','http://');
		}
	});
	$("input#website").blur(function(){
		if ($(this).val() != '') {
			$(this).css('background-position', '0 0');
		} else {
			$(this).css('background-position', '10px -255px');
		}
		if ($(this).val() == 'http://') {
			$(this).attr('value','');
		}
	}).focus(function(){
		if ($(this).val() == '') {
			$(this).attr('value','http://');
		}
	});
	
});