$(document).ready(function() {
    	$('#rotatingContent').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout:  11000
	});
	
	//add a nice scroll bar
	$('.scrollPane').jScrollPane();
	
});

function getFeeds( feedsUrls ){
	for(var i = 0; i < feedsUrls.length; i++) {
		$.getFeed({
			url: '/js/jquery/jfeed/proxy.php?url=' + feedsUrls[i], 
			success: function(feed) {
				var html = '';
		    
				 $('#newsBucket ul').append('<li>' + '<a href="' + feed.link + '" class="header" target="_blank">' + feed.title + '</a>' + '</li>');
				
				var html = '';
		    
				for(var i = 0; i < feed.items.length && i < 5; i++) {
				
					var item = feed.items[i];
					
					html += '<li>'
					+ '<a href="'
					+ item.link
					+ '" target="_blank">'
					+ item.title
					+ '</a>'
					+ '</li>';
				}
				
				$('#newsBucket ul').append(html);
				
				//add a nice scroll bar
				$('.scrollPane').jScrollPane();
			}   
		});
	}//for
}//function
