document.addEventListener("DOMContentLoaded", function(){
  var select = document.querySelector('.locales select');
  select.addEventListener('change', function(event){
    origin = window.location.origin;
    languageCode = event.currentTarget.selectedOptions[0].value
    window.location.replace(origin + "/" + languageCode)
  });

  var faqHeaders = document.querySelectorAll('.frequently-asked-questions h4');

  for(header of faqHeaders){
    header.addEventListener('click', toggleVisibility);
  }

  function toggleVisibility(event) {
    element = event.target;
    element.classList.toggle('is-visible')

    lastParagraph = element.nextElementSibling;
    paragraphs = [];
    paragraphs.push(lastParagraph);

    while (lastParagraph.nextElementSibling.tagName == "P") {
      lastParagraph = lastParagraph.nextElementSibling;
      paragraphs.push(lastParagraph)
    }

    for(paragraph of paragraphs) {
      paragraph.classList.toggle('is-visible');
    }
  }
});

@@ -417,18 +417,63 @@
  for
-(
+ (var i = 0; i %3C faqHeaders.length; ++i) %7B%0A    
 header 
-of
+=
  faq
@@ -479,18 +479,19 @@
 qHeaders
-)%7B
+%5Bi%5D
 %0A    hea
@@ -932,35 +932,82 @@
  for
-(paragraph of paragraphs) %7B
+ (var i = 0; i %3C paragraphs.length; ++i) %7B%0A      paragraph = paragraphs%5Bi%5D
 %0A   

Fix loops for ExecJS