function abada(modelo, div) {
	atualiza = false;
	var mostra = div;
	var status = "<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Aguarde...";
	mostra.html(status).show();
	
	$.ajax({
		url: "convida.php",
		type: "post",
		data: "modelo=" + modelo,
		success: function(resposta) {
			mostra.html(resposta);
			if(atualiza) {
				if(modelo == "p1") {
					var vp1 = parseInt($("#vp1").text());
					$("#vp1").text(vp1 + 1);
				}
				if(modelo == "p2") {
					var vp2 = parseInt($("#vp2").text());
					$("#vp2").text(vp2 + 1);
				}
				if(modelo == "c1") {
					var vc1 = parseInt($("#vc1").text());
					$("#vc1").text(vc1 + 1);
				}
				if(modelo == "c2") {
					var vc2 = parseInt($("#vc2").text());
					$("#vc2").text(vc2 + 1);
				}
			}
		}
	})
	return false;
}

function filtrar(action, por, carrega) {
	var filtro = por;
	var mostra = $(carrega);
	
	mostra.slideUp();
	
	setTimeout(
		function() {
			mostra.html("<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Aguarde...").show();
		},
		500
	);
	
	$.ajax({
		url: action,
		type: "post",
		data: "filtro=" + filtro,
		success: function(resposta) {
			mostra.html(resposta).hide();
			setTimeout(
				function() {
					mostra.html(resposta).slideDown("slow");
				},
				500
			);
		}
	})
	return false;
}

function cadastro(form, php) {
	var mostra = $(".resposta");
	var status = "<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Aguarde...";
	mostra.html(status).show();
					
	var opcoes = {
		url: "cadastrousu.php",
		type: "post",
		success: function(resposta) {
			mostra.empty().html(resposta);
		}
	}
	
	$(form).ajaxSubmit(opcoes);
	return false;
}

function nafoto(form, php) {
	var mostra = $(".nafoto");
	var status = "<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Aguarde...";
	mostra.html(status).show();
					
	var opcoes = {
		url: "nafoto.php",
		type: "post",
		success: function(resposta) {
			mostra.empty().html(resposta);
		}
	}
	
	$(form).ajaxSubmit(opcoes);
	return false;
}

function indicar(form, action) {
	var mostra = $("#resposta-indicacao");
	var status = "<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Enviando, aguarde...";
	mostra.html(status).show();
					
	var opcoes = {
		url: action,
		type: "post",
		success: function(resposta) {
			mostra.html(resposta);
		}
	}
	
	$(form).ajaxSubmit(opcoes);
	return false;
}

function comentar(form, action, div) {
	var carregando = $(div);
	var status = "<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Enviando, aguarde...";
	carregando.html(status).show();
					
	var options = {
		target: carregando,
		url: action,
		type: "post",
		success: function(resposta) {
			if(ok) {
				var comentarios = $("span#quant-comentarios");
				$("table.comentario:first").hide();
				$("div.comentarios").appendTo().html($("table.comentario"));
				setTimeout(
					function() {
						$("table.comentario:first").fadeIn();
						comentarios.text(parseInt(comentarios.text()) + 1);
					},
					1500
				)
			}
			else {
				carregando.html(resposta);
			}
		}
	}
	
	$(form).ajaxSubmit(options);
	return false;
}

function buscar(tag) {
	var status = "<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Buscando, aguarde...";
	$("#coluna-direita").empty().html(status);
	
	function urlencode(str) {
		str = escape(str);
		str = str.replace('+', '%2B');
		str = str.replace('%20', '+');
		str = str.replace('*', '%2A');
		str = str.replace('/', '%2F');
		str = str.replace('@', '%40');
		return str;
	}
	
	setTimeout(
		function() {
			location.href = "?pagina=busca&tag=" + urlencode(tag);
		},
		2000
	);
	return false;
}

function cadastrarEvento(form, action) {
	var mostra = $(".resposta");
	var status = "<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Enviando, aguarde...";
	mostra.empty().html(status).show();
					
	var opcoes = {
		target: mostra,
		url: "?id=",
		type: "post",
		success: function(resposta) {
			mostra.html(resposta);
			if(redir) {
				setTimeout(
					function() {
						location.href = "?id=edf";
					},
					1500
				)
			}
		}
	}
	
	$(form).ajaxSubmit(opcoes);
	return false;
}

function enviar(form, php) {
	var mostra = $(".resposta");
	var status = "<img src=\"imagens/carregando.gif\" alt=\"carregando\" class=\"carregando\" />Enviando, aguarde...";
	mostra.empty().html(status).show();
					
	var opcoes = {
		url: php,
		type: "post",
		success: function(resposta) {
			mostra.empty().html(resposta);
		}
	}
	
	$(form).ajaxSubmit(opcoes);
	return false;
}

$(document).ready(
	function() {
		$("#pista").change(
			function() {
				if($(this).val() == "nulo") {
					alert("Escolha um modelo!");
					return false;
				}
				else {
					abada($(this).val(), $("#resposta-pista"));
					return false;
				}
			}
		);
		
		$("#camarote").change(
			function() {
				if($(this).val() == "nulo") {
					alert("Escolha um modelo!");
					return false;
				}
				else {
					abada($(this).val(), $("#resposta-camarote"));
					return false;
				}
			}
		);
		
		/* PNGs */
		$(document).pngFix();
		
		/* APLICAÃ‡ÃƒO DE ESTILO */		
		$("table.comentario td a").click(
			function() {
				return false;
			}
		);
		
		$("div.evento, div.video, div.mp3, div.galeria, div.cobertura span.destaque, span.moldura-foto").livequery(function() {
			$(this).hover(
				function() {
					$(this).css("border", "dotted 1px #000");
					$(this).css("background", "#cccc00");
				},
				function() {
					$(this).css("border", "solid 1px #ccc");
					$(this).css("background", "#fff");
				}
			)
		});
		
		$("input[@type=text], textarea").focus(
			function() {
				$(this).css("border", "solid 2px #999900");
			}
		).blur(
			function() {
				$(this).css("border", "solid 1px #666");
			}
		)
		/* FIM APLICAÃ‡ÃƒO DE ESTILOS */
		
		/* @-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@- */
		
		/* LINKS EXTERNOS */
		$("a[@rel=externo]").attr("target", "_blank");
		/* FIM LINKS EXTERNOS */
		
		/* @-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@- */
		
		/* BUSCA TOPO */
		$("#busca-rapida").submit(
			function() {
				var tag = $("#tag");
				
				if(tag.val() == "") {
					alert("Digite o que deseje buscar!");
					tag.focus();
					return false;
				}
				else {
					buscar(tag.val());
					return false;
				}
			}
		);
		
		$("#selecao").change(
			function() {
				var selecao = $("#selecao");
				
				if(selecao.val() == "nulo") {
					alert("Escolha uma opÃ§Ã£o!");
					selecao.focus();
					return false;
				}
				else {
					selecionar(selecao.val());
					return false;
				}
			}
		);
		/* FIM BUSCA TOPO */
		
		/* @-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@- */
		
		/* JANELA GALERIA CONVENCIONAL */
		
				$("a.dazoom").click(
			function() {
				var janela = $("#janela");
				var cid = $(this).attr("id");
				var galeria = "fotos/abre.php?foto=imagens/eventos/" + cid;
				var evento = $(this).attr("rel");
				
				$.blockUI({
					message: "<img src='imagens/carregando-janela.gif' />",
					css: {
						background: "none",
						top: "50%",
						left: "48%",
						width: "4%",
						border: "none"
					}
				});
				
				$.ajax({
					url: galeria,
					type: "get",
					success: function() {
						$("#galeria").load(galeria);
						setTimeout(	
							function() {
								$.blockUI({
									message: janela,
									css: {
										top: "50%",
										border: "none"
									}
								});
							},
							2000
						)
					}
				});
				
				return false;
			}
		);
		
		
		$("a.exibicao-convencional").click(
			function() {
				var janela = $("#janela");
				var cid = $(this).attr("id");
				var galeria = "fotos/janela.php?cid=" + cid;
				var evento = $(this).attr("rel");
				
				$.blockUI({
					message: "<img src='imagens/carregando-janela.gif' />",
					css: {
						background: "none",
						top: "50%",
						left: "48%",
						width: "4%",
						border: "none"
					}
				});
				
				$.ajax({
					url: galeria,
					type: "get",
					success: function() {
						$("#galeria").load(galeria);
						setTimeout(	
							function() {
								$.blockUI({
									message: janela,
									css: {
										top: "50%",
										border: "none"
									}
								});
							},
							2000
						)
					}
				});
				
				return false;
			}
		);
			/* FECHA A GALERIA */
		$("a#fechar-galeria").click(
			function() {
				$.unblockUI();
				return false;
			}
		);
		$("a.exibicao-convencional2").click(
			function() {
				var janela1 = $("#janelafr");
				var cid = $(this).attr("id");
				var galeria1 = "fotos/nafoto.php?cid=" + cid;
				var evento = $(this).attr("rel");
				
				$.blockUI({
					message: "<img src='imagens/carregando-janela.gif' />",
					css: {
						background: "none",
						top: "50%",
						left: "48%",
						width: "4%",
						border: "none"
					}
				});
				
				$.ajax({
					url: galeria1,
					type: "get",
					success: function() {
						$("#galeria1").load(galeria1);
						setTimeout(	
							function() {
								$.blockUI({
									message: janela1,
									css: {
										top: "50%",
										border: "none"
									}
								});
							},
							2000
						)
					}
				});
				
				return false;
			}
		);
		
	
		/* FECHA A GALERIA */
		$("a#fechar-galeria1").click(
			function() {
				$.unblockUI();
				return false;
			}
		);
		/* AMPLIA A MINIATURA NA GALERIA */
		$("a[@rel=ampliar-foto-galeria]").livequery("click",
			function() {
				var seq = $(this).attr("id");
				var urlFoto = $(this).attr("href");
				var pg = "fotos/foto.php?foto=" + urlFoto+"&seq="+seq;
				var exibeFoto = $("#foto");
				var carregando = $("#CarregandoGaleria");
				
				carregando.slideDown("fast");
				exibeFoto.fadeOut("fast");
				
				$.ajax({
					url: pg,
					type: "get",
					success: function() {
						setTimeout(
							function() {
								carregando.slideUp();
								exibeFoto.empty().load(pg).fadeIn();
							},
							1500
						)
					}
				});
				
				return false;
			}
		);
		
		/* PAGINAÃ‡AO */ 
		$("div.paginacao-galeria a.pg").livequery("click",
			function() {
				var cid = $(this).attr("rel");
				var pag = $(this).text();
				var pg = "fotos/fotos.php?pag=" + pag + "&cid=" + cid;
				var fotos = $("#fotos");
				var exibeFoto = $("#foto");
				var carregando = $("#CarregandoGaleria");
				
				fotos.fadeOut("fast");
				carregando.slideDown("fast");
				exibeFoto.empty();
				$("div.paginacao-galeria").find("a.atual").removeClass("atual").addClass("pg");
				$(this).removeClass("pg").addClass("atual");
				
				$.ajax({
					url: pg,
					type: "get",
					success: function() {
						setTimeout(
							function() {
								carregando.slideUp();
								fotos.empty().load(pg).fadeIn();
							},
							2500
						)
					}
				});
				
				return false;
			}
		);
			/* PAGINAÃ‡AO */ 
		$("div.nafoto a.estou").livequery("click",
			function() {
				var cide = $(this).attr("rel");

				var pge = "nafoto.php?page="+cide;
				var fotose = $("#nafoto");
				var exibeFotoe = $("#nafoto");
				var carregandoe = $("#nafoto");
				
				fotose.fadeOut("fast");
				carregandoe.slideDown("fast");
				exibeFotoe.empty();
					
				$.ajax({
					url: pge,
					type: "get",
					success: function() {
						setTimeout(
							function() {
								carregandoe.slideUp();
								fotose.empty().load(pge).fadeIn();
							},
							500
						)
					}
				});
				
				return false;
			}
		);
		
		/* PG ATUAL PAGINAÃ‡ÃƒO */
		$("div.paginacao-galeria a.atual").livequery("click",
			function() {
				return false;
			}
		);
		
		/* FOTOS POR PÃGINA COBERTURA */
		$("#fotos-por-pagina").change(
			function() {
				var fpp = $(this).val();
				var cid = queryString("cid");
				
				location.href = "?pagina=fotos&cid=" + cid + "&fpp=" + fpp;
			}
		);
		/* FOTOS POR PÃGINA COBERTURA */
		
		/* @-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@- */
		
		/* LINKS TÃTULOS */
		$("#links-navegacao a, div.destaque, .titulo, a.link-titulo, ul.filtros li a, img, input, textarea, select").livequery(
			function() {
				$(this).tooltip({
					track: true, 
					delay: 0, 
					showURL: false,
					fade: 250
				});
			}
		);
		/* FIM LINKS TÃTULOS */
		
		/* @-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@- */
		
		/* FILTROS */
		
		/* MP3 */
		$("#filtrar-cat-mp3").change(
			function() {
				var cat = $(this).val();
				var mostra = $("#mp3");
				
				mostra.empty().html("<img src='imagens/carregando.gif' alt='aguarde' class='carregando' />Carregando...");
				
				$.ajax({
					url: "mp3/filtrar.php",
					type: "post",
					data: "categoria=" + cat,
					success: function(resposta) {
						mostra.empty().html(resposta);
					}
				})
				return false;
			}
		)
		
		/* CAPA */
		/* eventos */
		$("#filtro-eventos-destaques").click(
			function() {
				filtrar($(this).attr("href"), $(this).attr("rel"), "#eventos");
				return false;
			}
		)
		
		$("#filtro-eventos-novos").click(
			function() {
				filtrar($(this).attr("href"), $(this).attr("rel"), "#eventos");
				return false;
			}
		)
		
		$("#filtro-eventos-mais-visitados").click(
			function() {
				filtrar($(this).attr("href"), $(this).attr("rel"), "#eventos");
				return false;
			}
		)
		/* fim eventos */
		
		/* mp3 */
		$("#filtro-ultimas-mp3").click(
			function() {
				filtrar($(this).attr("href"), $(this).attr("rel"), "#mp3");
				return false;
			}
		)
		
		$("#filtro-mp3-mais-baixadas").click(
			function() {
				filtrar($(this).attr("href"), $(this).attr("rel"), "#mp3");
				return false;
			}
		)
		
		/* vÃ­deos */
		$("#filtro-ultimas-baladas").click(
			function() {
				filtrar($(this).attr("href"), $(this).attr("rel"), "#videos");
				return false;
			}
		)
		
		$("#filtro-ultimos-videos").click(
			function() {
				filtrar($(this).attr("href"), $(this).attr("rel"), "#videos");
				return false;
			}
		)
		
		$("#filtro-videos-mais-visitados").click(
			function() {
				filtrar($(this).attr("href"), $(this).attr("rel"), "#videos");
				return false;
			}
		)
		
		/* FIM FILTROS */
		
		/* COMENTÃRIOS */
		
		/* EVENTO */
		$("#comentar-evento").submit(
			function() {
				var nome = $("#cnome");
				var email = $("#cemail");
				var coment = $("#comentario");
				
				if(nome.val() == "") {
					alert("Digite seu nome!");
					nome.focus();
					return false;
				}
				if(email.val() == "") {
					alert("Digite seu e-mail!");
					email.focus();
					return false;
				}
				if(coment.val() == "") {
					alert("Digite seu comentÃ¡rio!");
					coment.focus();
					return false;
				}
				else {
					comentar($(this), $(this).attr("action"), "#resposta-comentarios");
					return false;
				}
			}
		);
		
		$("#comentar-foto").submit(
			function() {
				var nome = $("#cnome");
				var email = $("#cemail");
				var coment = $("#comentario");
				
				if(nome.val() == "") {
					alert("Digite seu nome!");
					nome.focus();
					return false;
				}
				if(email.val() == "") {
					alert("Digite seu e-mail!");
					email.focus();
					return false;
				}
				if(coment.val() == "") {
					alert("Digite seu comentÃ¡rio!");
					coment.focus();
					return false;
				}
				else {
					comentar($(this), $(this).attr("action"), "#resposta-comentarios");
					return false;
				}
			}
		);
		
		$("#comentar-video").submit(
			function() {
				var nome = $("#cnome");
				var email = $("#cemail");
				var coment = $("#comentario");
				
				if(nome.val() == "") {
					alert("Digite seu nome!");
					nome.focus();
					return false;
				}
				if(email.val() == "") {
					alert("Digite seu e-mail!");
					email.focus();
					return false;
				}
				if(coment.val() == "") {
					alert("Digite seu comentÃ¡rio!");
					coment.focus();
					return false;
				}
				else {
					comentar($(this), $(this).attr("action"), "#resposta-comentarios");
					return false;
				}
			}
		);
		
		$("#comentar-mp3").submit(
			function() {
				var nome = $("#cnome");
				var email = $("#cemail");
				var coment = $("#comentario");
				
				if(nome.val() == "") {
					alert("Digite seu nome!");
					nome.focus();
					return false;
				}
				if(email.val() == "") {
					alert("Digite seu e-mail!");
					email.focus();
					return false;
				}
				if(coment.val() == "") {
					alert("Digite seu comentÃ¡rio!");
					coment.focus();
					return false;
				}
				else {
					comentar($(this), $(this).attr("action"), "#resposta-comentarios");
					return false;
				}
			}
		);
		
		$("#comentar-noticia").submit(
			function() {
				var nome = $("#cnome");
				var email = $("#cemail");
				var coment = $("#comentario");
				
				if(nome.val() == "") {
					alert("Digite seu nome!");
					nome.focus();
					return false;
				}
				if(email.val() == "") {
					alert("Digite seu e-mail!");
					email.focus();
					return false;
				}
				if(coment.val() == "") {
					alert("Digite seu comentÃ¡rio!");
					coment.focus();
					return false;
				}
				else {
					comentar($(this), $(this).attr("action"), "#resposta-comentarios");
					return false;
				}
			}
		);
		/* FIM COMENTÃRIOS */
		
		/* CADASTRO */
		$("#cadastrar").submit(
			function() {
				var nome = $("#nome");
				var email = $("#email");
                 var rg = $("rg");
				var login = $("login");
				var idade = $("#idade");
				var cidade = $("#cidade");
				var estado = $("#estado");
				var pergunta = $("#pergunta");
				if(nome.val() == "") {
					alert("Digite seu nome!");
					nome.focus();
					return false;
				}
				if(rg.val() == "") {
					alert("Digite seu RG ele será sua identificação para receber convites VIPS ou participar das promoções do site!");
					rg.focus();
					return false;
				}
				
				if(idade.val() == "") {
					alert("Digite sua Idade!");
					idade.focus();
					return false;
				}
				
				if(login.val() == "") {
					alert("Digite Um Login para acesso ao site!");
					login.focus();
					return false;
				}
				
				if(email.val() == "") {
					alert("Digite seu e-mail!");
					email.focus();
					return false;
				}
				if(cidade.val() == "") {
					alert("Informe a cidade!");
					cidade.focus();
					return false;
				}
				if(estado.val() == "nulo") {
					alert("Selecione o estado!");
					estado.focus();
					return false;
				}
				if(pergunta.val() != 4) {
					alert("A resposta certa Ã© 4!");
					pergunta.focus();
					return false;
				}
				else {
					cadastro($(this), $(this).attr("action"));
					return false;
				}
			}
		);
		/* FIM CADASTRO */
				/* CADASTRO */
		$("#nafoto").submit(
			function() {
				var nome = $("#nome");
				var email = $("#email");
                 var rg = $("rg");
				var login = $("login");
				var idade = $("#idade");
				var cidade = $("#cidade");
				var estado = $("#estado");
				var pergunta = $("#pergunta");
	
		
nafoto($(this), $(this).attr("action"));
					return false;
				}
		);
		/* FIM CADASTRO */
		
		/* INDICAÃ‡ÃƒO SITE */
		$("a#indicar").click(
			function() {
				var janela = $("#formulario-indicacao");
				
				$.blockUI({
					message: "<img src='imagens/carregando-janela.gif' />",
					css: {
						background: "none",
						top: "50%",
						left: "48%",
						width: "4%",
						border: "none"
					}
				});
				
				setTimeout(	
					function() {
						$.blockUI({
							message: janela,
							css: {
								top: "50%",
								left: "50%",
								marginTop: "-175px",
								marginLeft: "-195px",
								width: "370px",
								height: "350px",
								padding: "10px",
								paddingBottom: "5px",
								border: "none",
								cursor: "auto"
							}
						});
					},
					2000
				)
				
				return false;
			}
		);
				/* INDICAÃ‡ÃƒO SITE */
		$("a#indique").click(
			function() {
				var janela = $("#indique");
				
				$.blockUI({
					message: "<img src='imagens/carregando-janela.gif' />",
					css: {
						background: "none",
						top: "50%",
						left: "48%",
						width: "4%",
						border: "none"
					}
				});
				
				setTimeout(	
					function() {
						$.blockUI({
							message: janela,
							css: {
								top: "50%",
								left: "50%",
								marginTop: "-175px",
								marginLeft: "-195px",
								width: "370px",
								height: "350px",
								padding: "10px",
								paddingBottom: "5px",
								border: "none",
								cursor: "auto"
							}
						});
					},
					2000
				)
				
				return false;
			}
		);
		
		$("a#fechar-janela-indicacao").click(
			function() {
				$.unblockUI();
				return false;
			}
		)
		
		$("#indicar-site").submit(
			function() {
				alert("ok");
				return false;
			}
		)
		/* FIM INDICAÃ‡ÃƒO SITE */
		
		/* INDICAÃ‡ÃƒO PÃGINA */
		$("form.indicacao").submit(
			function() {
				var form = $(this).attr("id");
				var nome = $("#" + form + " #nome");
				var email = $("#" + form + " #email");
				var nome_amigo = $("#" + form + " #nome_amigo");
				var email_amigo = $("#" + form + " #email_amigo");
				
				if(nome.val() == "") {
					alert("Informe seu nome!");
					nome.focus();
					return false;
				}
				if(email.val() == "") {
					alert("Informe seu e-mail!");
					email.focus();
					return false;
				}
				if(nome_amigo.val() == "") {
					alert("Informe o nome do(a) amigo(a)!");
					nome_amigo.focus();
					return false;
				}
				if(email_amigo.val() == "") {
					alert("Informe o e-mail do(a) amigo(a)!");
					email_amigo.focus();
					return false;
				}
				else {
					indicar(form, $(this).attr("action"));
					return false;
				}
			}
		);
		/* FIM INDICAÃ‡ÃƒO PÃGINA */
		
		/* @-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@- */
		
		/* DIVULGAR EVENTO */
		$("#divulgar-evento").submit(
			function() {
				tinyMCE.triggerSave();
				var evento = $("#evento");
				var dia = $("#dia");
				var mes = $("#mes");
				var ano = $("#ano");
				var cidade = $("#cidade");
				var estado = $("#estado");
				var contato = $("#email_contato");
				var pergunta = $("#pergunta");
				
				if(evento.val() == "") {
					alert("Informe o nome do evento!");
					evento.focus();
					return false;
				}
				if(dia.val() == "nulo" || mes.val() == "nulo" || ano.val() == "nulo") {
					alert("Selecione a data do evento!");
					dia.focus();
					return false;
				}
				if(cidade.val() == "") {
					alert("Informe a cidade!");
					cidade.focus();
					return false;
				}
				if(estado.val() == "nulo") {
					alert("Selecione o estado!");
					estado.focus();
					return false;
				}
				if(contato.val() == "") {
					alert("Informe um e-mail para contato!");
					contato.focus();
					return false;
				}
				if(pergunta.val() != "" && pergunta.val() != 4) {
					alert("A resposta certa Ã©: 4");
					pergunta.focus();
					return false;
				}
				else {
					cadastrarEvento($(this), $(this).attr("action"));
					return false;
				}
			}
		)
		/* FIM DIVULGAR EVENTO */
		
		/* @-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@-@- */
		
		/* CONTATO */
		$("#contato").submit(
			function() {
				var nome = $("#nome");
				var email = $("#email");
				var tel = $("#tel");
				var cidade = $("#cidade");
				var estado = $("#estado");
				var assunto = $("#assunto");
				var msg = $("#msg");
				
				if(nome.val() == "") {
					alert("Informe seu nome!");
					nome.focus();
					return false;
				}
				if(email.val() == "") {
					alert("Informe seu e-mail!");
					email.focus();
					return false;
				}
				if(tel.val() == "") {
					alert("Informe um telefone para contato!");
					tel.focus();
					return false;
				}
				if(cidade.val() == "") {
					alert("Informe o nome da cidade!");
					cidade.focus();
					return false;
				}
				if(estado.val() == "nulo") {
					alert("Selecione o estado!");
					estado.focus();
					return false;
				}
				if(assunto.val() == "") {
					alert("Informe o assunto!");
					assunto.focus();
					return false;
				}
				if(msg.val() == "") {
					alert("Digite uma mensagem!");
					msg.focus();
					return false;
				}
				else {
					enviar($(this), $(this).attr("action"));
					return false;
				}
			}
		);
		/* FIM CONTATO */
	}
);


///////////
		$("a.mostra-banner").click(
			function() {
				var jan = $("#banner");
				var cid = $(this).attr("id");
				var gal = "fotos/banner.php?cid=" + cid;
				var evento = $(this).attr("rel");
				
				$.blockUI({
					message: "<img src='imagens/carregando-janela.gif' />",
					css: {
						background: "none",
						top: "50%",
						left: "48%",
						width: "4%",
						border: "none"
					}
				});
				
				$.ajax({
					url: gal,
					type: "get",
					success: function() {
						$("#abrebanner").load(gal);
						setTimeout(	
							function() {
								$.blockUI({
									message: jan,
									css: {
										top: "50%",
										border: "none"
									}
								});
							},
							2000
						)
					}
				});
				
				return false;
			}
		);


	 function init(){
	 carregaAjax('usuarios_pro.php?t=0&pq=2', 0, 'coluna-direita');
 }