text: // :: 12.0 One Page Nav js
  ! function (i, t, n, s) {
      var e = function (s, e) {
          this.elem = s, this.$elem = i(s), this.options = e, this.metadata = this.$elem.data("plugin-options"), this.$win = i(t), this.sections = {}, this.didScroll = !1, this.$doc = i(n), this.docHeight = this.$doc.height()
      };
      e.prototype = {
          defaults: {
              navItems: "a",
              currentClass: "current",
              changeHash: !1,
              easing: "swing",
              filter: "",
              scrollSpeed: 750,
              scrollThreshold: .5,
              begin: !1,
              end: !1,
              scrollChange: !1
          },
          init: function () {
              return this.config = i.extend({}, this.defaults, this.options, this.metadata), this.$nav = this.$elem.find(this.config.navItems), "" !== this.config.filter && (this.$nav = this.$nav.filter(this.config.filter)), this.$nav.on("click.onePageNav", i.proxy(this.handleClick, this)), this.getPositions(), this.bindInterval(), this.$win.on("resize.onePageNav", i.proxy(this.getPositions, this)), this
          },
          adjustNav: function (i, t) {
              i.$elem.find("." + i.config.currentClass).removeClass(i.config.currentClass), t.addClass(i.config.currentClass)
          },
          bindInterval: function () {
              var t, i = this;
              i.$win.on("scroll.onePageNav", function () {
                  i.didScroll = !0
              }), i.t = setInterval(function () {
                  t = i.$doc.height(), i.didScroll && (i.didScroll = !1, i.scrollChange()), t !== i.docHeight && (i.docHeight = t, i.getPositions())
              }, 250)
          },
          getHash: function (i) {
              return i.attr("href").split("#")[1]
          },
          getPositions: function () {
              var n, s, e, t = this;
              t.$nav.each(function () {
                  n = t.getHash(i(this)), e = i("#" + n), e.length && (s = e.offset().top, t.sections[n] = Math.round(s))
              })
          },
          getSection: function (i) {
              var t = null,
                  n = Math.round(this.$win.height() * this.config.scrollThreshold);
              for (var s in this.sections) this.sections[s] - n < i && (t = s);
              return t
          },
          handleClick: function (n) {
              var s = this,
                  e = i(n.currentTarget),
                  o = e.parent(),
                  a = "#" + s.getHash(e);
              o.hasClass(s.config.currentClass) || (s.config.begin && s.config.begin(), s.adjustNav(s, o), s.unbindInterval(), s.scrollTo(a, function () {
                  s.config.changeHash && (t.location.hash = a), s.bindInterval(), s.config.end && s.config.end()
              })), n.preventDefault()
          },
          scrollChange: function () {
              var n, i = this.$win.scrollTop(),
                  t = this.getSection(i);
              null !== t && (n = this.$elem.find('a[href$="#' + t + '"]').parent(), n.hasClass(this.config.currentClass) || (this.adjustNav(this, n), this.config.scrollChange && this.config.scrollChange(n)))
          },
          scrollTo: function (t, n) {
              var s = i(t).offset().top - 70;
              i("html, body").animate({
                  scrollTop: s
              }, this.config.scrollSpeed, this.config.easing, n)
          },
          unbindInterval: function () {
              clearInterval(this.t), this.$win.unbind("scroll.onePageNav")
          }
      }, e.defaults = e.prototype.defaults, i.fn.onePageNav = function (i) {
          return this.each(function () {
              new e(this, i).init()
          })
      }
  }(jQuery, window, document);