﻿window.addEvent('domready', function() {
	
			//SAMPLE 4 (walk to item)
		var nS4 = new noobSlide({
			box: $('box4'),
			items: $$('#box4 div'),
			autoPlay: true,
			interval: 10000,
			size: 700,
			handles: $$('#handles4 span'),
			onWalk: function(currentItem,currentHandle){
				//$('info4').set('html',currentItem.getFirst().innerHTML);
				this.handles.removeClass('active');
				currentHandle.addClass('active');
			}
		});
		//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: false,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#326799');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#326799');
		}
	});

	//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></p>'
//		});
//		
//		// position for the new section
//		var position = 0;
//		
//		// add the section to our myAccordion using the addSection method
//		myAccordion.addSection(toggler, content, position);
//	});

});
