$(document).ready(function(){
						   		$('#submt').click(function() { 
								
									$.blockUI({ message: '<h2>Pesquisando, aguarde...</h2>' });
								
								});
								$("#alerta").hide();
								$("#resultado").hide();
								/*
						   		$('#formulario').ajaxForm({ 
									// target identifies the element(s) to update with the  response 
									target: '#resultados', 
							 
									// success identifies the function to invoke when the  response 
									// has been received; here we apply a fade-in effect to the new content 
									success: function(data) { 
										
										if(data == 'erro01'){
											
											$("#alerta").show();
											
										}else{
											alert(data);
											$("#resultado").show();
										}
 										
									} 
								}); */
								
						   
         						$("#tabs").tabs(),
								
								$("input:submit", ".sub").button(),
								
								$("select[name=veiculos]").change(function(){
									$("select[name=marcas]").html('<option value="0">Carregando...</option>');
									$("select[name=modelos]").html('<option value="0"></option>');
									$.post("../controle/combos.php",
										  {veiculo:$(this).val(), acao:"carregarMarcas"},
										  function(valor){
											  
											 $("select[name=marcas]").html(valor);
										  }
										  )
									
								 }),
								 $("select[name=marcas]").change(function(){
									$("select[name=modelos]").html('<option value="0">Carregando...</option>');
									
									$.post("../controle/combos.php",
										  {marca:$(this).val(), acao:"carregarModelos", tipo:$("select[name=veiculos]").val()},
										  function(valor){
											 $("select[name=modelos]").html(valor);
										  }
										  )
									
								 }),
								 $("select[name=estados]").change(function(){
									$("select[name=cidades]").html('<option value="0">Carregando...</option>');
									
									$.post("combos.php",
										  {estado:$(this).val(), acao:"carregarCidades"},
										  function(valor){
											 
											 $("select[name=cidades]").html(valor);
										  }
										  )
									
								 })
							});
