function getContact() {

	contactName = $("#contactname").val();
	contactEmail = $("#contactemail").val();
	contactMessage = $("#contactmessage").val();
	
	$.post("contact_send.php", { name: contactName, email: contactEmail, message: contactMessage }, function(data) {
		
		if (data == "Your message was successfully sent. We appreciate you taking the time to write to us. You will be hearing from us soon.") {
			$("#error h1").text("Thank You!");
			$("p.#errormessage").text(data);
			$("#errordiv").fadeIn("normal");
			$("#contactname").val("");
			$("#contactemail").val("");
			$("#contactmessage").val("");
		} else {		
			$("#error h1").text("Uh Oh!");
			$("p.#errormessage").text(data);
			$("#errordiv").fadeIn("normal");
		}
	}, "text");
	
	return false;
}

function addListeners() {
	$(".sidebar ul li a").bind("click keyup", function() { return linkLoader(this); });
	$("#contactsubmit").bind("click keyup", function() { return getContact(); });
	
	$("#close").click(function () {
	  $("#errordiv").fadeOut("normal");
	});
	
	$("#close").keypress(function () {
	  $("#errordiv").fadeOut("normal");
	});
}

$(document).ready(addListeners);