window.addEvent('domready', function() {

	var myAccordion = new Accordion($('accordion'), 'div.togglerItem', 'div.element', {
		opacity: false,
		alwaysHide: true,
		display:-1,
		onActive: function(togglerItem, element){
			togglerItem.setStyle('color', '#646464');

		},
		onBackground: function(togglerItem, element){
			togglerItem.setStyle('color', '#646464');
			
		},
		onComplete: function(togglerItem, element){
			//get the content div
			var nid = document.getElementById("main");
			//get the menu div
			var id = document.getElementById("right");
			//set th menu div's height to the content div's height
			id.style.height = nid.offsetHeight+"px";
		}
	});
	
	
});
