function readyContactForm() {
	$("#submit_contact").click(function() {
	// validate and process form
	// first hide any error messages
	$('.error').hide();
	
	var name = $("input#contact_name").val();
	
	var email = $("input#contact_email").val();
	var practice = $("input#contact_practice").val();
	var phone = $("input#contact_phone_1").val()+$("input#contact_phone_2").val();
	var msg = $("textarea#contact_msg").val();
	
	var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone + '&practice=' +practice + '&msg=' +msg;
	//alert (dataString);return false;
	
	$.ajax({
	type: "POST",
	url: "contact_action.php",
	data: dataString,
	success: function() {
	$('#contact_content').html("<div id='message'></div>");
	$('#message').html("<h2>Contact Information Submitted!</h2>")
	.append("<p>Thanks for sending us a message. We'll be in touch with you shortly. <br /><a class=\"light\" style=\"cursor:pointer\" onclick=\"closeContactWindow()\">Close</a></p>")
	.hide()
	.fadeIn(1500);
	}
	});
	return false;
	});
}

function closeContactWindow() {
	$('#contact').jqm().jqmHide();
}