$(function() {
    $('.error').hide();
    $(".nwsbutton").click(function() {
    // validate and process form here
      
    	$('.error').hide();
  	  	var email = $("input#email").val();	
		if ((email == "")||(email =="receive@updates")||(email =="email address")||(email =="undefined")||(email ==" ")||(email =="  ")||(email =="   ")||(email =="&nbsp;")) {

//      $("label#email_error").show();
      	$("#email").focus();
    	$("#email").css({borderColor:"#ee0000"});

	return false;

    }

  	var dataString = 'email=' + email;
	//alert (dataString);return false;
	$.ajax({
      	type: "POST",
      	url: "/includes/process.php",
      	data: dataString,
      	success: function() {
        	$('#newsletterform').html("<div id='thankyoun'></div>");
        	$('#thankyoun').html(" ")
        	.append("")
        	.hide()
        	.fadeIn(200, function() {
          		$('#thankyoun').append("<p>Thank you!</p>");
        	});
      	}
    });
    return false;

      
    });
});