$(document).ready(function()
{
	var list = $('.feed_list');

	$('.feed').each(function()
	{
		var jThat = $(this);
	
		jThat.hide();

		jThat.find('.feed_link').each(function()
		{
			// this apparently returns the whole list...
			list.append('<div class="feed_tab">' + $(this).html() + '</div>');
			$(this).hide();
		});

		// so we know what feed we're associated with later...
		$('.feed_tab:last').each(function()
		{
			this.myFeed = jThat;
			$(this).addClass('tab_off');
		});
	});

	var jDataPanel = $('.feed_data_disp');

	$('.feed_item').hover(function()
	{
		jDataPanel.html($(this).find('.feed_data').html());
		jDataPanel.show();
	},
	function()
	{
		jDataPanel.hide();
	});

	jDataPanel.hover(function()
	{
		jDataPanel.show();
	});
		


	$('.feed_tab').click(function()
	{
		$('.feed').hide();
		$('.feed_tab').addClass('tab_off');

		$(this).removeClass('tab_off');

		var pos = $(this).position();

		$('.bottom_cover')
			.width($(this).outerWidth() - 2)
			.css('top', pos.top + $(this).outerHeight())
			.css('left', pos.left + 1)
			;

		this.myFeed.show();	

	});
	
	$('.feed_tab:first').click();
});

var Feeder = function Feeder(jFeed)
{

}
