
$(document).ready(function(){
	if ($('.home-bike-rotator').length > 0)
	{		
		setInterval(function() {
			var current = $('.active-image');
			var next = current.prev()
			
			if (next.length == 0) {
				next = $('.home-bike-rotator > a > img').last();
			}
			
			current.removeClass('active-image');
			next.addClass('active-image');
			
			current.fadeOut(1000);
			next.fadeIn(1000);						
			
		}, 5000)
	}
});
