var accordion1 = '';
var accordion2 = '';
var accordion3 = '';

window.addEvent('domready', function()
{
	accordion1 = new Accordion('div.t1', 'div.t1c', {
		start:'all-closed',
		opacity: false,
		duration: 0,
		alwaysHide: true,
		onActive: function(togglers, stretchers) {
			//togglers.setStyle('background-color', '#99ccff');
		},
		onBackground: function(togglers, stretchers) {
			//togglers.setStyle('background-color', '#6699cc');
			stretchers.setStyle('height', stretchers.offsetHeight);
			//$$('div.t3').setStyle('height','0');//you close all sub accordion
	}
	});


	accordion2 = new Accordion('div.t2', 'div.t2c', {
		start:'all-closed',
		opacity: false,
		duration: 0,
		alwaysHide: true,
		onActive: function(togglers, stretchers){
		togglers.getParent().setStyle("height", "auto");
	},
	onBackground: function(togglers, stretchers){
	stretchers.setStyle('height',stretchers.offsetHeight);
	}
	});
	
	accordion3 = new Accordion('div.t3', 'div.t3c', {
		start:'all-closed',
		opacity: false,
		duration: 0,
		alwaysHide: true,
		onActive: function(togglers, stretchers){
		togglers.getParent().setStyle("height", "auto");
		togglers.getParent().getParent().setStyle("height", "auto");
	},
	onBackground: function(togglers, stretchers){
	stretchers.setStyle('height',stretchers.offsetHeight);
	}
	});
});