jQuery.noConflict();

jQuery(document).ready(function($){

    if ($('ul#portfolio') != null) {
    $('ul#portfolio').innerfade({
      speed: 1000,
      timeout: 5000,
      type: 'sequence',
      containerheight: '220px'
    });
    }

    function ObtenerSegundosRestantes ()
    {
      TargetDate = "11/05/2010 9:00 AM";
      BackColor = "white";
      ForeColor = "black";
      CountActive = true;
      CountStepper = -1;
      LeadingZero = true;
      DisplayFormat = "Faltan %%D%% días, %%H%% horas, %%M%% minutos, %%S%% segundos para el Congreso";
      FinishMessage = "¡Comenzó el Congreso!";

      var dthen = new Date(TargetDate);
      var dnow = new Date();

      if(CountStepper>0)
        ddiff = new Date(dnow-dthen);
      else
        ddiff = new Date(dthen-dnow);

      gsecs = Math.floor(ddiff.valueOf()/1000);

      return gsecs;
    };

    function obtenerFechaRestante ()
    {
      var gsecs = ObtenerSegundosRestantes();
      var fecha = CountBack(gsecs);

      $('#diascongreso').text(fecha);
    }

    function iniciarTimerFecha ()
    {
       $(document).everyTime (1 * 1000, 'timerFecha', function (i)
       {
         obtenerFechaRestante ();
       });
    }

    iniciarTimerFecha();
  });

