
// Defines the Accordion

window.addEvent('domready', function() {

	var accTitle = $$('.question');
	var accContent = $$('.answer');

	var accordion = new Accordion(
		accTitle, accContent, {

			onActive: function(toggler, element){
				toggler.addClass('selected');
				element.addClass('on');
				element.setStyle('padding-bottom', '10px');
			},

			onBackground: function(toggler, element){
				toggler.removeClass('selected');
				element.removeClass('on');
				element.setStyle('padding-bottom', '0');
			},

			alwaysHide: true,
			opacity: false,
			duration: 500,
			show: 200
		}
	);
});

// Menu Stuff

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav-main");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;