();
                });
            })
        });

        if (sessionStorage) {
            var curLang = sessionStorage.getItem('nats-api-language');
            var queryLang = getLanguageParameter();
            var lang = curLang;

            if (queryLang) { // query takes precedent
                lang = queryLang
            }

            if (lang) {
                document.querySelectorAll('.api-lang[data-language=' + lang + ']').forEach(elem => {
                    elem.click();
             