/****************************************************************************
* Autor: K2M Tecnologia Web	*
* Site: www.k2mweb.com.br*
* Todos os direitos reservados*
****************************************************************************/
var accordion;
var accordionTogglers;
var accordionContents;

window.onload = function() {

  accordionTogglers = document.getElementsByClassName('accToggler');
  
  accordionTogglers.each(function(toggler){
    //remember the original color
    toggler.origColor = toggler.getStyle('background-color');
    //set the effect
    toggler.fx = new Fx.Style(toggler, 'background-color');
  });
  
  accordionContents = document.getElementsByClassName('accContent');
 	
  accordion = new Fx.Accordion(accordionTogglers, accordionContents,{
	display:acc_section,
    //when an element is opened change the background color to blue
    onActive: function(toggler){
      toggler.fx.start('#12779d');
    },
    onBackground: function(toggler){
      //change the background color to the original (brown)
      //color when another toggler is pressed
      toggler.setStyle('background-color', toggler.origColor);
    }
  });
};


