﻿$(document).ready(function ()
{
	var first = 0;
	var speed = 700;
	var pause = 8000;

	$('ul#news li:first').show();

	function removeFirst()
	{
		first = $('ul#news li:first').html();
		$('ul#news li:first').animate({ opacity: 0 }, speed).fadeOut('slow', function () { $(this).remove(); $('ul#news li').hide().fadeIn('slow'); });
		addLast(first);
	}

	function addLast(first)
	{
		last = '<li style="display:none">' + first + '</li>';
		$('ul#news').append(last);
	}

	interval = setInterval(removeFirst, pause);
});
