var currNav = '';

$(document).ready(function(){
  $("#home").hover(
    function () {
      $("#home").attr("class", "selected");
    },
    function () {
      if (currNav != 'home') $("#home").attr("class", "");
    }
  );

  $("#search,#menu_search").hover(
    function () {
      $("#search").attr("class", "selected");
      //$("#menu_search").show();
    },
    function () {
      if (currNav != 'search') $("#search").attr("class", "");
      //$("#menu_search").hide();
    }
  );

  $("#about,#menu_about").hover(
    function () {
      $("#about").attr("class", "selected");
      $("#menu_about").show();
    },
    function () {
      if (currNav != 'about') $("#about").attr("class", "");
      $("#menu_about").hide();
    }
  );

  $("#enroll,#menu_enroll").hover(
    function () {
      $("#enroll").attr("class", "selected");
      //$("#menu_enroll").show();
    },
    function () {
      if (currNav != 'enroll') $("#enroll").attr("class", "");
      //$("#menu_enroll").hide();
    }
  );

  $("#blog,#menu_blog").hover(
    function () {
      $("#blog").attr("class", "selected");
      //$("#menu_blog").show();
    },
    function () {
      if (currNav != 'blog') $("#blog").attr("class", "");
      //$("#menu_blog").hide();
    }
  );

  $("#contact").hover(
    function () {
      $("#contact").attr("class", "selected");
    },
    function () {
      if (currNav != 'contact') $("#contact").attr("class", "");
    }
  );

  $("#login").hover(
    function () {
      $("#login").attr("class", "selected");
    },
    function () {
      if (currNav != 'login') $("#login").attr("class", "");
    }
  );
});
