$(function() {
  
  var show = $('#slideshow');
  var interval = 10000;

  setInterval(function() {
      
    var active = show.find('.slide.active');
    var next   = active.next('.slide');
    
    if(!next.length) next = show.find('.slide:first-child');

    next.find('img').css({'left' : 920, 'z-index' : 2}).animate({'left' : 0}, 500, function() {
      next.addClass('active');
    });

    next.find('.text .content').css({'right' : -290, 'z-index' : 2002, 'bottom' : 0}).animate({'right' : 20}, 500);

    active.find('img').css('z-index', 1).animate({'left' : -920}, 700, function() {
      active.removeClass('active');
    });    

    active.find('.text .content').css('z-index', 2001).animate({'bottom' : -500}, 500);
  
  }, interval);
    
});
