$(document).ready(function() {
/*--------------Banner's----------------*/
  $('#Banner1').cycle({
    fx: 'fade',
    speed: 3000,
    timeout: 7500
  });  
  $('#Banner2').cycle({
    fx: 'scrollRight', 
    speed: 1000,
    timeout: 5000    
  });
  $('#Banner3').cycle({
    fx: 'fade',
    speed: 2000,
    timeout: 7000
  });
  $('#Memb').cycle({
    fx: 'fade',
      speed: 1600,
    timeout: 6000
  });


jQuery(document).ready(function() {
  jQuery('ul#Members').jcarousel({
    auto: 2,
    wrap: "circular",
    scroll: 1
    
    
  });
});



/*--------------END Banner's------------*/
  
$('#slideshow').cycle({ 
    fx:     'turnDown', 
    speed:  'fast', 
    timeout: 7000, 
    pager:  '#nav',   
    pagerAnchorBuilder: function(idx, slide) {
        return '#nav li:eq(' + idx + ') a'; 
    }     
});
  

//ANIMATION HOME
  
  $('#tabs').tabs({fx:{opacity: "show"}}).tabs("rotate", 5000, true);
  
//ANIMATION END
  
//SUPERFISH
  $('ul.sf-menu').superfish();
//SUPERFISH
  
//FONT SIZE RESET
  
 // Reset Font Size
 var originalFontSize = $('div#Contenido').css('font-size');
   $(".resetFont").click(function(){
   $('div#Contenido').css('font-size', originalFontSize);
 });
  
 // Increase Font Size
 $(".increaseFont").click(function(){
   var currentFontSize = $('div#Contenido').css('font-size');
   var currentFontSizeNum = parseFloat(currentFontSize, 10);
   var newFontSize = currentFontSizeNum*1.2;
     $('div#Contenido').css('font-size', newFontSize);
     return false;
 });
  
 // Decrease Font Size
 $(".decreaseFont").click(function(){
   var currentFontSize = $('div#Contenido').css('font-size');
   var currentFontSizeNum = parseFloat(currentFontSize, 10);
   var newFontSize = currentFontSizeNum*0.8;
     $('div#Contenido').css('font-size', newFontSize);
     return false;
 });
  
//PIROBOX
$().piroBox_ext({
    piro_speed : 700,
    bg_alpha : 0.5,
    piro_scroll : true // pirobox always positioned at the center of the page
});
  
//GALERIA DE FOTOS
$("ul.thumb li").hover(function() {
    $(this).css({'z-index' : '10'});
    $(this).find('span.p').css({'z-index' : '11','visibility' : 'visible'}).stop().animate({
        left: '-30px',
        bottom: '-24px',
        width: '164px'
    }, 200);
    $(this).find('img.fl').addClass("hover").stop()
      .animate({
        marginTop: '-110px', 
        marginLeft: '-110px', 
        top: '50%', 
        left: '50%', 
        width: '174px', 
        height: '174px',
        padding: '20px' 
      }, 200);
    
    } , function() {
    $(this).css({'z-index' : '0'});
    $(this).find('span.p').css({'z-index' : '0','visibility' : 'hidden'}).stop().animate({
        left: '6px',
        bottom: '14px',
        width: '90px'
    });
    $(this).find('img.fl').removeClass("hover").stop()
      .animate({
        marginTop: '0', 
        marginLeft: '0',
        top: '0', 
        left: '0', 
        width: '100px', 
        height: '100px', 
        padding: '5px'
      }, 400);
});
 /*************************
 CONTADOR DE EVENTOS
*************************/

    (function($) {

  $.countdown.regional['es'] = {

    labels: ['Años', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'],

    labels1: ['Años', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'],

    compactLabels: ['a', 'm', 's', 'g'],

    whichLabels: null,

    timeSeparator: ':', isRTL: false};

  $.countdown.setDefaults($.countdown.regional['es']);

})(jQuery);
  

  
  
  /*CONTADORES*/
  


//CUENTA 1
$(function () {
  var elemento = $('#contador div.content');
  var ano =  elemento.attr("ano");
  var mes =  elemento.attr("mes");
  var dia =  elemento.attr("dia");
      
    
  var austDay = new Date();
  austDay = new Date(ano, mes-1, dia);
  elemento.countdown({until: austDay});

});
  
});
