$(document).ready(function() {
	
	$('.scroll').click(function(e) {
	
		var elementClicked = $(this).attr("href");

		if( $(elementClicked).offset().top ) {
			var destination = $(elementClicked).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 );
		}

		e.preventDefault();

	});
	
	var c = 0;
	$('.featured-items').everyTime("5s", function() {
		
		$(this).animate({'top': '-=140px'}, 'slow', function(){
			
			var item = $('.featured-item:eq(' + c + ')').clone(true).appendTo('.featured-items');
			c++;
			
		});
		
	});

});
