window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: true,
		transition: 'cubic:out', 
		onActive: function(toggler, element){
			
			
			toggler.set('morph', {transition: 'bounce:out'});
			toggler.morph({'width': [140],'background-color': '#838383'});
			element.setStyle('height', '600px');
			//element.set('morph', {transition: 'easeOut'});
			//element.morph({'height': [600]});
			//element.set('tween', {duration: '100'});
			//element.tween('height', '600px');
		},
		onBackground: function(toggler, element){
			
			toggler.set('morph', {transition: 'bounce:out'});
			toggler.morph({'width': [120],'background-color': '#FFA20F'});
			
			//element.set('morph', {transition: 'easeOut'});
			//element.morph({'height': [0]});
			//toggler.setStyle('width', '140px');
			//toggler.set('tween', {duration: '300'});
		}
	});
	//create our Accordion instance
	var myAccordion = new Accordion($('BIGaccordion'), 'a.BIGtoggler', 'div.BIGelement', {
		opacity: true,
		setHeight:true,
		onActive: function(toggler, element){
			toggler.set('class','current');
			element.setStyle('height', 'auto');
		},
		onBackground: function(toggler, element){
			toggler.set('class','BIGtoggler');
			element.setStyle('height', '0');
		}
	});

	
});

