$(document).ready(function()
{
	//Red spice society login fields
	var $RSfirstName = $('#RS_input_firstname').addClass('overLabel');
	var $RSlastName = $('#RS_input_lastname').addClass('overLabel');
	var $RSemail = $('#RS_input_email').addClass('overLabel');
	var $RSphone = $('#RS_input_phone').addClass('overLabel');
	var $RSmessage = $('#RS_input_message').addClass('overLabel');
	var $RScaptcha = $('#RS_input_captcha').addClass('overLabel');
	
	//Create username/password variables
	var $RSfirstNameInput = $RSfirstName.find('input');
	var $RSfirstNameLabel = $RSfirstName.find('label');
	var $RSlastNameInput = $RSlastName.find('input');
	var $RSlastNameLabel = $RSlastName.find('label');
	var $RSemailInput = $RSemail.find('input');
	var $RSemailLabel = $RSemail.find('label');
	var $RSphoneInput = $RSphone.find('input');
	var $RSphoneLabel = $RSphone.find('label');
	var $RSmessageInput = $RSmessage.find('textarea');
	var $RSmessageLabel = $RSmessage.find('label');
	var $RScaptchaInput = $RScaptcha.find('input');
	var $RScaptchaLabel = $RScaptcha.find('label');
	if ($RSfirstNameInput.val()) {
		$RSfirstNameLabel.hide();
	}
	if ($RSlastNameInput.val()) {
		$RSlastNameLabel.hide();
	}
	if ($RSemailInput.val()) {
		$RSemailLabel.hide();
	}
	if ($RSphoneInput.val()) {
		$RSphoneLabel.hide();
	}
	if ($RSmessageInput.val()) {
		$RSmessageLabel.hide();
	}
	if ($RScaptchaInput.val()) {
		$RScaptchaLabel.hide();
	}
	//show/hide first name
	$RSfirstNameInput
	.focus(function() {
		$RSfirstNameLabel.hide();
		})
	.blur(function() {
		if (this.value == '') {
			$RSfirstNameLabel.show();
		}
	});
	//show/hide last name
	$RSlastNameInput
	.focus(function() {
		$RSlastNameLabel.hide();
	})
	.blur(function() {
		if (this.value == '') {
			$RSlastNameLabel.show();
		}
	});
	//show/hide email
	$RSemailInput
	.focus(function() {
		$RSemailLabel.hide();
	})
	.blur(function() {
		if (this.value == '') {
			$RSemailLabel.show();
		}
	});
	
	//show/hide phone
	$RSphoneInput
	.focus(function() {
		$RSphoneLabel.hide();
	})
	.blur(function() {
		if (this.value == '') {
			$RSphoneLabel.show();
		}
	});
	
	//show/hide message
	$RSmessageInput
	.focus(function() {
		$RSmessageLabel.hide();
	})
	.blur(function() {
		if (this.value == '') {
			$RSmessageLabel.show();
		}
	});
	
	//show/hide captcha
	$RScaptchaInput
	.focus(function() {
		$RScaptchaLabel.hide();
	})
	.blur(function() {
		if (this.value == '') {
			$RScaptchaLabel.show();
		}
	});
});
