/* Author: Oli Roberts oliroberts@gmail.com

*/

$(function() {
	$(".submit").click(function() {
		var email = $("#email").val();
		var dataString = 'email='+ email;

		if(email=='' || email === 'enter email address' ) {
/*
			$('.success').fadeOut(200).hide();
			$('.error').fadeOut(200).show();
*/
			alert('Please enter your email address');
		} else {
			$.ajax({
				type: "POST",
				url: "../mail.php",
				data: dataString,
				success: function(){
					$('#email').fadeOut(200).hide();
/*
					$('.success').fadeIn(200).show();
					$('.error').fadeOut(200).hide();
*/

alert('Thank you. You have been added to the mailing list');

				}
			})
		;}	
	return false;
	});
});
	
$(document).ready(function () {
	$(".defaultText").focus(function(srcc) {
		if ($(this).val() == $(this)[0].title) {
				$(this).removeClass("defaultTextActive");
            	$(this).val("");
            }
    	});
    	
   		$(".defaultText").blur(function() {
        	if ($(this).val() == "") {
            	$(this).addClass("defaultTextActive");
            	$(this).val($(this)[0].title);
            }
        });
        
   $(".defaultText").blur();        

});
























