
if( typeof ProductDetailTab == "undefined" )
	throw "ERROR: ProductDetail could not load: Missing dependency `ProductDetailTab`";

var ProductDetail = Class.create(
{
	tabs: [],
	
	currentTab: null,
	
	initialize: function()
	{
		this.initDOM();
		this.initOther();
	},
	
	initDOM: function()
	{
		this.dom = {};
		this.dom.tabs = $( "product-detail-tabs" );
		this.dom.content = $( "product-detail" );
	},
	
	initOther: function()
	{
		$$( "#product-detail-tabs .tab" ).each( function( el )
		{
			new ProductDetailTab( el, this );
			
		}.bind( this ) );
	},
	
	getCurrentTab: function()
	{
		return this.currentTab;
	},
	
	setCurrentTab: function( tab )
	{
		this.currentTab = tab;
	}
});

document.observe( "dom:loaded", function(){ new ProductDetail() } );