// JavaScript Code for very basic accordion - include in head of doc
function accordionFaqs(){
	//var trig = $S('.nivelA');
	//var box = $S('.slider');
	//var ac = nre.fx.Accordion(trig, box,  {'alwaysHide' : true, 'start': 'all-closed'});
	var trig = document.getElementsByClassName('nivelA');
	var box = document.getElementsByClassName('answer');
	//accordion = new Fx.Accordion(accordionTogglers, accordionContents, {fixedHeight : lateralSize['alto']});
	//var ac = new Fx.Accordion(trig, box, {'show' : 0});
	var ac = new Fx.Accordion(trig, box, {'alwaysHide' : true, 'start': 'all-closed'});
	
	var elements = $$(trig);	
	trig.addEvent('click', function(){
			elements.each(function(el, i){
			if(el == this) {
				el.setProperty('class', 'tituloAcordeon on');
			} else {
				el.setProperty('class', 'tituloAcordeon');
			}
		}, this);
	});
}

Window.onDomReady(function(){
	accordionFaqs();
	//sliderinit() ;
});

