$(function(){

	foreverScroll($('#photos'), 5);

});
function foreverScroll(container, seconds){
	
	if(container.find('div').size() == 0){
		container.wrapInner('<div />')
		container = container.find('div');
	};
	
	var firstPhoto = container.find('img:first');
	
	container.append(firstPhoto.clone()).animate({'marginTop': ((firstPhoto.height() + 10) * -1)}, (seconds * 1000), 'linear', function(){
		
		container.css('marginTop', 0);
		firstPhoto.remove();
		
		foreverScroll(container, seconds);
		
	});
	
};
