                    tabs[0].focus();
                    }
                }
            }
        }

        /**
          Cycles through an array of tab elements and ensures 
          only the target tab and its content are selected
          @param {HTMLElement} tab the tab whose content will be shown
          @param {Array} tabs an array of tabs within a container
        */
        function setActiveTab(tab, tabs) {
            tabs.forEach(function (tabElement) {
                var tabContent = doc