(function() {
  var images, slider;
  Array.prototype.shuffle = function() {
    return this.sort(function() {
      return 0.5 - Math.random();
    });
  };
  images = ['apg', 'bam', 'bergere', 'boels', 'bsu', 'de-ster', 'huygen', 'SJSJ-volledig', 'infour', 'laumen', 'leeuwenborgh', 'maasgouw', 'manodesign', 'mazon', 'mosae', 'mtb', 'nulvierdrie', 'nummer1', 'rabobank', 'radar', 'rooden', 'sevagram', 'sgl', 'tillie', 'toppresent', 'vivre'];
  slider = $('<div id="inner"></div>');
  $.each(images.shuffle(), function(key, value) {
    var img;
    img = $("<img src=\"http://s3.amazonaws.com/theme.assets/XrpeRT7O8MX4UhjejquVpg/images/sponsors/" + value + ".png\" />");
    return slider.append(img);
  });
  $(window).load(function() {
    var backward, forward, width;
    clearTimeout(window.sponsorTimer);
    slider.appendTo('#sponsors');
    width = 0;
    slider.children().each(function() {
      return width += $(this).outerWidth(true);
    });
    slider.width(width);
    forward = function(el) {
      return el.animate({
        left: "-=" + (width - 960)
      }, width * 12, 'linear', function() {
        return window.sponsorTimer = setTimeout((function() {
          return backward(el);
        }), 1000);
      });
    };
    backward = function(el) {
      return el.animate({
        left: "+=" + (width - 960)
      }, width * 12, 'linear', function() {
        return window.sponsorTimer = setTimeout((function() {
          return forward(el);
        }), 1000);
      });
    };
    return window.sponsorTimer = setTimeout((function() {
      return forward(slider);
    }), 1000);
  });
}).call(this);

