function theRotator() {
	
	$('div#imghome ul li').css({opacity: 0.0});
	
	
	$('div#imghome li:first').css({opacity: 1.0});
		
	
	setInterval('rotate()',4000);
	
}
function rotate() {	
	
	var current = ($('div#imghome ul li.show')?  $('div#imghome ul li.show') : $('div#imghome ul li:first'));

	
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div#imghome ul li:first') :current.next()) : $('div#imghome ul li:first'));	
	
	
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};

$(document).ready(function() {		
	theRotator();
	$('#js-news').ticker({
		 speed: 0.10,           
        ajaxFeed: false,      
        feedUrl: false,       
	                       
        feedType: 'xml',       
        htmlFeed: true,       
        debugMode: false,       
  	                       
        controls: true,        
        titleText: 'NEWS',  
        displayType: 'fade', 
        direction: 'ltr'    ,   
        pauseOnItems: 4000,    
        fadeInSpeed: 600,      
        fadeOutSpeed: 300      
	
});
});

