var slideshow = function() {

  var list = $('div.player ul.slideshow'),
      timer = {timeout: 3000};
      
  timer.start = function() {
    timer.time = setInterval("advance_home_slideshow()", this.timeout);
  };
  
  var advance = function() {
    $('div.flash ul.slideshow li').last().fadeOut(function() {
      $(this).prependTo(list).show();
    });
  };
  
  this.advance_home_slideshow = advance;
  
  timer.start();
};

var slideshow_flash = function() {
  var wrapper = $('div.flash'),
      list = $('div.flash ul.slideshow');
  
  var button = $('<a>', {
    'class': 'flash_button',
    click: function() {
      var vid = $('object#homeVideo')[0];
      
      list.hide();
      $(this).hide();
      vid.goPlay();
    }
  }).appendTo(wrapper);
  
};

$(function() {
  slideshow();
  // slideshow_flash();
});
