$(document).ready(function(){
	//-----------------------------------------------------------------------
	//nova janela				   
	$("a[rel*=paginaExterna]").attr('target','_blank');
	//-----------------------------------------------------------------------
	//Validação de Formulário
	if($("form[class*=validateForm]").length > 0) {
		$("form.validateForm").validate({errorElement: "p"});
		$("form.validateForm #formContato_nome, #formContato_empresa, #formContato_telefone, #formContato_email, textarea").focus( function() { $(this).css({border: "1px solid #FF0000"}); } ).blur( function() { $(this).css({border: "1px solid #C3C7CB"}); } );
	} //if form existe
	$('#btLimpar').click(function(){
		//Limpa mensagem validaçao
		$("#formContato").validate().resetForm();
	});
	//-----------------------------------------------------------------------
	// Zoom Imgs Eventos
	/*$("a[class*=btThumbEvento]").click(function(){
		//Marca imagem já visitada
		$("a[class*=btThumbEvento_hover]").fadeTo("slow", 0.6).attr("class", "btThumbEvento");
		//Esconde
		$(this).attr("class", "btThumbEvento_hover").fadeTo("slow", 0.4);
		return false;
	});*/
	
	$("a[rel*=zoomImgEvento]").click(function(){
											  
		$("a[class*=btThumbEvento_hover]").fadeTo("slow", 0.85).attr("class", "btThumbEvento");
		//Esconde
		$(this).attr("class", "btThumbEvento_hover").fadeTo("slow", 0.4);
		
		//Variaveis
		var urlImagemZoom = $(this).attr("href");
		var nomeEvento = $(this).attr("title");
		//Esconde imagem atual
		$("#boxEventoZoomImagem").fadeTo("slow", 0, function(){
			//Carrega img loading
			$("#boxEventoZoomImagem").html('<div id="imgLoadingZoomEvento"><img src="Imgs/loading.gif" alt="Carregando..." title="Aguarde!" /></div>').fadeTo("slow", 1);
			//Ajax
        	$.ajax({
                url: urlImagemZoom,
                type: 'GET',
                beforeSend: function() {
                },
                complete: function() {
					$("#boxEventoZoomImagem").fadeTo("slow", 0, function(){
						//Coloca tag no html
						$("#boxEventoZoomImagem").html('<img id="imgZoomEvento" src="'+urlImagemZoom+'" alt="" title="'+nomeEvento+'" />');
						//retorna alpha 100
						$("#boxEventoZoomImagem").fadeTo("slow", 1)
					}); //fim anime
                }
        	})
		});
		return false;
	});
	$("a[class*=btThumbEvento_hover]").fadeTo("slow", 0.4);
	//-----------------------------------------------------------------------
	
	//ShadowBox
	Shadowbox.init({
		overlayOpacity: 0.75
	});
	
}); //Fim

	/* SHADOWBOX */
	//Configurações ShadowBox
	Shadowbox.loadSkin('byBCK', 'Js/shadowBox/skin');
	Shadowbox.loadLanguage('pt-BR', 'Js/shadowBox/lang');
	Shadowbox.loadPlayer(['img'], 'Js/shadowBox/player');