window.addEvent('domready', function() {
		
	var list_container = $('rss_horizzontal');
	var list_items = list_container.getElements('a');
	var list_numbers = list_items.length;
	if(list_container.getElement('ul li'))
		var y_offset = list_container.getElement('ul li').getStyle('height').toInt();
	//N.B.: always set scroll_duration << scroll_period
	var scroll_duration = 1000;
	var scroll_period = 3500;
	var counter = 0;

	if(list_numbers!=0){
		
		var scroll = new Fx.Scroll(list_container , {
			duration: scroll_duration,
			transition: Fx.Transitions.Quad.easeInOut
		}).toTop();
		
		var effect = function(){
			if(counter < list_numbers){
				counter += 1;
				scroll.start(0, counter * y_offset);
			}else{
				counter = 0;
				scroll.set(0,0);
			}
		};
		
		var periodical = effect.periodical(scroll_period);

	}else
		return;
		
});