﻿var els, myFx, current = 0, currentScroll = 0;

window.addEvent("domready", function() {
	scrollToEl.delay(5000);
	//	var el = $('news_content').getFirst("dl");
	//	var myEffect = new Fx.Morph(el, {duration: 1000, transition: Fx.Transitions.Elastic.easeOutCubic});
	//	myEffect.start({
	//    'height': [el.getSize().y, 0] //Morphs the 'height' style from 10px to 100px.
	//	});
	
	
	//	current = 0;
	//	myFx = new Fx.Scroll($('news_content'),{duration: 1000, transition: Fx.Transitions.Elastic.easeOutCubic, onComplete: function() { scrollToEl.delay(3000) }});
	//	scrollToEl();
});

function scrollToEl() {
	current = current + 1;
	els = $$('#news_content dl');
	myFx = new Fx.Scroll($('news_content'),{duration: 3000, transition: Fx.Transitions.Elastic.easeOutCubic, onComplete: function() { scrollToEl.delay(5000) }});
	myFx.toElement(els[current]);
	els[current - 1].clone().inject($('news_content'),'bottom');
	
//	var myEffect = new Fx.Morph('myElement', {duration: 'long', transition: Fx.Transitions.Sine.easeOut});
//	
//	myFx.toElement(els[1]);
//	var space = $('news_content').getFirst("dl");
//	space.clone().inject($('news_content'),'bottom');
//	space.dispose();
}
