/*global jQuery */
/*eslint no-unused-vars: 0*/
var ChromeBootstrap = {
  init: function() {
    // Menu functionality for chrome-bootstrap
    jQuery('.menu').on("click", "a", function(ev) {
      if(this.classList.contains("no-click")) {
        ev.preventDefault();
        return false;
      }
      jQuery('.mainview > *').removeClass("selected");
      jQuery('.menu li').removeClass("selected");
      jQuery('.mainview > *:not(.selected)').css('display', 'none');

      var $parent = jQuery(ev.currentTarget).parent();
      $parent.addClass("selected");

      var anchor = jQuery(ev.currentTarget).attr('href');
      var currentView = jQuery(anchor);
      currentView.css('display', 'block');
      currentView.addClass("selected");

      $parent.parent()[0].className = "menu " + anchor.substr(1);

      jQuery('body')[0].scrollTop = 0;
    });

    jQuery('.mainview > *:not(.selected)').css('display', 'none');

    var relocate = function(target) {
      var hash = window.location.hash;

      if (typeof target === "string") {
        hash = target;
      }

      if (hash) {
        var main = hash.replace(/-.*$/, "");
        var sub = hash.replace(/^.*?-/, "");
        var $nav = jQuery(".navigation a[href='" + main + "']");
        if ($nav.length === 1) {
          $nav.trigger("click");
        }

        // Activate sub-item
        if (sub !== "") {
          window.location.hash = "#help";
          window.location.hash = hash;
        }
      }

    };

    // Activate navigationitem via hashtag
    jQuery(window).on("load", relocate);

    jQuery(document).on("click", "a[href*=#help-]", function() {
      relocate(this.href.replace(/^.*#/, "#"));
    });

    jQuery(document).on("click", "a.activate-menu", relocate);

    jQuery(".menu a").on("click", function() {
      if(this.classList.contains("no-click")) {
        return false;
      }

      jQuery(".notice").hide();
    });
  }
};

@@ -864,79 +864,495 @@
     
-jQuery('.mainview %3E *:not(.selected)').css('display', 'none');%0A%0A    var
+// Activate navigationitem via hashtag%0A    jQuery(window).on(%22load%22, ChromeBootstrap.relocate);%0A%0A    jQuery(document).on(%22click%22, %22a%5Bhref*=#help-%5D%22, function() %7B%0A      ChromeBootstrap.relocate(this.href.replace(/%5E.*#/, %22#%22));%0A    %7D);%0A%0A    jQuery(document).on(%22click%22, %22a.activate-menu%22, ChromeBootstrap.relocate);%0A%0A    jQuery(%22.menu a%22).on(%22click%22, function() %7B%0A      if(this.classList.contains(%22no-click%22)) %7B%0A        return false;%0A      %7D%0A%0A      jQuery(%22.notice%22).hide();%0A    %7D);%0A  %7D,%0A 
  rel
@@ -1356,18 +1356,17 @@
 relocate
- =
+:
  functio
@@ -1377,26 +1377,24 @@
 rget) %7B%0A    
-  
 var hash = w
@@ -1415,18 +1415,16 @@
 .hash;%0A%0A
-  
     if (
@@ -1459,18 +1459,16 @@
 %7B%0A      
-  
 hash = t
@@ -1474,31 +1474,27 @@
 target;%0A    
- 
- 
 %7D%0A%0A
-  
     if (hash
@@ -1499,26 +1499,24 @@
 sh) %7B%0A      
- 
- 
 var main = h
@@ -1532,34 +1532,32 @@
 ce(/-.*$/, %22%22);%0A
-  
       var sub = 
@@ -1585,26 +1585,24 @@
  %22%22);%0A      
- 
- 
 var $nav = j
@@ -1648,26 +1648,24 @@
 '%5D%22);%0A      
-  
 if ($nav.len
@@ -1685,18 +1685,16 @@
         
-  
 $nav.tri
@@ -1704,26 +1704,24 @@
 r(%22click%22);%0A
-  
       %7D%0A%0A   
@@ -1723,18 +1723,16 @@
 %0A%0A      
-  
 // Activ
@@ -1744,18 +1744,16 @@
 ub-item%0A
-  
       if
@@ -1768,34 +1768,32 @@
 = %22%22) %7B%0A        
-  
 window.location.
@@ -1808,18 +1808,16 @@
 #help%22;%0A
-  
         
@@ -1855,465 +1855,15 @@
     
-  %7D%0A      %7D%0A%0A    %7D;%0A%0A    // Activate navigationitem via hashtag%0A    jQuery(window).on(%22load%22, relocate);%0A%0A    jQuery(document).on(%22click%22, %22a%5Bhref*=#help-%5D%22, function() %7B%0A      relocate(this.href.replace(/%5E.*#/, %22#%22));%0A    %7D);%0A%0A    jQuery(document).on(%22click%22, %22a.activate-menu%22, relocate);%0A%0A    jQuery(%22.menu a%22).on(%22click%22, function() %7B%0A      if(this.classList.contains(%22no-click%22)) %7B%0A        return false;%0A      %7D%0A%0A      jQuery(%22.notice%22).hide();%0A    %7D);
+%7D%0A    %7D
 %0A  %7D

move #relocate up