// On docs/content pages, add a hierarchical quick nav menu if there are
// more than two H2/H3/H4 headers.
document.addEventListener("turbolinks:load", function() {
var headers = $('#inner').find('h2, h3, h4');
if (window.location.pathname !== "/docs/index.html" && $("div#inner-quicknav").length === 0 && headers.length > 0) {
// Build the quick-nav HTML:
$("#inner h1").first().after(
'
' +
'' +
'Jump to Section' +
'' +
'' +
'
' +
'
'
);
var quickNav = $('#inner-quicknav > ul.dropdown');
headers.each(function(index, element) {
var level = element.nodeName.toLowerCase();
var header_text = $(element).text();
var header_id = $(element).attr('id');
quickNav.append('