	var stretchers = $$('div.accordion');
	var togglers = $$('div.toggler');

	stretchers.setStyles({'height': '0', 'overflow': 'hidden'});
	
	window.addEvent('load', function(){
		
		//initialization of togglers effects
		
		togglers.each(function(toggler, i){
			toggler.color = toggler.getStyle('background-color');
			toggler.$tmp.first = toggler.getFirst();
			toggler.$tmp.fx = new Fx.Style(toggler, '#ffffff', {'wait': false, 'transition': Fx.Transitions.Quart.easeOut});
		}); 
		
		//the accordion
		
		var myAccordion = new Accordion(togglers, stretchers, {
			
			'alwaysHide': true,

			'opacity': true,

			'start': true,			
			
			'transition': Fx.Transitions.Quad.easeOut,
			
			onActive: function(toggler){
				toggler.$tmp.fx.start('#ffffff');
				toggler.$tmp.first.setStyle('#ffffff', '#ffffff');
			},
			
			onBackground: function(toggler){
				toggler.$tmp.fx.stop();
				toggler.setStyle('background-color', toggler.color).$tmp.first.setStyle('#ffffff', '#ffffff');
			}
		});		
	});
