window.onload = new Ajax('ticker.php?dummy=' + new Date().getTime(),{method:'get', onComplete: getTicker}).request();
window.onload = function(){ //safari cannot get style if window isnt fully loaded
  var togglers = $$('h3.toggler');
  var togCols = [];
  togglers.each(function(toggler, i){
    togCols[toggler] = toggler.getStyle('background-color');
  });
  var myAccordion = new Accordion(togglers, $$('div.accordion'), { 
    opacity: false,
    onActive: function(tog){
      tog.setStyle('background-color', '#035f90');
    },
    onBackground: function(tog){
      tog.setStyle('background-color', togCols[tog]);
    }
  });
    
  //anchors
  function checkHash(){
    var found = false;
    $$('h3.toggler a').each(function(link, i){
      if (window.location.hash.test(link.hash)){
        myAccordion.display(i);
        found = true;
      }
    });
    return found;
  }

  if (!checkHash()) myAccordion.display(0);
};
