function sub_menu(tipo){			



	document.getElementById('content-'+tipo).style.display = '';

	

	for(i = 1; i <=  10; i++){

		

		if(tipo != i){

			document.getElementById('content-'+i).style.display = 'none';

		}

		

	}



}



function sub_menu3(tipo){			



	document.getElementById('content-'+tipo).style.display = '';

	

	for(i = 1; i <=  5; i++){

		

		if(tipo != i){

			document.getElementById('content-'+i).style.display = 'none';

		}

		

	}



}



function galeria(tipo){			







	document.getElementById('content-'+tipo).style.display = '';



	



	for(i = 1; i <=  12; i++){



		



		if(tipo != i){



			document.getElementById('content-'+i).style.display = 'none';



		}



		



	}







}







function sub_menu2(tipo, ids){

    

        



        idsSep = ids.split(",");







        document.getElementById('content_'+tipo).style.display = '';







            for(var i in idsSep){



                



                document.getElementById('content_'+idsSep[i]).style.display = 'none';

                document.getElementById('content_0').style.display = 'none';



            



            }







    }











function trocarFoto(id, tipo, menu){



	if(tipo == '1'){



		document.getElementById(id).src = "imagens/" + menu + tipo + ".png";



	}else{



		document.getElementById(id).src = "imagens/" + menu + tipo + ".png";



	}



}















function ajax(href,destino){



    



	if(destino != '')



		$("#"+destino).html('');



	



	$.ajax({



	    url: href,



	    type: 'GET',



	    dataType: 'html',



	    timeout: 1000,



	    async: false,



	    error: function(){



	        alert('Erro ao carregar documento via ajax');



	    },



	    success: function(html){



	    	if(destino != '')



	    	{



		    	$("#"+destino).fadeOut('fast', function(){$("#"+destino).html(html);



				});



				$("#"+destino).fadeIn('fast');



	    	}



			



	    }



	}); 



}



function EscolheTipo(tp){

    

    if(tp == 1){

        document.getElementById("tipo").value = "carro";

        document.getElementById("tipo_carro").src = "imagens/btn-menu-carros-over.jpg";

        document.getElementById("tipo_moto").src = "imagens/btn-menu-motos.jpg";

    

    }else{

        document.getElementById("tipo").value = "moto";

        document.getElementById("tipo_moto").src = "imagens/btn-menu-motos-over.jpg";

        document.getElementById("tipo_carro").src = "imagens/btn-menu-carros.jpg";

    }

}
