document.addEventListener("DOMContentLoaded", function () {
  document.querySelectorAll(".pb-tab-link").forEach(function (link) {
    link.addEventListener("click", function (e) {
      e.preventDefault();
      var id = this.getAttribute("data-tab");
      document.querySelectorAll(".pb-tab").forEach(function (t) {
        t.style.display = "none";
      });
      document.querySelectorAll(".nav-tab").forEach(function (t) {
        t.classList.remove("nav-tab-active");
      });
      document.getElementById(id).style.display = "block";
      this.classList.add("nav-tab-active");
    });
  });
});
