// this script is used to enable accordions on (form) pages
// items that need to be folded must have the class acc_toggler / acc_element

window.addEvent('domready', function(){

	

  theAccordion = new Fx.Accordion($$('.acc_toggler'), $$('.acc_element'), 
	{

		alwaysHide: false, 
		show: 999,   // this results in all elements being closed initially
		// deselect all sub radio buttons oncomplete (only the current accordion toggler's elements should be selected, if any)
		onComplete: function(){
			//alert("toggling completed");
			$$('.acc_radio_extension').each(function(item){
				//alert(item);			
				item.checked = false; 
			});
		} // end oncomplete

	});

	// allow radio buttons to be deselected
	$$('.acc_radio_resetter').addEvent('click', function(el){
		$$('.acc_radio_extension').each(function(item){		
				item.checked = false; 
		});
	});


	

});


