document.observe('dom:loaded', function() {
  $$('a.newwin').invoke('observe', 'click', function(event) {
    window.open(this.href);
    event.stop();
  });
  $$('a.holiday').invoke('observe','click',function(event){
    window.open(this.href,'holiday','width=400,height=300,top=300,left=500, scrollbars=1');
    event.stop();
  });
  $$('a.hours').invoke('observe','click',function(event){
    window.open(this.href,'hours','width=400,height=300,top=300,left=500, scrollbars=1');
    event.stop();
  });

  if (Prototype.Browser.IE) {
    /*
     * onmouseover and onmouseout are used instead of observe,
     * due to a bug in IE6 with event handling
     */
    $$('#nav li','#upper_nav li','#upper_nav ul').each(function(listItem) {
      listItem.onmouseover = function() {
        this.addClassName('sfhover');
      }.bind(listItem);
      listItem.onmouseout = function() {
        this.removeClassName('sfhover');
      }.bind(listItem);
    });
    $$('#nav span','#upper_nav span').invoke('observe', 'mouseover', function(event) {
      event.element().addClassName('span-hover');
    }).invoke('observe', 'mouseout', function(event) {
      event.element().removeClassName('span-hover');
    });
  }
});
