window.addEvent('domready', function() {
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: false,
		alwaysHide: true,
		display: window.location.search.substring(1),
		onActive: function(toggler, element){
			toggler.setStyle('color', '#717074');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#B2B1B1');
		}
	
	});
	var el = $('myElement');
	
	// MooTools is able to handle effects without the use of a wrapper,
	// so you are able to do effects with just one easy line.
	
	//FIRST EXAMPLE
	
	// There are different ways to add a fading opacity effect to an element click
	
	// Short version
	$('myElement').set('opacity', [0]);
	$('toggleElement').addEvent('click', el.fade.bind(el, ['toggle']));
	$('fadeOpacity').addEvent('click', el.fade.bind(el, [0]));
	
	// Long version
	$('tweenOpacity').addEvent('click', function(e) {
		// You often will need to stop propagation of the event
		e.stop();
		el.fade(1);
	});
});
