	
	var stretchers = $$('div.accordion');
	var togglers = $$('h3.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': false,
			
			'start': true,
			
			'transition': Fx.Transitions.Sine.easeIn,
			
			onActive: function(toggler){
				toggler.$tmp.fx.start('#000');
				toggler.$tmp.first.setStyle('color', '#fff');
				toggler.setStyle('background-color', '#000');
				//toggler.$tmp.first.setOpacity(0.5);
				


			},
	
			onBackground: function(toggler){
				toggler.$tmp.fx.stop();
				toggler.setStyle('background-color', '#e2e2e2');
				toggler.$tmp.first.setStyle('color', '#fff');
				// toggler.$tmp.first.setStyle('opacity', '0.9');
				//toggler.$tmp.first.setStyle('opacity', '0.95');
				

						
			}
		});
		
		//open the accordion section relative to the url
		
		var found = 0;
		$$('h3.toggler a').each(function(link, i){
			if (window.location.hash.test(link.hash)) found = i;
		
		});
		myAccordion.display(found);

	// Extra IMIN
	$('loader').setOpacity(0);
	$('header').setOpacity(1);
	$('content').setOpacity(1);
	$('footer').setOpacity(1);
	
		
	});


