$(document).ready( function() {

    $("#contato").submit(function() {
		document.getElementById("responseContato").innerHTML = "";
		$("#contato").validate();
		if($("#contato").valid() == false) {
			return false;
		}
		var ser = $(this).serialize();  //produced above response
		$("#responseContato").html("Carregando");
		$.post($(this).attr("action"), ser, 
		function(response) {
			$("#responseContato").html(response);
		});
		this.reset();
		return false;
	});
	
	$("#commentForm").submit(function() {
		document.getElementById("response").innerHTML = "";
		$("#commentForm").validate();
		if($("#commentForm").valid() == false) {
			return false;
		}
		var ser = $(this).serialize();  //produced above response
		$("#response").html("Carregando");
		$.post($(this).attr("action"), ser, 
		function(response) {
			$("#response").html(response);
		});
		this.reset();
		return false;
	});


	$("#senhaForm").submit(function() {
		document.getElementById("responselogin").innerHTML = "";
		$("#senhaForm").validate();
		if($("#senhaForm").valid() == false) {
			return false;
		}
		var ser = $(this).serialize();  //produced above response
		$("#responselogin").html("Carregando");
		$.post($(this).attr("action"), ser, 
		function(response) {
			$("#responselogin").html(response);
		});
		this.reset();
		return false;
	});

        $("#tokenForm").submit(function() {
		document.getElementById("responsetoken").innerHTML = "";
		$("#tokenForm").validate();
		if($("#tokenForm").valid() == false) {
			return false;
		}
		var ser = $(this).serialize();  //produced above response
		$("#responsetoken").html("Carregando");
		$.post($(this).attr("action"), ser,
		function(response) {
			$("#responsetoken").html(response);
		});
		this.reset();
		return false;
	});

        $("#avisemeForm").submit(function() {
		document.getElementById("responseaviseme").innerHTML = "";
		$("#avisemeForm").validate();
		if($("#avisemeForm").valid() == false) {
			return false;
		}
		var ser = $(this).serialize();  //produced above response
		$("#responseaviseme").html("Carregando");
		$.post($(this).attr("action"), ser,
		function(response) {
			$("#responseaviseme").html(response);
		});
		this.reset();
		return false;
	});
});

