// JavaScript Document

   function  Verselect() 
   { 
	  var Indice = document.dados.Combo1.selectedIndex;
	  var Icombo = document.dados.Combo1[Indice].value;
      carregarVideos(Icombo);
   } 
  
  function exibeFoto(qual)
  {
	document.getElementById('fotoGrande').innerHTML = "<img src='" + qual + "' />"
  }
  
  
  function fechaMenu()
  {
	  $("div[class^='sub']").slideUp('slow');//animate({'height':'0px'}, 'slow', 'easeOutBounce');
  }

  $(document).ready
  (
    function()
	{
	   carregarNoticias();
	   
	   //Esconde os Subitems de Menu
	   $("#menu div.sub1").hide();
   	   $("#menu div.sub2").hide();
	   
	   //Cria efeito de mudar os Itens principais do Menu para fundo vermelho
	   $("div.itemMenu").mouseover( function() { $(this).css({ 'color':'#FFFFFF', 'backgroundColor':'#FF0000' })} );
	   $("div.itemMenu").mouseout( function() { $(this).css({ 'color':'#FFFFFF', 'backgroundColor':'#000066' })} );
	   
	   //Cria efeito de mudar os SubItens do Meni para Amarelo
	   $("div[id^='link_']").mouseover( function() { $(this).css({ 'color':'#ffde00', 'fontWeight':'normal'})} );
	   $("div[id^='link_']").mouseout( function() { $(this).css({ 'color':'#fff', 'fontWeight':'normal'})} );
	   
	   //Clique de um Item principal de Menu
	   $("div.itemMenu").click
	   (
	     function()
		 {
 		    fechaMenu();
		    if ( $(this).next().is('span') == false)
			{
			   $(this).next().animate({'height':'toggle'}, 'slow', function() 
				{ //$("#principal").css('height', $("#menu").position().top + parseInt($("#menu").css('height'))); 
				});
			}
		 }
	   )
	   
	   //Clique de um SubItem de Menu
	   $(".itemMenu2").click
	   (
	     function()
		 {
		    $(this).next().animate({'height':'toggle'}, 'slow');
		 }
	   )
	   	      
		   
	   //Cliques dos Links do Menu
	   $("#link01").click( function() { fechaMenu(); carregarNoticias(); } );
                 $("#link_02_00").click( function() { carregarConteudo('historia.txt'); } );
	   $("#link_02_01").click( function() { carregarArq('diretoria.htm'); } );
	   $("#link_02_02").click( function() { carregarConteudo('representatividade.txt'); } );
	   $("#link_02_03").click( function() { carregarConteudo('sede.txt'); } );
	   $("#link_02_04").click( function() { carregarConteudo('subSede.txt'); } );
	   
	   $("#link_03_00").click( function() { carregarConteudo('servicos.txt'); } );
	   $("#link_03_01_00").click( function() { carregarConteudo('juridico.htm'); } );
	   $("#link_03_01_01").click( function() { carregarConteudo('legislacao.htm'); } );
	   $("#link_03_02_01").click( function() { carregarConteudo('medico.txt'); } );
	   $("#link_03_02_02").click( function() { carregarConteudo('odontologico.txt'); } );
	   $("#link_03_02_03").click( function() { carregarConteudo('ambulancia.txt'); } );
	   $("#link_03_03").click( function() { carregarConteudo('branco.txt'); } );
	   $("#link_03_04").click( function() { carregarConteudo('convenios.txt'); } );
	   $("#link_03_05").click( function() { carregarConteudo('servicos_auxilio_funeral.txt'); } );
	   $("#link_03_06").click( function() { carregarConteudo('servicos_saude.txt'); } );
	   
	   $("#link_04_01").click( function() { carregarConteudo('social_aposentados.txt'); } );
	   $("#link_04_02").click( function() { carregarArq('social_aniversariantes.htm'); } );
	   $("#link_04_03").click( function() { carregarConteudo('confraternizacoes.txt'); } );
	   
	   $("#link_05_01").click( function() { carregarConteudo('acordos.txt'); } );
	   $("#link_05_02").click( function() { carregarConteudo('dissidios.txt'); } );
	   
	   $("#link_06_01_01").click( function() { carregarArq('datafiles/a_escala_fiscal_ea.htm'); } );
	   $("#link_06_01_02").click( function() { carregarArq('datafiles/a_escala_fiscal_gte.htm'); } );
	   $("#link_06_01_03").click( function() { carregarArq('datafiles/a_escala_guindaste_empilhadeira.htm'); } );
	   $("#link_06_01_04").click( function() { carregarArq('datafiles/a_escala_libra.htm'); } );
	   $("#link_06_01_05").click( function() { carregarArq('datafiles/a_escala_rodrimar.htm'); } );
 	   $("#link_06_01_06").click( function() { carregarArq('datafiles/a_escala_deicmar.htm'); } );
	   $("#link_06_01_07").click( function() { carregarArq('datafiles/a_escala_gbt.htm'); } );
	   
	   $("#link_06_02_01").click( function() { carregarArq('datafiles/p_escala_fiscal_ea.htm'); } );
	   $("#link_06_02_02").click( function() { carregarArq('datafiles/p_escala_fiscal_gte.htm'); } );
	   $("#link_06_02_03").click( function() { carregarArq('datafiles/p_escala_guindaste_empilhadeira.htm'); } );
	   $("#link_06_02_04").click( function() { carregarArq('datafiles/p_escala_libra.htm'); } );
	   $("#link_06_02_05").click( function() { carregarArq('datafiles/p_escala_rodrimar.htm'); } );
 	   $("#link_06_02_06").click( function() { carregarArq('datafiles/p_escala_deicmar.htm'); } );
	   $("#link_06_02_07").click( function() { carregarArq('datafiles/p_escala_gbt.htm'); } );

	   $("#link_07_01").click( function() {  carregarNoticiasCompletas(); } );
	   $("#link_07_02").click( function() {  carregarConteudo('imprensa_jornal.txt'); } );
	   
	   $("#link08").click( function() { carregarArq('fale_conosco.htm'); } );
	   $("#link09").click( function() { carregarArq('links.htm'); } );
	   $("#link10").click( function() { carregarConteudo('video.txt'); } );
	   
	   $("#link11").click( function() { carregarConteudo('mapadosite.txt');  } );
	   
	   localPrincipal = $("#principal").position().left;
	   $("#menu").css('left', localPrincipal );
	   $("#conteudo").css('left', localPrincipal + 190 );

	   
	}
  );
