/*///////////////////////////////////////////////////////////////////////
Ported to jquery from prototype by Joel Lisenby (joel.lisenby@gmail.com)
http://joellisenby.com

original prototype code by Aarron Walter (aarron@buildingfindablewebsites.com)
http://buildingfindablewebsites.com

Distrbuted under Creative Commons license
http://creativecommons.org/licenses/by-sa/3.0/us/
///////////////////////////////////////////////////////////////////////*/
jQuery(document).ready(function($) { // $() will work as an alias for jQuery() inside of this function  // other option would be to use "jQuery" instead of "$"

	$('#signup').submit(function() {
		// update user interface
		$('#response').html('Adding email address...');
		
		// Prepare query string and send AJAX request
		$.ajax({
			url: '/newsletter_handle.php',		// full URL
			data: 'ajax=true&email=' + escape($('#email').val()) + '&fname=' + escape($('#fname').val()) + '&lname=' + escape($('#lname').val()),
			success: function(msg) {
				$('#response').html(msg);
			}
		});
	
		return false;
	});
});
