window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: 0,
		display: 0,
		fps: 500,
		transition: Fx.Transitions.Expo.easeOut,
		onActive: function(toggler, element){
			//alert(toggler.id);
			toggler.setStyle('color', '#224165');
			toggler.setStyle('background-position', 'left -50px');
			toggler.id = 'activeone';
		},
		onBackground: function(toggler, element){
			//alert('background fired');
			toggler.setStyle('color', '#224165');
			toggler.setStyle('background-position', 'left top');
			toggler.id = '';
		}
	});
	
	//make it open on hover
	//$$('.toggler').addEvent('mouseenter', function() { this.fireEvent("active",[this.togglers[D],E]); });
	
	$$('h3.toggler').addEvent('mouseenter', function() { 			
			if (this.id != "activeone")
			{	
				this.setStyle('color', '#224165');
				this.setStyle('background-position', 'left -25px'); 
			}
		});
		
	$$('h3.toggler').addEvent('mouseout', function() { 			
			//alert(this.id);
			if (this.id != "activeone")
			{
				this.setStyle('color', '#224165');
				this.setStyle('background-position', 'left top');
			}
		});
		
	
	//this.fireEvent(C?"background":"active",[this.togglers[D],E]);

	

});

