﻿var $j = jQuery.noConflict();

function equalHeight(group) {
  var tallest = 0;
  group.each(function () {
    var thisHeight = $j(this).height();
    if (thisHeight > tallest) {
      tallest = thisHeight;
    }
  }
  );
  group.height(tallest);
}

$j(document).ready(function () {
  if ($j('ul.ultimas-noticias li').length > 0) {
    equalHeight($j('ul.ultimas-noticias li'));
  }
  
  if ($j('dl.gallery-item').length > 0) {
    $j('dl.gallery-item a').attr( { rel: 'prettyPhoto[galeria]' } ).prettyPhoto( { theme: 'light_square' } );
  }
  
  $j('#menu li').hover(function () {
    $j(this).addClass('hover');
    },
    function () {
      $j(this).removeClass('hover');
  });
  
  if ($j('.home #text-3').length > 0) {
    $j('.home #text-3').fadeIn(1000);
    
    $j('.home #text-3 a').click(function(){
      $j('.home #text-3').hide();
      return false;
    });
    
    $j('.home #countdown_dashboard').countDown({
      targetDate: {
          'day':      14,
          'month':    10,
          'year':     2010,
          'hour':     0,
          'min':      0,
          'sec':      0
      }
    });
  }
});