/* var SmoothPop = {

  init: function() {

    SmoothPop.setLinks();

  },

    

  setLinks : function() {

    SmoothPop.fx = [];

    SmoothPop.links = $$('.smoothpop-link');

    SmoothPop.panes = $$('.smoothpop-pane');

    

    SmoothPop.panes.each( function(pane, i) {

      SmoothPop.fx[i] = new Fx.Slide(pane, {

       duration: 1000,

      });

			SmoothPop.fx[i].hide();

      SmoothPop.links.each( function(link, j) {

        if(pane.get('rel') == link.get('rel')) {

          SmoothPop.links[j].addEvent('click', function() {

            SmoothPop.panes.setStyle('display', 'block');

						SmoothPop.fx[i].toggle();

          });				

				}

      });    

      

    });

  }

}

window.addEvent('domready', SmoothPop.init); */



/* ACTIVE STATE */

window.addEvent('domready', function() {

  var navElements = $$('#topNav li a', '#mainNav li a', 'div.subNav ul li a', '#footer ul li a');



  navElements.each(function(navElement, i) {    

    // If element is itself

    if(navElement == window.location.href || navElement + 'index.php' == window.location.href) {

      navElement.addClass('active');

    }

    // If current is part of FOOD

    else if(window.location.href.toString().test('/food/')) {

      $$('#mainFood a')[0].addClass('active');

    }

    // If current is part of DRINK

    else if(window.location.href.toString().test('/drink/')) {

      $$('#mainDrink a')[0].addClass('active');

    }

    // If current is part of NEWS

    else if(window.location.href.toString().test('/news/')) {

      $$('#mainNews a')[0].addClass('active');

    }

    // If current is part of ABOUT

    else if(window.location.href.toString().test('/about/')) {

      $$('#mainAbout a')[0].addClass('active');

    }

    // If current is part of GROUPS

    else if(window.location.href.toString().test('/groups/')) {

      $$('#mainGroups a')[0].addClass('active');

    }

    // If current is part of GIFTCARDS

    else if(window.location.href.toString().test('/ShoppingCart/')) {

      $$('#topNavGifts a')[0].addClass('active');

    }        



    // If current is part of NEWS & EVENTS SECTION

    if(window.location.href.toString().test('[0-9]{6}-')) {

      $$('#subNews a')[0].addClass('active');

    }



    // If current is part of FOOD SECTION

    if(window.location.href.toString().test('/bestof-')) {

      $$('#bestof a')[0].addClass('active');

    }

    if(window.location.href.toString().test('/runningwildfest-')) {

      $$('#subRunningWildFest a')[0].addClass('active');

    }

    if(window.location.href.toString().test('/crabfest-')) {

      $$('#subCrabFest a')[0].addClass('active');

    }

    if(window.location.href.toString().test('/lobsterfest-')) {

      $$('#subLobsterFest a')[0].addClass('active');

    }

     if(window.location.href.toString().test('/shrimpfest-')) {

      $$('#subShrimpFest a')[0].addClass('active');

    }

    else if(window.location.href.toString().test('/dinner-')) {

      $$('#subFoodDinner a')[0].addClass('active');

    }    

    else if(window.location.href.toString().test('/lunch-')) {

      $$('#subFoodLunch a')[0].addClass('active');

    }   

    else if(window.location.href.toString().test('/brunch-')) {

      $$('#subFoodBrunch a')[0].addClass('active');

    }   

    else if(window.location.href.toString().test('/deck-')) {

      $$('#subFoodDeck a')[0].addClass('active');

    }   

    else if(window.location.href.toString().test('/desserts-')) {

      $$('#subFoodDessert a')[0].addClass('active');

    }   

    else if(window.location.href.toString().test('/group-dinner-')) {

      $$('#subFoodGroupDinner a')[0].addClass('active');

    }   

    else if(window.location.href.toString().test('/group-lunch-')) {

      $$('#subFoodGroupLunch a')[0].addClass('active');

    }

    else if(window.location.href.toString().test('/surf-')) {

      $$('#subFoodSurf a')[0].addClass('active');

    }    

  });

});



function sendReservation() { 

  MM_openBrWindow('','mm_reserve','resizable=yes,width=800,height=750,scrollbars=yes')

} 