$(document).ready( function () {
	
	// Envia Formulário
	
	$("#formulario").submit(function() {
		var options = {
			target: "#resposta", 
			url: "enviaForm.php",
			type: "post", 
 
			success: function(resposta) {
				$("#resposta").text(resposta).show();
				$("#formulario")[0].reset();
			}
		}
 
		$(this).ajaxSubmit(options);
		return false;
	});
	
	// Exemplos do Formulário
	
	$('#nome').val("Jose Manuel");	
	$('#tel').val("(xx) - 3333-3333");	
	$('#email').val("exemplo@email.com.br");	
	$('#assunto').val("Ola");	
	$('#msg').val("Entre em contato, escreva sua mensagem.");	
	
	//Nome
	
	$('#nome').click( function() {
		if ($(this).val() == "Jose Manuel") {
			$(this).val("");
		}		
	});
	
	$('#nome').blur(function(){
		if ($(this).val() == "") {
			$(this).val("Jose Manuel")
		}
	});
	
	// Telefone
	
	$('#tel').click( function() {
		if ($(this).val() == "(xx) - 3333-3333") {
			$(this).val("");
		}		
	});
	
	$('#tel').blur(function(){
		if ($(this).val() == "") {
			$(this).val("(xx) - 3333-3333")
		}
	});
	
	// E-mail
	
	$('#email').click( function() {
		if ($(this).val() == "exemplo@email.com.br") {
			$(this).val("");
		}		
	});
	
	$('#email').blur(function(){
		if ($(this).val() == "") {
			$(this).val("exemplo@email.com.br")
		}
	});
	
	// Assunto
	
	$('#assunto').click( function() {
		if ($(this).val() == "Ola") {
			$(this).val("");
		}		
	});
	
	$('#assunto').blur(function(){
		if ($(this).val() == "") {
			$(this).val("Ola")
		}
	});
	
	// Mensagem
	
	$('#msg').click( function() {
		if ($(this).val() == "Entre em contato, escreva sua mensagem.") {
			$(this).val("");
		}		
	});
	
	$('#msg').blur(function(){
		if ($(this).val() == "") {
			$(this).val("Entre em contato, escreva sua mensagem.")
		}
	});
	
/* Fim Formulário ------------------------------------ */
	
});

