/*
This file has the methods necessary to support the animation
on the home page. It is currently called from main.asp
There are two variables that can be configured:
speed(animation speed that is)
pause(the interval of the animation, how long will the news ticker content stay on the screen)
*/
$(document).ready(function()
{	
	var first = 0;
	//Animation Speed
	var speed = 1000;
	//Interval at which the ticker will change news
	var pause = 35000;
	
		function removeFirst()
		{
			first = $('ul#listticker li:first').html();
			$('ul#listticker li:first')
			.animate({opacity: 0}, speed)
			.fadeOut('slow', function() {$(this).remove();});
			addLast(first);
		}
		
		function addLast(first)
		{
			last = '<li style="display:none">'+first+'</li>';
			$('ul#listticker').append(last)
			$('ul#listticker li:last')
			.animate({opacity: 1}, speed)
			.fadeIn('slow')
		}
	interval = setInterval(removeFirst, pause);
});

