﻿var obj = null;
function checkHover() {
  if (obj) {
    obj.children('ul').hide();
  } //if
} //checkHover

$(document).ready(function() {
  $('#nav li').hover(function() {
    $(this).addClass('lihover');
    if (obj) {
      obj.children('ul').hide();
      obj = null;
    } //if
    $(this).children('ul').show();
    }, function() {
      $(this).removeClass('lihover');
      obj = $(this);
      setTimeout(
      "checkHover()",
      400);
  });
  
  $("#Registered").click(function(){
    if ($(this).is(":checked")){
       $('.registered').hide();
    } else { 
       $('.registered').show();} 
    }); 
  
});
