function Slide(i) {
	$('div.last').animate({opacity: '0'}, 1000).removeClass('last');
	i.animate({opacity: 1.0}, 1000, function(){
		$(this).find('span').animate({left: '575px', opacity: '1'}, 2000, 'linear', function() {
			$(this).animate({left: '650px'}, 6000, 'linear', function() {
				$(this).animate({left: '675px', opacity: '0'}, 2000, 'linear', function() {
					$(this).animate({left: '550px'}, 1, 'linear' );
					i.removeClass('active');
					i.addClass('last');
					if( i.next('div').length!=0 ) {
						Slide(i.next('div'));
					} else {
						Slide($('div.first'));
					}
				});
			});
		});
	});
}
$(function() {
	Slide($('div.active'));
});

