﻿/// <reference path="jquery-1.3.2.js" />


 
 function ocultarAbas() {
    $("#divAbaNoticias").hide();
    $("#divAbaEventos").hide();
    $("#divAbaDownloads").hide();
    
 }

 function favoritos() {
     
     if ($.browser.opera == false) {
        
         var url = 'http://www.acregospel.com';
         var title = 'ACREGOSPEL';

         if ($.browser.mozilla == true) {
             window.sidebar.addPanel(title, url, '');
             
         } else if ($.browser.msie == true) {
            window.external.AddFavorite(url, title);
            
         } else {
              alert('Use as teclas CTRL + D para adicionar aos favoritos.');
         }
     }
 
 }


 $(document).ready(function() {

     

        $("#abaNoticias").mouseover(
        function() {
        $("#abaEventos").attr("src", "../imagens/btnEventos2.gif");
        $("#abaDownloads").attr("src", "../imagens/btnDownloads2.gif");
        $(this).attr("src", "../imagens/btnNoticias1.gif");
            ocultarAbas();
            $("#divAbaNoticias").fadeIn();

        }
    );

        $("#abaEventos").mouseover(
        function() {
        $("#abaNoticias").attr("src", "../imagens/btnNoticias2.gif");
        $("#abaDownloads").attr("src", "../imagens/btnDownloads2.gif");
        $(this).attr("src", "../imagens/btnEventos1.gif");
            ocultarAbas();
            $("#divAbaEventos").fadeIn();

        }
    );

        $("#abaDownloads").mouseover(
        function() {
        $("#abaNoticias").attr("src", "../imagens/btnNoticias2.gif");
        $("#abaEventos").attr("src", "../imagens/btnEventos2.gif");
        $(this).attr("src", "../imagens/btnDownloads1.gif");
            ocultarAbas();
            $("#divAbaDownloads").fadeIn();

        }
    );

     function mudaTamanho(objRaiz, Tamanho) {
         $(objRaiz).children().each(function(i) {
             $(this).css({ 'font-size': Tamanho + 'px' });
             mudaTamanho(this, Tamanho);

         });
     }

     var fonte = 11;
     $('#aumenta_fonte').click(function() {
         if (fonte < 14) {
             fonte = fonte + 1;
             mudaTamanho('#conteudos', fonte);
             // $('#conteudos').css({ 'font-size': fonte + 'px' });
         }
     });
     $('#reduz_fonte').click(function() {
         if (fonte > 9) {
             fonte = fonte - 1;
             mudaTamanho('#conteudos', fonte);
         }
     });

    

 });
