




$(document).ready(function() {  

		

		

/*ENVIA INFORMATIVO*/

		

    $(".ExcluirShow").click(function() {

										

	valuenome = $('input#NOME').val()									

										

        if (valuenome == 'NOME' || valuenome == 'PREENCHA O CAMPO NOME') {

           document.teste.NOME.value = "PREENCHA O CAMPO NOME";

		   document.teste.NOME.style.background="#FFc";

		 

		    document.teste.NOME.select();

		 return false;

		 

		}else{

   document.teste.NOME.style.background="#fff";

		}

  if (document.teste.EMAIL.value == 'E-MAIL' || document.teste.EMAIL.value == 'PREENCHA O CAMPO E-MAIL') {

           document.teste.EMAIL.value = "PREENCHA O CAMPO E-MAIL";

		   document.teste.EMAIL.style.background="#FFc";

		   

		    document.teste.EMAIL.select();

		 return false;

		 

		}else{

			

    document.teste.EMAIL.style.background="#fff";

		}

		 parte1 = document.teste.EMAIL.value.indexOf("@");

         parte2 = document.teste.EMAIL.value.indexOf(".");

         parte3 = document.teste.EMAIL.value.length;

         if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {

			  alert("O campo " + document.teste.EMAIL.name + " deve conter um endere&ccedil;o eletronico!");

                document.teste.EMAIL.style.background="#FFc";

		    document.teste.EMAIL.focus();

		    document.teste.EMAIL.select();

                   return false;

         } else {

			     document.teste.EMAIL.style.background="#fff";

		

		

            var nome = document.teste.NOME.value;

			 var email = document.teste.EMAIL.value;



            $("#EXCSstatus").html("Cadastrando...").fadeIn("slow");

            

			

            $.ajax ({

                url: "wp-content/themes/Dots/adicionar.php",

                type: "post",

                data: "nome="+nome+"&email="+email,

                success: function () {

					

					setTimeout( "  $('#EXCSstatus').html('Cadastrando...').fadeIn('slow');", 2000);

					

               setTimeout("$('#EXCSstatus').html('Enviado com sucesso');", 2000);

					

					setTimeout( "$('#EXCSstatus').fadeOut(4000);", 2000);

					$(':input').clearForm()

                }

            });

        }

    });

	

	$.fn.clearForm = function() {

  return this.each(function() {

	var type = this.type, tag = this.tagName.toLowerCase();

	if (tag == 'form')

	  return $(':input',this).clearForm();

	if (type == 'text' || type == 'password' || tag == 'textarea')

	  this.value = '';

	else if (type == 'checkbox' || type == 'radio')

	  this.checked = false;

	else if (tag == 'select')

	  this.selectedIndex = -1;

  });

};

	


  	

	

});





	

var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'http://www.tvmatao.com.br/novo/wp-content/themes/Dots/images/paredao.jpg'
theImages[1] = 'http://www.tvmatao.com.br/novo/wp-content/themes/Dots/captiva.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}


	 

	 

	 

	 
