$(document).ready(onDocumentContactReady);

function onDocumentContactReady() {
	$("#contact_form .submitBtn").bind("click", onContactFormSubmitClicked);	
	$("#nonhuman").attr("checked", "checked");  /* avoid bot spam */					   
	$("#contact_form").validate({
		messages: {
			firstname: "This field is mandatory.",
			lastname: "This field is mandatory.",
			company: "This field is mandatory.",
			jobtitle: "This field is mandatory.",
			email: "This field is mandatory."
		}
	});
}

function onContactFormSubmitClicked(event) {
	event.preventDefault();
	$("#contact_form").submit();
}