(function ($) {
   'use strict';

    $.widget( "ui.global_nav", {
        _init: function() {
            this.init();
        },

        init: function() {
            var me = this;

            me.document            = $(document),
            me.body                = $('body:eq(0)'),
            me.menuButton          = $(me.element.find('#toggle-menu')[0]);

            me.menuButton.on('click', me._toggleMenu.bind(me));
            me.document.on('click', me._closeMenu.bind(me));

            me.document.on('menu:close', me._closeMenu.bind(me));

            if ('ontouchstart' in document.documentElement) {
                if ($('.global-nav__menu__dropdown').length > 0) {
                    var openLink = false;
                    $('body').prepend('<div class="global-nav__menu__dropdown_close"> </div>');
                    $('.global-nav__menu__dropdown_close').on('touchstart', function(e) {
                        $('.global-nav__menu__dropdown').removeClass('touch-open');
                        $(this).hide();
                        openLink = false;
                    });
                    $('.global-nav__menu__dropdown').each(function(i) {
                        $(this).find('a:first').on('touchstart', function(e) {
                            if (openLink == false) {
                                e.preventDefault();
                                $(this).parent().addClass('touch-open');
                                $('.global-nav__menu__dropdown_close').show();
                                openLink = true;
                            } else {
                                if ($(this).parent().hasClass('touch-open') == false) {
                                    $('.global-nav__menu__dropdown').removeClass('touch-open');
                                    e.preventDefault();
                                    $(this).parent().addClass('touch-open');
                                }
                            }
                        });
                    });
                }
            }
        },

        _closeMenu: function(event) {
            var me = this;
            me._toggleMenu(event, true);
        },

        _toggleMenu: function(event, close) {
            var me = this;

            me.menuButton.toggleClass('is-active');

            if (close) {
                me.body.removeClass('is-menu-visible');
                me.element.removeClass('is-open');
                me.menuButton.removeClass('is-active');
            } else {
                if(me.menuButton.hasClass('is-active')) {
                    me.element.addClass('is-open');
                    me.body.addClass('is-menu-visible');
                } else {
                    me.element.removeClass('is-open');
                    me.body.removeClass('is-menu-visible');
                }
            }

            return false;

        }
    });

})(jQuery);

@@ -376,26 +376,24 @@
      me.
-menuButton
+document
 .on('cli
@@ -405,79 +405,27 @@
 me._
-toggleMenu.bind(me));%0A            me.document.on('click', me._closeMenu
+handleDocumentClick
 .bin
@@ -424,33 +424,32 @@
 lick.bind(me));%0A
-%0A
             me.d
@@ -2009,32 +2009,886 @@
   %7D%0A        %7D,%0A%0A
+%0A        _handleDocumentClick: function(event) %7B%0A%0A            let $target = $(event.originalEvent.target),%0A                me = this;%0A%0A            // Clicked on/in toggle menu button%0A            if ($target.closest('%5Bclass*=%22toggle-menu%22%5D').size() %3E 0) %7B%0A                me._toggleMenu(event);%0A                event.preventDefault();%0A                return;%0A            %7D%0A%0A            // Clicked on/in menu close button%0A            if ($target.closest('%5Bclass*=%22nav__close%22%5D').size() %3E 0) %7B%0A                me._closeMenu(event);%0A                event.preventDefault();%0A                return;%0A            %7D%0A%0A            //Clicked outside of menu%0A            if ($target.closest('%5Bclass*=%22global-nav__inner%22%5D').size() == 0) %7B%0A                me._closeMenu(event);%0A                event.preventDefault();%0A                return;%0A            %7D%0A%0A        %7D,%0A%0A
         _closeMe
@@ -3027,32 +3027,33 @@
 event, close) %7B%0A
+%0A
             var 
@@ -3682,20 +3682,30 @@
     
-return false
+event.preventDefault()
 ;%0A%0A 

rewrite global nav / document click open/close menu