
var DFtabs = Class.create();
DFtabs.prototype = {

	//  Setup the Variables
	tabs : null,
//	maxHeight : 0,
//	flashContainer: 'flash_122',

	//  Initialize the accordions
	initialize: function(options) {

	    this.options = Object.extend({
	      classNames : {
	        tabContainer : 'tabContainer',
	      	tab : 'tabInfo'
	      }
	    }, options || {});



	    this.tabs = $$('.' + this.options.classNames.tabContainer + ' .' + this.options.classNames.tab);
	    this.tabContainer = $$('.' + this.options.classNames.tabContainer).first();
	    this.iniTabs();

	},

	iniTabs : function(){
		this.hideAll();
	},

	show : function(id){
	    this.hideAll();

	    $(id).show();

//	    jumpTo = this.tabContainer.up('.sub24');

	    //window.location.hash = 'c91';
//	    new Effect.ScrollTo(jumpTo);

	},

	hideAll : function(){
	    this.tabs.each(
		function(elm){

/*
		    h = elm.getHeight();
		    if(h > this.maxHeight){
			this.maxHeight = h;
		    }
*/
		    elm.hide();
		}.bind(this)
	    );

//	    $$('.' + this.options.classNames.tabContainer).first().setStyle({'height' : this.maxHeight + 'px'});
	},



	setHeight : function(id, value){
//	    console.info(id, value);

		$$(id).first().setStyle({
			height: value + "px"
		});
	},



	dummy : function(){
	}
}



var myDFTabs;
document.observe('dom:loaded',function(){
	myDFtabs = new DFtabs();
});



