--- /dev/null
+(function() {
+
+ 'use strict';
+
+ /**
+ * tabs
+ *
+ * @description The Tabs component.
+ * @param {Object} options The options hash
+ */
+ var tabs = function(options) {
+
+ var el = document.querySelector(options.el);
+ var tabNavigationLinks = el.querySelectorAll(options.tabNavigationLinks);
+ var tabContentContainers = el.querySelectorAll(options.tabContentContainers);
+ var activeIndex = 0;
+ var initCalled = false;
+
+ /**
+ * init
+ *
+ * @description Initializes the component by removing the no-js class from
+ * the component, and attaching event listeners to each of the nav items.
+ * Returns nothing.
+ */
+ var init = function() {
+ if (!initCalled) {
+ initCalled = true;
+ el.classList.remove('no-js');
+
+ for (var i = 0; i < tabNavigationLinks.length; i++) {
+ var link = tabNavigationLinks[i];
+ handleClick(link, i);
+ }
+ }
+ };
+
+ /**
+ * handleClick
+ *
+ * @description Handles click event listeners on each of the links in the
+ * tab navigation. Returns nothing.
+ * @param {HTMLElement} link The link to listen for events on
+ * @param {Number} index The index of that link
+ */
+ var handleClick = function(link, index) {
+ link.addEventListener('click', function(e) {
+ e.preventDefault();
+ goToTab(index);
+ });
+ };
+
+ /**
+ * goToTab
+ *
+ * @description Goes to a specific tab based on index. Returns nothing.
+ * @param {Number} index The index of the tab to go to
+ */
+ var goToTab = function(index) {
+ if (index !== activeIndex && index >= 0 && index <= tabNavigationLinks.length) {
+ tabNavigationLinks[activeIndex].classList.remove('is-active');
+ tabNavigationLinks[index].classList.add('is-active');
+ tabContentContainers[activeIndex].classList.remove('is-active');
+ tabContentContainers[index].classList.add('is-active');
+ activeIndex = index;
+ }
+ };
+
+ /**
+ * Returns init and goToTab
+ */
+ return {
+ init: init,
+ goToTab: goToTab
+ };
+
+ };
+
+ /**
+ * Attach to global namespace
+ */
+ window.tabs = tabs;
+
+})();
\ No newline at end of file
--- /dev/null
+/**
+ * Tabs navigation
+ */
+.c-tabs-nav {
+ display: block;
+ float: left;
+ text-align: left;
+ width: 30%;
+}
+
+.c-tabs-nav__link {
+ // margin-right: 4px;
+ // padding: 12px;
+ color: $main_color;
+ display: block;
+ // background-color: #b3b3b3;
+ // text-align: center;
+ -webkit-transition: color 0.3s;
+ transition: color 0.3s;
+}
+
+.c-tabs-nav__link:last-child {
+ margin-right: 0;
+}
+
+.c-tabs-nav__link:hover {
+ // color: #6d6d6d;
+}
+
+.c-tabs-nav__link.is-active {
+ color: darken($main_color, 20);
+ // background-color: #e7e7e7;
+}
+
+.c-tabs-nav__link i,
+.c-tabs-nav__link span {
+ margin: 0;
+ padding: 0;
+ line-height: 1;
+}
+
+.c-tabs-nav__link i {
+ font-size: 18px;
+}
+
+.c-tabs-nav__link span {
+ display: none;
+ font-size: 18px;
+}
+
+@media all and (min-width: 720px) {
+ .c-tabs-nav__link i {
+ margin-bottom: 12px;
+ font-size: 22px;
+ }
+ .c-tabs-nav__link span {
+ display: block;
+ }
+}
+
+/**
+ * Tab
+ */
+.c-tab {
+ display: none;
+ // background-color: #e7e7e7;
+ float: left;
+ width: 70%;
+}
+
+.c-tab.is-active {
+ display: block;
+}
+
+.c-tab__content {
+ padding-left: .5rem;
+}
+
+/**
+ * Tabs no-js fallback
+ */
+.c-tabs.no-js .c-tabs-nav {
+ display: none;
+}
+
+.c-tabs.no-js .c-tab {
+ display: block;
+ margin-bottom: 1.5rem;
+}
+
+.c-tabs.no-js .c-tab:last-child {
+ margin-bottom: 0;
+}
\ No newline at end of file