// JavaScript Document

function album_fotos(id) { 
	$("#album_fotos").fadeOut("slow");
	//$("#album_fotos").html("<div align='center'><img src='imagens/site/loading-bar-black.gif' /></div>");
	 setTimeout( function(){var eventos_show = $(this).attr("title");
		$.ajax({
			method: "get",url: "album/album/index.asp", data: "id=" + id,
			success: function(html){
				$("#ban_flu").css({ 'visibility' : 'visible' });
				$("#album_fotos").html(html);
				$("#album_fotos").fadeIn("slow");
				execJS(document.getElementById("album_fotos"));
			}
		})
	}, 500);
}

function informativos(id) { 
	$("#informativo").fadeOut("normal");
	//$("#album_fotos").html("<div align='center'><img src='imagens/site/loading-bar-black.gif' /></div>");
	 setTimeout( function(){var eventos_show = $(this).attr("title");
		$.ajax({
			method: "get",url: "informativo.asp", data: "id_menu=" + id,
			success: function(html){
				$("#ban_flu2").css({ 'visibility' : 'visible' });
				$("#informativo").html(html);
				$("#informativo").fadeIn("normal");
				execJS(document.getElementById("informativo"));
			}
		})
	}, 500);
}

function paginas_internas(pagina, id, pag_historico, id_historico) {
	var eventos_show = $(this).attr("title");
	//$("#ajax").fadeOut("normal");
	$.ajax({
		method: "get",url: pagina, data: id + "&" + pag_historico + "&" + id_historico,
		success: function(html){
			$("#ajax").html(html);
			//$("#ajax").fadeIn("slow");
			execJS(document.getElementById("ajax"));
		}
	})
}

function historico(pagina, id) {
	var eventos_show = $(this).attr("title");
	$.ajax({
		method: "get",url: pagina, data: id,
		success: function(html){
			$("#ajax").html(html);
			execJS(document.getElementById("ajax"));
		}
	});
}

function pagina_conheca(pagina) {
	var eventos_show = $(this).attr("title");
	//$("#titulo_texto").fadeOut("slow");
	$.ajax({
		method: "get",url: pagina, data: "id=0",
		success: function(html){
			$("#titulo_texto").html(html);
			//$("#titulo_texto").fadeIn("slow");
			execJS(document.getElementById("titulo_texto"));
		}
	});
}

function cadastrar_contato(form) {
	var eventos_show = $(this).attr("title");
	//$("#ajax").fadeOut("normal");
	$.ajax({
		method: "get",url: "asp/cadastro_contato.asp", data: "De=" + escape(form.De.value) + "&Email=" + escape(form.Email.value) + "&Assunto=" + escape(form.Assunto.value) + "&Mensagem=" + escape(form.Mensagem.value) + "&tipo=0",
		success: function(html){
			$("#ajax").html(html);
			//$("#ajax").fadeIn("slow");
			execJS(document.getElementById("ajax"));
		}
	})
}


function fechar(){
	document.getElementById("ban_flu").style.visibility="hidden";
}

function fechar_informativo(){
	document.getElementById("ban_flu2").style.visibility="hidden";
}