function Espera()
{
	/**
	 * Ações para a seção da tela de espera
	 * 
	 * @author João Paulo Duprat Pohlmann (jpaulo@gadbrivia.com.br)
	 */
	
	if ($("#frmNews").length > 0)
	{
		$("#frmNews").validate({
			submitHandler: function()
			{ 
				$.ajax(
				{
					type: 'POST',
					data: 'Nome=' + $("#txtNome").val() + '&Email=' + $("#txtEmail").val(),
					url: 'acao/Espera.php',
					success: function(retorno)
					{
						$("#txtNome").prev().replaceWith(retorno);
						$("#frmNews")[0].reset();
					}
				});
			},
			errorPlacement: function(error, element)
			{
				$("#txtNome").prev().attr("class", "aviso-erro");
				$("#txtNome").prev().html(error);
			},
		    errorElement: "span",
			highlight: function(element, errorClass)
			{
				$(element).css("border", "1px solid red");
			},
			unhighlight: function(element, errorClass)
			{
				$(element).css("border", "1px solid #E4E4E4");
			},
			rules: {
				txtNome: {
					required: function()
					{
						var valorNome = $("#txtNome").val();
						
						if ($.trim(valorNome) == "Nome:")
						{
							$("#txtNome").val("");
						}

						return true;
					}
				},
				txtEmail: {
					required:function()
					{
						var valorEmail = $("#txtEmail").val();

						if ($.trim(valorEmail) == "Email:")
						{
							$("#txtEmail").val("");
						}

						return true;
					},
					email: true
				}
			},
			messages: {
				txtNome: {
					required: MSG04
				},
				txtEmail: {
					required: MSG04,
					email: "Informe um e-mail válido."
				}
			}
		});
	}
	
	$("#txtNome, #txtEmail").focus(function()
	{
		if (($(this).val() == "") || ($(this).val() == "Nome:"))
		{
			$(this).val("");
		}

		if (($(this).val() == "") || ($(this).val() == "Email:"))
		{
			$(this).val("");
		}
	});
	
	$("#txtNome").blur(function()
	{
		if (($(this).val() == ""))
		{
			$(this).val("Nome:");
		}
	});
	
	$("#txtEmail").blur(function()
	{
		if (($(this).val() == ""))
		{
			$(this).val("Email:");
		}
	});
}