$(document).ready(function (){
	$("#contacts").submit(function () {
		send();
		return false;
	});
	/*$("#reset_button").click(function () {
		clearError();
	})*/
});

function send()
{
	var data = $("#contacts").serialize();
	$.ajax({
		url: 'send_contacts.php',
		type: 'post',
		data: data,
		success: function message(response) {
			if (response == 1) {
				//$("#error").html('Information has been sent');
				alert('Information has been sent');
				$("#contacts")[0].reset();
			}
			//else $("#error").html(response);
			else alert(response);
		}
	})
}
/*function clearError()
{
	$("#error").html('&nbsp;');
}*/
