// JavaScript Document
$(document).ready(function()
{
	$('#contact_form_submit').click(function ()
	  {
		  //var str = $('#contact_form').serialize(); 
		  //alert('str ' + str);
		 var str = '';
		 str += 'name=' +  $('#contact_name').val();
		 str += '&email=' + $('#contact_email').val();
		 str += '&message=' + $('#contact_message').val();
		 if (str != '')
		 {
		  $.ajax({
			type: "POST",
			url: "action/ajax_brain.php",
			data: "action=contact&" + str,
			success: function(msg){
			 //alert( "Message From Server: " + msg );
			 alert("Your message has been sent.");
			}
		  });
		}
		else 
		{
			alert('Please complete the form to send the message');
		}

	  }
	);
}
);
