function carregaCidade() {
	var ufCodigo = jQuery("#uf").val();
	jQuery("#resultCidade").fadeOut(500,function(){
		jQuery.ajax({
			type: "GET",
			url: "inc/pesquisa.php",
			data: "acao=carregaCidade&ufCodigo="+ufCodigo,
			cache: false,
			success: function(result) {
				jQuery("#resultCidade").fadeIn(500).html(result);
			}
		});
	
	});
};

function proposta(){
	jQuery.scrollTo("#result_email", 800 );
	jQuery("#nome").focus();
}
function navparaiba1() {
	jQuery.scrollTo( 720, 800 );
};
function navparaiba2() {
	jQuery.scrollTo( 1510, 800 );
};
function navparaiba3() {
	jQuery.scrollTo( 2050, 1000 );
};
function navparaiba4() {
	jQuery.scrollTo( 2240, 1200 );
};
function navparaiba5() {
	jQuery.scrollTo( 2900, 1200 );
};
/*
jQuery(function(){
	var options = {
		target: "#resultajax",
		beforeSubmit: showRequest,
		secess: showResponse,
		clearForm: false
	};
	
	jQuery("#form_busca").validate({
	
		submitHandler: function(form) {
			jQuery(form).ajaxSubmit(options);
		}
	
	});

});

function showRequest(formData, jqForm, options){
	return true;
}

function showResponse(responseText, statusText){
	jQuery("#resultajax").fadeOut(1000);
	if(responseText != ""){
		jQuery("#resultajax").fadeIn(1000).html(responseText);
	}
}
*/
function chamaPaginacao(limit,acao,div,linguaCodigo,scrol) {
	jQuery(div).fadeOut(250);
	jQuery.ajax({
		type: "GET",
		url: "inc/pesquisa.php",
		data: "limit="+limit +"&acao="+ acao +"&linguaCodigo="+ linguaCodigo,
		cache: false,
		success: function(result) {
			jQuery(div).empty();
			jQuery(div).html(result).slideDown(500);
			if(scrol == 1){
				jQuery.scrollTo( 100, 800 );
			}else if(scrol == 2){
				jQuery.scrollTo( 750, 800 );
			}
		}
	});
}

function abrirNovidade(id){
	jQuery(".novidade").hide(250).fadeOut(250,function(){
		jQuery("#nov"+id).fadeIn(1000);
	});
}


function abrirProduto(id){
	jQuery(".produto").hide(250).fadeOut(250,function(){
		jQuery("#prod"+id).fadeIn(1000);
		//jQuery(".prodNome").fadeIn(1000);
		
	});
}

function abrirCategoria(id){
	jQuery(".prodNome").hide(250).fadeOut(250,function(){
		jQuery(".cat"+id).fadeIn(1000);
	});
}

function CadastraNews(){
	var nome =  document.getElementById("nome").value;	
	var email =  document.getElementById("email").value;

	jQuery("#result").html("Aguarde, enviando...").fadeIn(500,function(){
		jQuery.ajax({
			type: "POST",
			url: "inc/cadastroNews.php",
			data: "nome="+nome+"&email="+email,
			cache: false,
			success: function(result) {
				jQuery("#result").html(result).fadeIn(500);
			}
		});
	});
}

function CadastraArquitetos(){
	var nome =  document.getElementById("nome").value;	
	var email =  document.getElementById("email").value;
	
	var tel =  document.getElementById("tel").value;	
	var dataNasc =  document.getElementById("dataNasc").value;
	
	var end =  document.getElementById("end").value;	
	jQuery("#result").html("Aguarde, enviando...").fadeIn(500,function(){
		jQuery.ajax({
			type: "POST",
			url: "inc/cadastroEmail.php",
			data: "nome="+nome+"&email="+email+"&tel="+tel+"&end="+end+"&dataNasc="+dataNasc,
			cache: false,
			success: function(result) {
				jQuery("#result").html(result).fadeIn(500);
			}
		});
	});
}


function EnviaContato(){
	var nome =  document.getElementById("nome").value;	
	var email =  document.getElementById("email").value;

	var assunto =  document.getElementById("assunto").value;	
	var mensagem =  document.getElementById("mensagem").value;
	
	var setor =  document.getElementById("default-usage-select").value;	
	jQuery("#result").html("Aguarde, enviando...").fadeIn(500,function(){
		jQuery.ajax({
			type: "POST",
			url: "inc/contatoEmail.php",
			data: "nome="+nome+"&email="+email+"&assunto="+assunto+"&mensagem="+mensagem+"&setor="+setor,
			cache: false,
			success: function(result) {
				jQuery("#result").html(result).fadeIn(500);
			}
		});
	});
	
}


function PaginacaoProduto(limite){

		jQuery.ajax({
			type: "POST",
			url: "acoes/acoesProduto.php",
			data: "acao=SelectProduto&limite="+limite,
			cache: false,
			success: function(result) {
				jQuery("#pagProduto").html(result).fadeIn(500);
			}
		});

}







