$(document).ready (function ()
{
	var container = $('#lenta ul'), news = container.find ('li'), duration = container.attr ('rel'), loadingDone = false, i = news.length;
	
	window.setInterval (
		function ()
		{
			var first = news.filter (':first-child');
			first.animate ({'margin-top': '-='+first.height ()}, 'slow', function ()
			{
				container.append ($(this).remove ().css ('margin-top', 0));
			}); 
		},
	duration * 1000);
	
});
