(function(window, $, undefined) {
  
  var showDropdown = function(e) {
    
    var $el = $(this),
        activeClass = 'activated';
    
    if (e.type === 'mouseleave') {
      $el.removeClass(activeClass);
    } else {
      $el.addClass(activeClass);
    }
    
    if($(e.target).is('span')) {
      e.preventDefault();
    }
  };
  
  $(document).ready(function() {
    
    $('#footer ul.cancer-types > li').click(showDropdown).mouseenter(showDropdown).mouseleave(showDropdown);
    
    // Remove the glossary link from the footer on common and splash pages
    $('.splash #footer .glossary, .common #footer .glossary').remove();
    
  });
  
})(window, jQuery);
