//RESETAR FORMULÁRIOS

function resetar(){
	$(idContato)[0].reset();
	$(idIndique)[0].reset();
}

$(document).ready(function(){
	//ENVIO DE CONTATO
	$(idContato).submit(function(event){
		var dados = $(idContato).serialize();		
			
		$.ajax({
			header: {
				"Content-Type": "text/html;  charset=ISO-8859-1"
			},
			type: "get",
			data: "acao="+nomeAcaoContato+"&" + dados,
			url: SITE + "/formulario.php",
			dataType: "html",
			success: function(valor){
				// Preenche a tabela com os dados
				$(classRetornoContato).fadeIn('slow');
				$(classRetornoContato).html(valor);
				$(classRetornoContato).delay(4000).fadeOut('slow');
				return true;
			}
		});		
		
		return false;
	});
	//ENVIO DE CONTATO 2
	$(idContato2).submit(function(event){
		var dados = $(idContato2).serialize();		
			
		$.ajax({
			header: {
				"Content-Type": "text/html;  charset=ISO-8859-1"
			},
			type: "get",
			data: "acao="+nomeAcaoContato2+"&" + dados,
			url: SITE + "/formulario.php",
			dataType: "html",
			success: function(valor){
				// Preenche a tabela com os dados
				$(classRetornoContato2).fadeIn('slow');
				$(classRetornoContato2).html(valor);
				$(classRetornoContato2).delay(4000).fadeOut('slow');
				return true;
			}
		});		
		
		return false;
	});
	
	//ENVIO DE INDIQUE
	$(idIndique).submit(function(event){
		var dados = $(idIndique).serialize();		
			
		$.ajax({
			header: {
				"Content-Type": "text/html;  charset=ISO-8859-1"
			},
			type: "get",
			data: "acao="+nomeAcaoIndique+"&" + dados,
			url: SITE + "/formulario.php",
			dataType: "html",
			success: function(valor){
				// Preenche a tabela com os dados
				$(classRetornoIndique).fadeIn('slow');
				$(classRetornoIndique).html(valor);
				$(classRetornoIndique).delay(4000).fadeOut('slow');
				return true;
			}
		});		
		
		return false;
	});	
	
});

