// scroll the logos
function scrollLogos(pos, direction) {
  // setup the parameters
  var count = $('#logolist li').length; // count the number of logos
  var size  = 116;                      // the size of each step
  var speed = 2700;                     // 2700ms per icon

  // set the pos in the list
  pos = pos + (direction ? 1 : -1);
  
  // if at beginning
  if (pos <= 1)
    direction = true;
  // if at end
  if (pos > count - 4) // 4 on screen at once
    direction = false;

  // setup the css amount
  var cssamount = (direction == true ? "-=" : "+=") + size + "px"; 
  
  // do the animation then start again
  $("#logolist").animate({"left": cssamount}, speed, function() { scrollLogos(pos, direction); } );
}
