//window.addEvent('domready', function() {
//	var status = {
//		'true': '-',
//		'false': '+'
//	};
//	
//
//	var myVerticalSlide = new Fx.Slide('vertical_slide');
//
//
//	$('v_toggle').addEvent('click', function(e){
//		e.stop();
//		myVerticalSlide.toggle();
//	});
//
//	
//	myVerticalSlide.addEvent('complete', function() {
//		$('vertical_status').set('html', status[myVerticalSlide.open]);
//	});
//
//
//
//});

//// this was working (below) /////////

window.addEvent( 'domready', function(){
	$$( '.moreInfoWrapper' ).each(function(item){
		var thisSlider = new Fx.Slide( item.getElement( '.moreInfo' ), { duration: 500 } );
		thisSlider.hide();
		item.getElement( '.divToggle' ).addEvent( 'click', function(){ thisSlider.toggle(); } );

	} );
} );



window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: false,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#41464D');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#946f85');
		}
	});

	//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 dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>'
		});
		
		// position for the new section
		var position = 0;
		
		// add the section to our myAccordion using the addSection method
		myAccordion.addSection(toggler, content, position);
	});
});