/*
 * FUNCTION: jquery menu hover
 * Credit this function to:
 * http://www.darrenkrape.com/categories/design-and-development/css-drop-down-menus-2/
 */
$(function() {

    //Preserves the mouse-over on top-level menu elements when hovering over children
    $("#mainmenu ul").each(function(i){
      $(this).hover(function(){
        $(this).parent().find("a").slice(0,1).addClass("active");
      },function(){
        $(this).parent().find("a").slice(0,1).removeClass("active");
      });
    });

    // IE6 Fix: Drop-down fix due to lack of support for :hover on list elements
    if($.browser.msie && ($.browser.version < 7)) {
      $("#mainmenu").each(function(i){
        $(this).find("li").hover(function(){
          $(this).addClass("sfhover");
        },function(){
          $(this).removeClass("sfhover");
        });
      });
    }

  });
