//scripts have been put here as a courtesy to you, the sourcecode viewer.

	//this script uses mootools: http://mootools.net

	var stretchersEvent = $$('div.accordionEvent');
	var togglersEvent = $$('div.togglerEvent');

	stretchersEvent.setStyles({'height': '0', 'overflow': 'hidden'});

	window.addEvent('load', function(){

		//initialization of togglers effects

		togglersEvent.each(function(togglerEvent, i){
			togglerEvent.color = togglerEvent.getStyle('background-color');
			togglerEvent.$tmp.first = togglerEvent.getFirst();
			togglerEvent.$tmp.fx = new Fx.Style(togglerEvent, 'background-color', {'wait': false, 'transition': Fx.Transitions.Quart.easeOut});
		});

		//the accordion

		var myAccordion2 = new Accordion(togglersEvent, stretchersEvent, {

			'opacity': false,

			'start': false,

			'transition': Fx.Transitions.Quad.easeOut,

			onActive: function(togglerEvent){
				togglerEvent.$tmp.fx.start('#CC0033');
				togglerEvent.$tmp.first.setStyle('color', '#fff');
			},

			onBackground: function(togglerEvent){
				togglerEvent.$tmp.fx.stop();
				togglerEvent.setStyle('background-color', togglerEvent.color).$tmp.first.setStyle('color', '#222');
			}
		});

		//open the accordion section relative to the url

		var found2 = 0;
		$$('div.togglerEvent a').each(function(link, i){
			if (window.location.hash.test(link.hash)) found2 = i;
		});
		myAccordion2.display(found2);

		//the draggable ball

		var ballEvent = $('header').getElement('h1');
		var ballfxEvent = new Fx.Styles(ballEvent, {duration: 1000, 'transition': Fx.Transitions.Elastic.easeOut});
		new Drag.Base(ballEvent, {
			onComplete: function(){
				ballfxEvent.start({'top': 13, 'left': 358});
			}
		});

	});
