$(document).ready(function(){
	$("#submit-image-quick").click(function(){
		$.ajax({
			type: "POST",
			url: "process.php?action=quickContact",
			data:	"greeting=" + $("#contact_greeting").val() +
					"&email=" + $("#contact_email").val() +
					"&phone=" + $("#contact_home_phone").val() +
					"&message=" + $("#contact_comment").val(),
			success: function(html){
				if(html == "true")
					$("#quick-contact").html("<br><br>Your message has been successfully sent!");
				else $("#errors").html("The following errors were returned: <br>" + html);
			}
		});
	});

	$("#submit-image-full").click(function(){
		$.ajax({
			type: "POST",
			url: "../process.php?action=contact",
			data:	"name=" + $("#contact_first_name").val() +
					"&lastName=" + $("#contact_last_name").val() +
					"&greeting=" + $("#contact_greeting").val() +
					"&email=" + $("#contact_email").val() +
					"&phone=" + $("#contact_home_phone").val() +
					"&practice=" + $("#contact_how_did_you_hear_about_our_practice").val() +
					"&site=" + $("#contact_how_did_you_find_our_website").val() + 
					"&message=" + $("#contact_comment").val(),
			success: function(html){
				if(html == "true")
					$("#contact").html("<br><br>Your message has been successfully sent!");
				else $("#errors").html("The following errors were returned: <br>" + html);
			}
		});
	});
});