
function getlogos()
{
  var x = 0;
  $("#logos").find('img').each(function(
  ){
    imgs[x] = $(this);
    if (x == 0)
      $(this).show();
    else
      $(this).hide();
    x++;
  });
  //alert(x);
};

function setlogos()
{
  var n = 1;
  if (i > n) i = 0;
  $(imgs[i]).fadeIn(6000);
  if (i == 0)
  {
    $(imgs[n]).delay(3000).fadeOut(1500);
  }
  if (i > 0)
  {
    $(imgs[i-1]).delay(3000).fadeOut(1500);
  }
  //alert(i+' => '+$(imgs[i]).attr('id'));
  i++;
}


function getmarcas()
{
  var x = 0;
  $("#marcas").find('img').each(function(
  ){
    marc[x] = $(this);
    if (x == 0)
      $(this).show();
    else
      $(this).hide();
    x++;
  });
  //alert(x);
};

function setmarcas()
{
  var n = 3;
  if (j > n) j = 0;
  $(marc[j]).fadeIn(4000);
  if (j == 0)
  {
    $(marc[n]).fadeOut(1500);
  }
  if (j > 0)
  {
    $(marc[j-1]).fadeOut(1500);
  }
  //alert(i+' => '+$(imgs[i]).attr('id'));
  j++;
}

var i = 0;
var imgs = {};
var j = 0;
var marc = {};
$(document).ready(function(
){
  getlogos();
  if ($.browser.msie)
  {
    $("#logos").find('img').css('display', 'none');
    $(imgs[0]).css('display', 'block');
  }
  else
  {
    setInterval('setlogos()', 6000);
  }

  getmarcas();
  if ($.browser.msie)
  {
    $("#marcas").find('img').css('display', 'none');
    $(imgs[0]).css('display', 'block');
  }
  else
  {
    setInterval('setmarcas()', 4000);
  }
});

