// JavaScript Document

	//REQUISICOES DIVERSAS	
	function mostraDivs(div1,div2,div3) {
		$(div1).css({visibility:"visible"});
		$(div2).css({visibility:"visible"});
		$(div3).css({visibility:"visible"});
	}
	
	//Mostra Promocoes
	function promocoes(){
		$('#divPromocoes').css({visibility:"visible"});
		$('#divOverlay').css({visibility:"visible"});
	}
	
	// HISTORICO
	function pageload(hash) {		
		// hash doesn't contain the first # character.
		if(hash) {
			// restore ajax loaded state
			$("#divPrincipal").load(hash + ".html");
			
		} else {
			 //start page
			$("#divPrincipal").load("home.html");
		}
	}
	
	$(document).ready(function(){
	// Initialize history plugin.
	// The callback is called at once by present location.hash. 
	$.historyInit(pageload);
	// set onlick event for buttons
	$("a[@rel='history']").livequery('click',function(){
		var hash = this.href;
		hash = hash.replace(/^.*#/, '');
		// moves to a new page. 
		// pageload is called at once. 
		$("#divPrincipal").html('<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td align="center" valign="top"><br /><br /><img src="images/load.gif" /><br/>Carregando...</td></tr></table>');
		$.scrollTo( "#divMenu", 1000);
		$.historyLoad(hash);
		
		return false;
	});
	});
	//FIM DO HISTORICO

//Load Intro
function loadIntro(){
	$('#divFundo').css({visibility:"visible"});
}

//fecha Cardapio
function fechaCardapio(){
	$('#divCardapio').css({visibility:'hidden'});
	$('#divOverlay').css({visibility:'hidden'});
}
