$(document).ready(function(){
	$('#contact-form').submit(function(){
		$.ajax({
			type: "POST",
			url: "api/contacts.send.php",
			data: $(this).serialize(),
			success: function(msg){
				$("#note").ajaxComplete(function(event, request, settings){
					if(msg == 'OK'){ // Message Sent? Show the 'Thank You' message and hide the form
						result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
						$("#contact-form").hide();
					} else {
						result = msg;
					}
					$(this).html(result);
				});
			 }
		});
		return false;
	})
})


