$(document).ready(function() {

	//	form submission via ajax
	$('#sub-form').submit(function() {
		var data = {
			"pleaseComment-text": 		$("#pleaseComment-text").val(),
			"email": 					$("#subscribe_email").val()
		};
		
		$.ajax({
			type: "POST",
			url: "./signup.php",
			data: data,
			success: function(html) {
				$("#sub-response").html(html).fadeIn();
			},
			error: function() {
				$("#sub-response").html('<p class="error">Unable to contact server to subscribe. Please use the contact link to email us directly</p>').fadeIn();
			}
		});
		
		return false;
	});
	
});
