window.addEvent('domready',function(){

		//SAMPLE 5
		var V5 = new viewer($('box5').getChildren(),{
			onWalk: function(current_index){
				handles5.removeClass('active');
				handles5[current_index].addClass('active');
			}
		});
		var handles5 = $$('#handles5 span');
		handles5.each(function(el,i){el.addEvent('click',V5.walk.bind(V5,[i,true]));});
		
		//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: true,
		alwaysHide: true,
		display: 500,
		onActive: function(toggler, element){
			toggler.setStyle('background', '#0dc2cd');
			toggler.setStyle('color', '#ffffff');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('background', '#f1f2f2');
			toggler.setStyle('color', '#0b838a');
		}
	});

	//add click event to the "add section" link
	$('add_section').addEvent('click', function(event) {
		event.stop();
		
		// create toggler
		var toggler = new Element('h3', {
			'class': 'toggler',
			'html': 'Common descent'
		});
		
		// create content
		var content = new Element('div', {
			'class': 'element',
			'html': '<p>lorem ipsum</p>'
		});
		
		// position for the new section
		var position = 0;
		
		// add the section to our myAccordion using the addSection method
		myAccordion.addSection(toggler, content, position);
	});
	});