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