$(document).ready(function() {
	$('input.email').focus(function() {
		if ($(this).val() == 'Enter Your Email Address') {
			$(this).val('');
		} 
	});
	$('input.email').blur(function() {
		if ($(this).val() == '') {
			$(this).val('Enter Your Email Address');
		} 
	});
	$('input.password').focus(function() {
		if ($(this).val() == 'Choose Your Password') {
			$(this).val('');
		} 
	});
	$('input.password').blur(function() {
		if ($(this).val() == '') {
			$(this).val('Choose Your Password');
		} 
	});
	
	$('form').submit(function() {
		if ($(this).find('input[name=email]').val() == '' || $(this).find('input[name=email]').val() == 'Enter Your Email Address') {
			if ($('div#message').length == 0) {
				$('body').append('<div id="message"><a href="">X</a><h2>Almost there! \>\>\></h2><p>Simply enter your email address in the form to the right and you\'ll get Instant ACCESS to download your Free Gift!</p></div>');
			}
			return false;
		} else if ($(this).find('input[name=password]').val() == '' || $(this).find('input[name=password]').val() == 'Choose Your Password') {
			if ($('div#message').length == 0) {
				$('body').append('<div id="message"><a href="">X</a><h2>Almost there! \>\>\></h2><p>Simply enter your email address in the form to the right and you\'ll get Instant ACCESS to download your Free Gift!</p></div>');
			}
			return false;
		} else if ($(this).find('input[type=checkbox]').attr('checked') == false) {
			if ($('div#message').length == 0) {
				$('body').append('<div id="message"><a href="">X</a><p>Please check box terms and conditions.</p></div>');
			}
			return false;
		}
	});
	
	$('#left img').click(function() {
		if ($('div#message').length == 0) {
			$('body').append('<div id="message"><a href="">X</a><h2>Almost there! \>\>\></h2><p>Simply enter your email address in the form to the right and you\'ll get Instant ACCESS to download your Free Gift!</p></div>');
		}
	});
	
	$('#message a').live('click', function() {
		$('#message').fadeOut(250, function() {
			$('#message').remove();
		});
		return false;
	});
});