$(document).ready(
	function(){
		/* Submit Formulario de Contato */
		$('#inputEstado').change(
			function(){
				codigo = $(this).val();
				$.ajax(
					{ 
						type: "POST",
  						url: "endereco/estado/"+codigo, 
  						success: function(responseText){ 
						 	$('#inputCidade').html(responseText);
							$('#inputBairro').html('<option selected="selected" value="-1">Selecione a Cidade...</option>');
  						} 
					}
				);
			}
		);
		
		$('#inputEstadoInicial').change(
			function(){
				codigo = $(this).val();
				$.ajax(
					{ 
						type: "POST",
  						url: "endereco/estado/"+codigo, 
  						success: function(responseText){ 
						 	$('#inputCidadeInicial').html(responseText);
  						} 
					}
				);
			}
		);
		
		$('#inputCidade').change(
			function(){
				codigo = $(this).val();
				$.ajax(
					{ 
						type: "POST",
  						url: "endereco/cidade/"+codigo, 
  						success: function(responseText){ 
						 	$('#inputBairro').html(responseText);
  						} 
					}
				);
			}
		);
		
		$('#selectAnimal').change(
			function(){
				codigo = $(this).val();
				$.ajax(
					{ 
						type: "POST",
  						url: "endereco/animal/"+codigo, 
  						success: function(responseText){ 
						 	$('#selectRaca').html(responseText);
  						} 
					}
				);
			}
		);
		
		$('#selectAnimalInicial').change(
			function(){
				codigo = $(this).val();
				$.ajax(
					{ 
						type: "POST",
  						url: "endereco/animal/"+codigo, 
  						success: function(responseText){ 
						 	$('#selectRacaInicial').html(responseText);
  						} 
					}
				);
			}
		);
		
		$('#animalAltera').find('#inputAnimal').change(
			function(){
				codigo = $(this).val();
				conteudo = $(this).find('option:selected').html();
				$('#inputNovo').val(conteudo);
			}
		);
		
		$('#selectPagina').change(
			function(){
				codigo = $(this).val();
				$.ajax(
					{ 
						type: "POST",
  						url: "endereco/pagina/"+codigo, 
  						success: function(responseText){ 
						 	$('#boxInfoPagina').html(responseText);
  						} 
					}
				);
			}
		);
		
		var so = new SWFObject("media/swf/logos.swf", "Colaboradores", "201", "125", "8", "#FFFFFF");
		so.write("bannerLogosFlash");
		
	}
);