window.onload = function()
{
  var mooTogs    = document.getElementsByClassName('stretchtoggle');
  var mooStretch = document.getElementsByClassName('stretcher');

  // must be before mooAccordion
  mooTogs.each(function(tog, i) {
    tog.onclick = function() {
      if (tog.className == 'stretch_active') {
        mooAccordion.clearAndToggle(mooStretch[i], i);
        tog.className = 'stretchtoggle';
        return;
      }

      // reset them all then set clicked
      mooTogs.each(function(rtog, ri) {mooTogs[ri].className = 'stretchtoggle';});
      tog.className='stretch_active';
    };
  });

  var mooAccordion = new fx.Accordion(mooTogs, mooStretch, {opacity:true, width:false, height:true});
}
document.writeln("<style>.stretcher {");
document.writeln("height:0;overflow:hidden;");
document.writeln("}</style>");
