$(function() {
	$('#contactForm').submit(function() {
		var inputs = [];
		$(':input', this).each(function() {
			inputs.push(this.name + '=' + escape(this.value));
		})

		jQuery.ajax({
			data: inputs.join('&'),
			type: "POST",
			url: this.action,
			timeout: 2000,
			error: function() {
				console.log("Failed to submit");
			},
			success: function(r) { 
				// alert(r);
				$("#contact_result").text(r).fadeIn("fast");
			}
		}) 
		return false;
	})
})
