jQuery(document).ready(function($) {
//$(document).ready(function() {
// comeco do Jquery
	//alert("teste jquery");
	
	// Links Topo:
	$(".link_sessao").click(function(){
		sessao = "#" + $(this).attr("sessao");
		$(sessao).show();
		
	});
	// Fim Links Topo

	//JqueryHistory
	$(".link_ajax").click(function(event){
		event.preventDefault();
		//Carregar AJAX
		//$("#carregando").show();
		LINK = $(this).attr("link");
		//alert(LINK);
		$.history.load(LINK);
		
	});

	$.history.init(function(hash){
        if(hash == "") {
            // initialize your app
			//alert(hash);
			//$.history.load("Pagina INICIAL PORRA!");

        } else {
            // restore the state from hash
			//alert("HASH definida: " + hash);
			$("#carregando").show();
			$.get("conteudo.php", { pag : hash },
			   function(data){
			   $("#conteudo").empty().html(data);
			$("#carregando").hide();
       		});
			//alert("apagar carregando");
			$("#TITULO").empty().text("URL: www.lequal.com.br/SITE-" + hash);
        }
    },
    { unescape: ",/" });


// fim do Jquery
});
