
//Prossima gara
var anno = 2009;
var mese = 10 -1;
var giorno = 11;
var ora = 9;
var austDay = new Date(anno, mese, giorno, ora);

// Sezione avvisi - prossime gare
$(document).ready(function()
{
  //Fade testa
  $('#slideshow').cycle({ 
    timeout:       10000
  });

  // sezione NEXT RACE
  $(".race_body").hide();
  $(".race_head").toggle(function(){
  $(this).next(".race_body").slideDown(200);
  }, function(){
  $(this).next(".race_body").slideUp(300);
  });

  // MENU GARE
  $("#menu_inner1").hide();
  $(".menu_plus1").click(function(){
	$("#menu_inner1").slideToggle("slow");
	return false;//prevent to slide on top  
  });
  $("#menu_inner1 li a").click(function(){
    window.location=$(this).attr("href");
  });

  // MENU ALLENAMENTO
  $("#menu_inner2").hide();
  $(".menu_plus2").click(function(){
	$("#menu_inner2").slideToggle("slow");
	return false;//prevent to slide on top  	
  });
  $("#menu_inner2 li a").click(function(){
    window.location=$(this).attr("href");
  });

  // COUNTDOWN    
  $('#defaultCountdown').countdown({until:austDay,format:'dHMS'});

  //Gallery overlay
  $('#thumbs a').overlay({
      target: '#gallery',
      expose: '#111' 
  }).gallery({    
      speed: 800,
      template:'<strong>${title}</strong>'
  });

  //Overlay Top Team
  $('a.overlay').overlay();

});

(function($) {
	$.countdown.regional['it'] = {
		labels: ['Anni', 'Mesi', 'Settimane', 'Giorni', 'Ore', 'Minuti', 'Secondi'],
		labels1: ['Anni', 'Mesi', 'Settimane', 'Giorni', 'Ore', 'Minuti', 'Secondi'],
		compactLabels: ['a', 'm', 's', 'g'],
		timeSeparator: ':', isRTL: false};
	$.countdown.setDefaults($.countdown.regional['it']);
})(jQuery);


// gestione bordi
function bordiRound(){
//Nifty("div#piedipagina","small");
Nifty("div#testa2,div#testa1","same-height");
Nifty("div#colonna2,div#colonna1","same-height");
}