$(document).ready(function(){

	

	//alterna as cores da lista de depoimentos

	$('.depoimentos li:odd').addClass('czdep');						   

	

	//Controla o abrir e fechar das orientações

	$('.orient  h1').toggle(function(){

		$(this).removeClass('mais').addClass('menos');							 

		$(this).next('p').show('slow');

			

	},function(){

		$(this).removeClass('menos').addClass('mais');

		$(this).next('p').hide('slow');

		

			

	});

	

	/*****************************************************************

				LIVRO DE OURO

	******************************************************************/

		//esconde todos os livros menos o de 2011

		$('.folhas2006 , .folhas2007 , .folhas2008 , .folhas2009').hide();

		

		//define qual aba será exibida

		$('#abas img').click(function(){
		

			if($(this).hasClass('livro2011')){				

				$(this).css('margin-top' , '0px');

				$('#abas img').not(this).css('margin-top' , '8px');

				

				$('.folhas2011').fadeIn();

				$('.folhas2009 , .folhas2008 , .folhas2007 , .folhas2006').hide();

			

			}
			

			if($(this).hasClass('livro2009')){				

				$(this).css('margin-top' , '0px');

				$('#abas img').not(this).css('margin-top' , '8px');

				

				$('.folhas2009').fadeIn();

				$('.folhas2011 , .folhas2008 , .folhas2007 , .folhas2006').hide();

			

			}

			else if($(this).hasClass('livro2008')){

				$(this).css('margin-top' , '0px');

				$('#abas img').not(this).css('margin-top' , '8px');

				

				$('.folhas2008').fadeIn();

				$('.folhas2011 , .folhas2009 , .folhas2007 , .folhas2006').hide();

				

			}

			else if($(this).hasClass('livro2007')){

				$(this).css('margin-top' , '0px');

				$('#abas img').not(this).css('margin-top' , '8px');

				

				$('.folhas2007').fadeIn();

				$('.folhas2011 , .folhas2009 , .folhas2008 , .folhas2006').hide();

				

			}

			else if($(this).hasClass('livro2006')){

				$(this).css('margin-top' , '0px');

				$('#abas img').not(this).css('margin-top' , '8px');

				

				$('.folhas2006').fadeIn();

				$('.folhas2011 , .folhas2009 , .folhas2008 , .folhas2007').hide();

			

			}

			else{		

			}					   

		});//fim abas

		

		//define display:none para os tipos de textos

		$('.folha_redacoes , .folha_poemas , .folha_txt_teatrais').hide();

	
				//define qual das folhas sera exibida(2011)

		$('.folhas2011 ul#folha_esq li').click(function(){

		

			//alert('li');

		

		$('ul.embranco').hide();				 

		

		if($(this).hasClass('redacoes')){			

			$('.folha_poemas , .folha_txt_teatrais').hide();

			$('ul.folha_redacoes').fadeIn('slow');			

		}

		else if($(this).hasClass('poemas')){			

			$('.folha_redacoes , .folha_txt_teatrais').hide();

			$('ul.folha_poemas').fadeIn('slow');		

		}

		else if($(this).hasClass('txt_teatrais')){			

			$('.folha_redacoes , .folha_poemas').hide();

			$('ul.folha_txt_teatrais').fadeIn('slow');			

		}

		else {	

				$('.folha_redacoes , .folha_poemas , .folha_txt_teatrais').hide();

				$('ul.embranco').fadeIn('slow');

		}		

		});//fim 2011
	

		//define qual das folhas sera exibida(2009)

		$('.folhas2009 ul#folha_esq li').click(function(){

		

			//alert('li');

		

		$('ul.embranco').hide();				 

		

		if($(this).hasClass('redacoes')){			

			$('.folha_poemas , .folha_txt_teatrais').hide();

			$('ul.folha_redacoes').fadeIn('slow');			

		}

		else if($(this).hasClass('poemas')){			

			$('.folha_redacoes , .folha_txt_teatrais').hide();

			$('ul.folha_poemas').fadeIn('slow');		

		}

		else if($(this).hasClass('txt_teatrais')){			

			$('.folha_redacoes , .folha_poemas').hide();

			$('ul.folha_txt_teatrais').fadeIn('slow');			

		}

		else {	

				$('.folha_redacoes , .folha_poemas , .folha_txt_teatrais').hide();

				$('ul.embranco').fadeIn('slow');

		}		

		});//fim 2009

		

		//define qual das folhas sera exibida(2008)

		$('.folhas2008 ul#folha_esq li').click(function(){

		$('ul.embranco').hide();				 

		

		if($(this).hasClass('redacoes')){			

			$('.folha_poemas , .folha_txt_teatrais').hide();

			$('ul.folha_redacoes').fadeIn('slow');			

		}

		else if($(this).hasClass('poemas')){			

			$('.folha_redacoes , .folha_txt_teatrais').hide();

			$('ul.folha_poemas').fadeIn('slow');		

		}

		else if($(this).hasClass('txt_teatrais')){			

			$('.folha_redacoes , .folha_poemas').hide();

			$('ul.folha_txt_teatrais').fadeIn('slow');			

		}

		else {			

				$('ul.embranco').fadeIn('slow');

		}		

		});//fim 2008

		

		//define qual das folhas sera exibida(2007)

		$('.folhas2007 ul#folha_esq li').click(function(){

		$('ul.embranco').hide();				 

		

		if($(this).hasClass('redacoes')){			

			$('.folha_poemas , .folha_txt_teatrais').hide();

			$('ul.folha_redacoes').fadeIn('slow');			

		}

		else if($(this).hasClass('poemas')){			

			$('.folha_redacoes , .folha_txt_teatrais').hide();

			$('ul.folha_poemas').fadeIn('slow');		

		}

		else if($(this).hasClass('txt_teatrais')){			

			$('.folha_redacoes , .folha_poemas').hide();

			$('ul.folha_txt_teatrais').fadeIn('slow');			

		}

		else {			

				$('ul.embranco').fadeIn('slow');

		}		

		});//fim 2007

		

		//define qual das folhas sera exibida(2006)

		$('.folhas2006 ul#folha_esq li').click(function(){

		$('ul.embranco').hide();				 

		

		if($(this).hasClass('redacoes')){			

			$('.folha_poemas , .folha_txt_teatrais').hide();

			$('ul.folha_redacoes').fadeIn('slow');			

		}

		else if($(this).hasClass('poemas')){			

			$('.folha_redacoes , .folha_txt_teatrais').hide();

			$('ul.folha_poemas').fadeIn('slow');		

		}

		else if($(this).hasClass('txt_teatrais')){			

			$('.folha_redacoes , .folha_poemas').hide();

			$('ul.folha_txt_teatrais').fadeIn('slow');			

		}

		else {			

				$('ul.embranco').fadeIn('slow');

		}		

		});//fim 2007

	



	/******************************************************************	

				FUNÇÃO TANHANHO DE FONTE	 

	******************************************************************/

	//O Script afeta <p>, elementos com id='texto' e class="txt".

	

	$('.iconefonte').click(function(){

										 

		if( $(this).hasClass('amais') && $(this).hasClass('fpadrao') ){

			

			$('.iconefonte').removeClass('fpadrao').addClass('f14');

					

			$('#conteiner_interna').find('p , #texto, .txt').fadeOut('fast');

			setTimeout(function(){

					$('#conteiner_interna').find('p , #texto , .txt').addClass('fonte14');					

				 }, 150);

			$('#conteiner_interna').find('p , #texto , .txt').fadeIn();						

		}

		else if( $(this).hasClass('amais') && $(this).hasClass('f14') ){

			

			$('.iconefonte').removeClass('f14').addClass('f16');

						

			$('#conteiner_interna').find('p , #texto , .txt').fadeOut('fast');

			setTimeout(function(){

					$('#conteiner_interna').find('p , #texto , .txt').removeClass('fonte14').addClass('fonte16');					

				 }, 150);

			$('#conteiner_interna').find('p , #texto , .txt').fadeIn();			

		}

		else if( $(this).hasClass('amais') && $(this).hasClass('f16') ){

			 

			 $('.iconefonte').removeClass('f16').addClass('f18');			

			 

			 $('#conteiner_interna').find('p , #texto , .txt').fadeOut('fast');

			setTimeout(function(){

					$('#conteiner_interna').find('p , #texto , .txt').removeClass('fonte16').addClass('fonte18');					

				 }, 150);

			$('#conteiner_interna').find('p , #texto , .txt').fadeIn();			

			}			

			else {

			//amenos

			

			if( $(this).hasClass('amenos') && $(this).hasClass('f18') ){

			

				$('.iconefonte').removeClass('f18').addClass('f16');

								

				 $('#conteiner_interna').find('p , #texto , .txt').fadeOut('fast');

				 setTimeout(function(){

							$('#conteiner_interna').find('p , #texto , .txt').removeClass('fonte18').addClass('fonte16');					

				  			 }, 150);

				$('#conteiner_interna').find('p , #texto , .txt').fadeIn();				

			}

			else if( $(this).hasClass('amenos') && $(this).hasClass('f16') ){

				

				$('.iconefonte').removeClass('f16').addClass('f14');

								

				$('#conteiner_interna').find('p , #texto , .txt').fadeOut('fast');

				 setTimeout(function(){

							$('#conteiner_interna').find('p , #texto , .txt').removeClass('fonte16').addClass('fonte14');					

				  			 }, 150);

				$('#conteiner_interna').find('p , #texto , .txt').fadeIn();				

			}

			else if( $(this).hasClass('amenos') && $(this).hasClass('f14') ){

				

				$('.iconefonte').removeClass('f14').addClass('fpadrao');				

				

				$('#conteiner_interna').find('p , #texto , .txt').fadeOut('fast');

				 setTimeout(function(){

							$('#conteiner_interna').find('p , #texto , .txt').removeClass('fonte14');					

				  			 }, 150);

				$('#conteiner_interna').find('p , #texto , .txt').fadeIn();	

				

			}			

			}			

							 	

	});//fim da função tamanho de fonte

	

	/********************************************************************************

									PLUGIN lightBox

	********************************************************************************/

	$('a.lightbox').lightBox(); //Seleciona todos os links com a class 'lightbox'.

						   



});//***FIM













function MostrarData() { 



Hoje = new Date() 

Data = Hoje.getDate() 

Dia = Hoje.getDay() 

Mes = Hoje.getMonth() 

Ano = Hoje.getFullYear() 



if (Data<10) { 



  Data = "0" + Data

}

if (Ano < 2000) { 



  Ano = "19" + Ano

} 



NomeDia = new Array(7) 



NomeDia[0] = "Domingo" 

NomeDia[1] = "Segunda-feira" 

NomeDia[2] = "Ter&ccedil;a-feira" 

NomeDia[3] = "Quarta-feira" 

NomeDia[4] = "Quinta-feira" 

NomeDia[5] = "Sexta-feira" 

NomeDia[6] = "S&aacute;bado" 

 

NomeMes = new Array(12) 



NomeMes[0] = "Janeiro" 

NomeMes[1] = "Fevereiro" 

NomeMes[2] = "Mar&ccedil;o" 

NomeMes[3] = "Abril" 

NomeMes[4] = "Maio" 

NomeMes[5] = "Junho" 

NomeMes[6] = "Julho" 

NomeMes[7] = "Agosto" 

NomeMes[8] = "Setembro" 

NomeMes[9] = "Outubro" 

NomeMes[10] = "Novembro" 

NomeMes[11] = "Dezembro" 



return  NomeDia[Dia] + ", " + Data + " de " + NomeMes[Mes] + " de " + Ano + "."  

}
