$$('.tab-control li').each(function(t)
{
	if (!t.hasClassName('tab-label'))
	{
		var linkContainer = t;
		var link = t.down();
		var tabContainer = $(link.rel);
		
		link.observe('click', function (event)
		{
			$$('.tab-control li').each(function(it)
			{
				if (it.hasClassName('current'))
				{
					it.removeClassName('current');
					
					// Now hide the container..
					$(it.down().rel).hide();
				}
			});
			
			t.addClassName('current');
			tabContainer.show();
			
			Event.stop(event);
		});
	}
});

// Possible extension! Check the "rel" attribute of the container div, and use it as an ajax url to 
// retrieve contents for the div, if its empty.