window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('box_main_content'), 'h2.toggler', 'div.element', {
		opacity: false,
		onActive: function(toggler, element){
			toggler.setStyle('background', 'url(template/inc_css/bg-balk-blauw.jpg)');
			toggler.setStyle('color', '#ffffff');
			toggler.setStyle('font-weight', 'normal');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('background', 'url(template/inc_css/bg-balk-grijs.jpg)');
			toggler.setStyle('color', '#666666');
		}
	});
	$$('.toggler').addEvent('mouseenter', function() { 
		this.setStyle('font-weight', 'bold'); 
	});
	$$('.toggler').addEvent('mouseleave', function() { 
		this.setStyle('font-weight', 'normal'); 
	});

	//add click event to the "add section" link
//	$('add_section').addEvent('click', function(event) {
//		event.stop();
//		
//		// create toggler
//		var toggler = new Element('h2', {
//			'class': 'toggler',
//			'html': 'Common descent'
//		});
//		
//		
//		// position for the new section
//		var position = 0;
//		
//		// add the section to our myAccordion using the addSection method
//		myAccordion.addSection(toggler, content, position);
//	});
});