



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', '#ffffff');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#000000');
		}
	});

	
		$('myOtherElement').addEvents({
		'mouseenter': function(){
			// Always sets the duration of the tween to 1000 ms and a bouncing transition
			// And then tweens the height of the element
			this.set('tween', {
				duration: 400,
				transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('height', '75px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('height', '20px');
		}
	});

	
	
	//First Example
	var el = $('tab2'),
		color = el.getStyle('backgroundColor');
	
	// We are setting the opacity of the element to 0.5 and adding two events
	$('tab2').set('opacity', 1).addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				'opacity': 1,
				'background-color': '#24cae3'
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				opacity: 01,
				backgroundColor: color
			});
		}
	});
	
	var el = $('tab3'),
		color = el.getStyle('backgroundColor');
	
	// We are setting the opacity of the element to 0.5 and adding two events
	$('tab3').set('opacity', 1).addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				'opacity': 1,
				'background-color': '#24cae3'
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				opacity: 01,
				backgroundColor: color
			});
		}
	});
	// Second Example



	// The same as before: adding events
});