$(document).ready(function() {
	$('input[@type=text], textarea').each(function() {
		if($(this).val() == "") {
			$(this).val($(this).attr('placeholder'));
		}
		$(this).css('color', '#808080');
	});
	
	$('input[@type=text], textarea').focus(function() {
		$(this).css('color', '#000000');
		if($(this).val() == $(this).attr('placeholder')) {
			$(this).val('');
		}
	});
	
	$('input[@type=text], textarea').blur(function() {
		$(this).css('color', '#808080');
		if($(this).val() == "") {
			$(this).val($(this).attr('placeholder'));
		}
	});
	
	$('#generalinfo').submit(function() {
		success = true;
		$('#generalinfo > input[@type=text], #generalinfo > textarea').each(function() {
			if($(this).val() == $(this).attr('placeholder')) {
				success = false;
				$(this).animate({backgroundColor:'#ffefd5'}, 1000).animate({backgroundColor:'white'}, 1000);
			}
		});
		
		if(!success) {
			alert('All fields are required to submit the contact form.  Please verify that you have specified your Name, E-mail Address, and your Questions/Comments.');
		}
		
		return success;
	});
});