jQuery.fn.newsFeed = function(attr) {
	attr = attr || {};
	attr.duration = attr.duration || 3000;
	
	function initSlider(container, feeds) {
		var curr = 0;
		
		$(container).html(feeds[curr++]);
		
		setInterval( function() {
			if (curr == feeds.length)
				curr = 0;
			
			$(container).html(feeds[curr++]);
		}, attr.duration );
	};

	$(this).each(function(){
		var feeds = [];
		$(this).find(".feed-item").each(function(){
			feeds.push($(this).html());		
		});
		
		var container = this;
		$(this).empty();
				
		initSlider(container, feeds);
	});
}