const MODULE_NAME = 'solitude.navigation.service';

/**
* The NavigationService class manages the opening and closing of
* the sidebar navigation menu.
*
* @class
* @type Class
* @return public API
 */
export class NavigationService {
    constructor() {
        this.isNavigationOpen = false;
        this.cacheNodes();
        this.prepareDOM();
        this.bindEventListeners();
    }

    checkNodes() {
        let nodes = true;

        if (this.siteWrapper.length === 0 || this.menuButton.length === 0 ||
            this.navigationSidebarMask.length === 0 || this.navigationClose.length === 0) {
                console.info('NavigationService. Missing DOM nodes. The navigation menu is inoperable.');
                nodes = false;
        }

        return nodes;
    }

    cacheNodes() {
        this.siteWrapper = $('#siteWrapper');
        this.menuButton = $('#menuButton');
        this.navigationSidebarMask = $('#navigationSidebarMask');
        this.navigationClose = $('#navigationClose');
    }

    prepareDOM() {
        if (!this.checkNodes()) {
            return;
        }

        this.siteWrapper.addClass('navigation-close');
    }

    toggleNavigationMenu() {
        if (!this.checkNodes()) {
            return;
        }

        this.isNavigationOpen = !this.isNavigationOpen;
        if (!this.isNavigationOpen) {
            this.siteWrapper.removeClass('navigation-open').addClass('navigation-close');
            this.menuButton.focus();
        } else {
            this.siteWrapper.removeClass('navigation-close').addClass('navigation-open');
            this.navigationClose.focus();
        }
    }

    bindEventListeners() {
        if (!this.checkNodes()) {
            return;
        }

        this.menuButton.off().on('click', (e) => this.toggleNavigationMenu(e));
        this.navigationClose.off().on('click', (e) => this.toggleNavigationMenu(e));
    }
}

@@ -441,16 +441,17 @@
     if (
+!
 this.sit
@@ -458,33 +458,21 @@
 eWrapper
-.length === 0
  %7C%7C 
+!
 this.men
@@ -478,29 +478,16 @@
 nuButton
-.length === 0
  %7C%7C%0A    
@@ -486,32 +486,33 @@
  %7C%7C%0A            
+!
 this.navigationS
@@ -525,25 +525,13 @@
 Mask
-.length === 0
  %7C%7C 
+!
 this
@@ -550,21 +550,8 @@
 lose
-.length === 0
 ) %7B%0A
@@ -773,17 +773,38 @@
 apper = 
-$
+document.querySelector
 ('#siteW
@@ -839,17 +839,38 @@
 utton = 
-$
+document.querySelector
 ('#menuB
@@ -915,17 +915,38 @@
 rMask = 
-$
+document.querySelector
 ('#navig
@@ -1000,9 +1000,30 @@
 e = 
-$
+document.querySelector
 ('#n
@@ -1156,24 +1156,29 @@
 Wrapper.
-addClass
+classList.add
 ('naviga
@@ -1223,16 +1223,17 @@
 ionMenu(
+e
 ) %7B%0A    
@@ -1412,35 +1412,40 @@
 siteWrapper.
+classList.
 remove
-Class
 ('navigation
@@ -1451,25 +1451,60 @@
 n-open')
-.addClass
+;%0A            this.siteWrapper.classList.add
 ('naviga
@@ -1604,19 +1604,24 @@
 per.
+classList.
 remove
-Class
 ('na
@@ -1640,17 +1640,52 @@
 se')
-.addClass
+;%0A            this.siteWrapper.classList.add
 ('na
@@ -1876,24 +1876,93 @@
 uButton.
-off().on
+removeEventListener('click', false);%0A        this.menuButton.addEventListener
 ('click'
@@ -1994,27 +1994,35 @@
 ationMenu(e)
+, false
 );%0A
+%0A
         this
@@ -2042,16 +2042,90 @@
 ose.
-off().on
+removeEventListener('click', false);%0A        this.navigationClose.addEventListener
 ('cl
@@ -2165,16 +2165,23 @@
 nMenu(e)
+, false
 );%0A    %7D

Replace jQuery implementation with native api commands.