// JavaScript Document

//scripts have been put here as a courtesy to you, the sourcecode viewer.
	//this script uses mootools: http://mootools.net
	var stretchers = $$('div.accordion');
	var togglers = $$('span.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, 'background-color', {'wait': false, 'transition': Fx.Transitions.Quart.easeOut});
		});
			
		//the accordion
		var myAccordion = new Accordion(togglers, stretchers, {
			'opacity': true,
			'start': true,
			'transition': Fx.Transitions.Quad.easeOut,
			'alwaysHide':false,
			onActive: function(toggler){
			},
			onBackground: function(toggler){
				toggler.$tmp.fx.stop();
			}
		});
		
		/*
		//open the accordion section relative to the url
		var found = 0;
		$$('span.toggler a').each(function(link, i){
			if (window.location.hash.test(link.hash)) found = i;
		});
		myAccordion.display(found);
		*/
		
		
	});
	