function voltar() {
	history.back(1);
}

jQuery(function( $ ){
						
	$("#banners").mbScrollable({
        dir:"horizontal",
        width:790,
        height:380,
        elementsInPage:1,
        elementMargin:0,
        controls:"#controle",
        slideTimer:600,
        autoscroll:true,
        scrollTimer:5000
      });
	
	
	
	hs.graphicsDir = 'imagens/graphics/';
	hs.wrapperClassName = 'wide-border';
	
	
	$(".carregando").hide();
	$("#cidade").change(function() {
	$(".carregando").ajaxStart(function(){
			$(this).show();
			$("#alvo").hide();
	});
	$(".carregando").ajaxStop(function(){
			$(this).hide();
			$("#alvo").show();
	});
	$.get("paginas/lojas.php",{
		  	cidade: $('#cidade option:selected').val()
			}, function(data) {
				  $("#alvo").empty().html(data);
			});
			return false;
	});
	
	$("#erro_form").hide();

	// Validação do formulário
	$("#form_contato").bind("submit", function() {
    	if($.trim($("#nome").val()) == ""){
			$("#nome").focus();	
            $("#nome").css({ background: "#C00"});
            return false;
        } else {
            $("#nome").css({ background: "#666"});
        }
		
		if($.trim($("#email").val()) == ""){
			$("#email").focus();
            $("#email").css({ background: "#C00"});
            return false;
        } else {
            $("#email").css({ background: "#666"});
        }
		
		if($.trim($("#assunto").val()) == ""){
			$("#assunto").focus();
            $("#assunto").css({ background: "#C00"});
            return false;
        } else {
            $("#assunto").css({ background: "#666"});
        }
		
		if($.trim($("#cidade2").val()) == ""){
			$("#cidade2").focus();
            $("#cidade2").css({ background: "#C00"});
            return false;
        } else {
            $("#cidade2").css({ background: "#666"});
        }
		
		
		if($.trim($("#estado").val()) == ""){
			$("#estado").focus();
            $("#estado").css({ background: "#C00"});
            return false;
        } else {
            $("#estado").css({ background: "#666"});
        }
		
		
		if($.trim($("#telefone").val()) == ""){
			$("#telefone").focus();
            $("#telefone").css({ background: "#C00"});
            return false;
        } else {
            $("#telefone").css({ background: "#666"});
        }
		
		if($.trim($("#mensagem").val()) == ""){
			$("#mensagem").focus();
            $("#mensagem").css({ background: "#C00"});
            return false;
        } else {
            $("#mensagem").css({ background: "#666"});
        }
	});
	
});



<!--validar email do newsletters-->
	function EmailNewsLetter(form2) {
	  if (form2.emailnews.value == "" && form2.nome.value == "") {
		alert("Preencha os campos : \n\n - E-mail para NewsLetters; \n - Nome;\n");
		return false;
	  }
	  if (form2.emailnews.value == "") {
		alert("Preencha um E-mail para NewsLetters!");
		return false;
	  }
	  if (form2.nome.value == "") {
		alert("Preencha com seu Nome!");
		return false;
	  }
	  if ((form2.emailnews.value.length <= 6)||(form2.emailnews.value.indexOf('@', 0) == -1)||(form2.emailnews.value.indexOf('.', 0)==-1)) {
		alert("Confira seu endereço de E-mail!");
		return false;
	  }
	}
<!--fim-->
