var Tab = new Class({
	Implements: [Options, Events, Log],
	
	options: {
	},
	
	// Variables
	manager: null,
	name: null,
	tab: null,
	content: null,
	
	initialize: function(manager, name, tab, content, options)
	{
		this.enableLog();
		//this.disableLog();
		this.log("Tab::initialize(" + manager + ", " + name + ", " + tab + ", " + content + ", " + options + ")");
		
		this.setOptions(options);

		// Set variables
		this.manager = manager;
		this.name = name;
		this.tab = tab;
		this.content = content;
		
		this.initButtons();
	},
	
	show: function()
	{
		this.log("Tab::show()");
		
		this.content.show();
		
		this.tab.addClass('selected');
	},
	
	hide: function()
	{
		this.log("Tab::hide()");
		
		this.content.hide();
		
		this.tab.removeClass('selected');
	},
	
	initButtons: function()
	{
		this.log("Tab::initButtons()");
		
		this.tab.addEvent('click', function(event) {
			event.preventDefault();
			
			this.manager.show(this.name);
		}.bindWithEvent(this));
	}
	
});
