function rotateBanner(pic) {
    pics = new Array();
    pics[0] = '20-percent-off-gloves-360.png';
    pics[1] = 'download-catalogue.png';
    
    links = new Array();
    links[0] = '/section/Gloves';
    links[1] = '/download-catalogue.php';
    
    a = document.getElementById('head-banner');
    a.href = links[pic];
    img = a.firstChild;
    img.src = '/images/' + pics[pic];
    
    pic++;
    if(pic==2) { pic=0; }
    
    setTimeout('rotateBanner(' + pic + ')', 5000);
}

function rotateFreebies(pic) {
    pics = new Array();
    pics[0] = 'banners/spend-40.png';
    pics[1] = 'banners/spend-90.png';
    pics[2] = 'banners/spend-150.png';
    
    links = new Array();
    links[0] = '/product/48/F1+Gripper';
    links[1] = '/product/240/POW+OS+T-Shirt';
    links[2] = '/product/8/Classic+Gym+Bag';
    
    a = document.getElementById('freebie-banner');
    if(!a) { return; }
    a.href = links[pic];
    img = a.firstChild;
    img.src = '/images/' + pics[pic];
    
    pic++;
    if(pic==3) { pic=0; }
    
    setTimeout('rotateFreebies(' + pic + ')', 4000);
}

function doOnload() {
  $('.team_pow_scroll_container').marquee('pointer').mouseover(function () {
    $(this).trigger('stop');
  }).mouseout(function () {
    $(this).trigger('start');
  }).mousemove(function (event) {
    if ($(this).data('drag') == true) {
      this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
    }
  }).mousedown(function (event) {
    $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
  }).mouseup(function () {
    $(this).data('drag', false);
  });
  setTimeout('rotateBanner(1)', 5000);
  setTimeout('rotateFreebies(1)', 4000);
}

