

//the main function, call to the effect object
function init(onLoadShowTab){


  var stretchers = document.getElementsByClassName('panelContent'); //div that stretches
  var toggles = document.getElementsByClassName('panelHeader'); //h3s where I click on

  //accordion effect
  var myAccordion = new fx.Accordion(
    toggles, stretchers, {opacity: false, duration: 400}
  );

  //hash function
  
  function checkHash(onLoadShowTab){
    var found = false;
    toggles.each(function(h3, i){
      if ( (window.location.href.indexOf(h3.title) > 0) || (i==onLoadShowTab) ) {
        stretchers[i].style.height='100%';
        found = true;
      }
    });
    return found;
  }
  
  checkHash(onLoadShowTab);
}

