Liferay.Util.portletTitleEdit = function() {
};

var currentIndex = 0;
	var prevIndex = 0;
	var messages = jQuery('.rotating-asset-content');
	
	function rotate() {
			
		//get current message index (to show it):
		currentIndex = (currentIndex < messages.length - 1) ? currentIndex + 1 : 0;
		
		//get previous message index (to hide it):
		prevIndex = (currentIndex == 0) ? messages.length - 1 : currentIndex - 1;
		
		messages.eq(prevIndex).hide();
		
		    messages.eq(currentIndex).fadeIn('5000', function() 
		   {
			   setTimeout('rotate()', 5000);
		   });
	
		
		
			
	}
			
	jQuery(
		
		function() {
				
			messages.eq(currentIndex).fadeIn('5000', function() 
			   {
			    
				 setTimeout('rotate()', 5000);
			   });
			
		}
			
	);


