/* 
* display - (integer: defaults to 0) The index of the element to show at start (with a transition). To force all elements to be closed by default, pass in -1.
* show - (integer: defaults to 0) The index of the element to be shown initially.
* trigger - (string: defaults to 'click') The event that triggers a change in element display.
* height - (boolean: defaults to true) If set to true, a height transition effect will take place when switching between displayed elements.
* width - (boolean: defaults to false) If set to true, it will add a width transition to the accordion when switching between displayed elements. Warning: CSS mastery is required to make this work!
* opacity - (boolean: defaults to true) If set to true, an opacity transition effect will take place when switching between displayed elements.
* fixedHeight - (number) If set, displayed elements will have a fixed height equal to the specified value.
* fixedWidth - (number) If set, displayed elements will have a fixed width equal to the specified value.
* alwaysHide - (boolean: defaults to false) If set to true, it will be possible to close all displayable elements. Otherwise, one will remain open at all time.
* initialDisplayFx - (boolean; defaults to true) If set to false, the initial item displayed will not display with an effect but will just be shown immediately.
*/

window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h5.toggler', 'div.element', {
		opacity: false,
		/* ALLES GESCHLOSSEN 
		display: -1,
		show: -1,
		alwaysHide: true,
		*/
		onActive: function(toggler, element){
			toggler.setStyle('background', 'url(../images/bg-accordion-active.jpg) no-repeat');
			toggler.setStyle('color', '#fff');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('background', 'url(../images/bg-accordion.gif) top right no-repeat');
			toggler.setStyle('color', '#000');
		}
	});
});
