").addClass(c .navContainerClass) .appendTo(this.$element)).addClass("disabled"), this._controls.$previous = a("<" + c .navElement + ">") .addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click", a .proxy( function (a) { this.prev(c.navSpeed) }, this)), this._controls.$next = a("<" + c.navElement + ">").addClass(c.navClass[1]) .html(c.navText[1]) .appendTo(this._controls.$relative).on("click", a.proxy(function (a) { this.next(c.navSpeed) }, this)), c.dotsData || (this._templates = [a("
").addClass(c.dotClass).append(a("")) .prop( "outerHTML") ]), this._controls.$absolute = (c.dotsContainer ? a(c.dotsContainer) : a("").addClass(c .dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on( "click", "div", a .proxy(function (b) { var d = a(b.target).parent().is(this._controls.$absolute) ? a(b.target).index() : a( b.target).parent() .index(); b.preventDefault(), this.to(d, c.dotsSpeed) }, this)); for (b in this._overrides) this._core[b] = a.proxy(this[b], this) }, e.prototype.destroy = function () { var a, b, c, d; for (a in this._handlers) this.$element.off(a, this._handlers[a]); for (b in this._controls) this._controls[b].remove(); for (d in this.overides) this._core[d] = this._overrides[d]; for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null) }, e.prototype.update = function () { var a, b, c, d = this._core.clones().length / 2, e = d + this._core.items().length, f = this._core.maximum(!0), g = this._core.settings, h = g.center || g.autoWidth || g.dotsData ? 1 : g.dotsEach || g.items; if ("page" !== g.slideBy && (g.slideBy = Math.min(g.slideBy, g.items)), g.dots || "page" == g .slideBy) for (this._pages = [], a = d, b = 0, c = 0; e > a; a++) { if (b >= h || 0 === b) { if (this._pages.push({ start: Math.min(f, a - d), end: a - d + h - 1 }), Math.min(f, a - d) === f) break; b = 0, ++c } b += this._core.mergers(this._core.relative(a)) } }, e.prototype.draw = function () { var b, c = this._core.settings, d = this._core.items().length <= c.items, e = this._core.relative(this._core.current()), f = c.loop || c.rewind; this._controls.$relative.toggleClass("disabled", !c.nav || d), c.nav && (this._controls.$previous .toggleClass( "disabled", !f && e <= this._core.minimum(!0)), this._controls.$next.toggleClass( "disabled", !f && e >= this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !c.dots || d), c.dots && (b = this._pages.length - this._controls.$absolute.children().length, c.dotsData && 0 !== b ? this._controls .$absolute.html(this._templates.join("")) : b > 0 ? this._controls.$absolute.append( new Array(b + 1).join( this._templates[0])) : 0 > b && this._controls.$absolute.children().slice(b) .remove(), this._controls .$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq(a .inArray(this .current(), this._pages)).addClass("active")) }, e.prototype.onTrigger = function (b) { var c = this._core.settings; b.page = { index: a.inArray(this.current(), this._pages), count: this._pages.length, size: c && (c.center || c.autoWidth || c.dotsData ? 1 : c.dotsEach || c.items) } }, e.prototype.current = function () { var b = this._core.relative(this._core.current()); return a.grep(this._pages, a.proxy(function (a, c) { return a.start <= b && a.end >= b }, this)).pop() }, e.prototype.getPosition = function (b) { var c, d, e = this._core.settings; return "page" == e.slideBy ? (c = a.inArray(this.current(), this._pages), d = this._pages.length, b ? ++c : -- c, c = this._pages[(c % d + d) % d].start) : (c = this._core.relative(this._core.current()), d = this ._core.items().length, b ? c += e.slideBy : c -= e.slideBy), c }, e.prototype.next = function (b) { a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b) }, e.prototype.prev = function (b) { a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b) }, e.prototype.to = function (b, c, d) { var e; !d && this._pages.length ? (e = this._pages.length, a.proxy(this._overrides.to, this._core)(this ._pages[(b % e + e) % e].start, c)) : a.proxy(this._overrides.to, this._core)(b, c) }, a.fn.owlCarousel.Constructor.Plugins.Navigation = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { "use strict"; var e = function (c) { this._core = c, this._hashes = {}, this.$element = this._core.$element, this._handlers = { "initialized.owl.carousel": a.proxy(function (c) { c.namespace && "URLHash" === this._core.settings.startPosition && a(b).trigger( "hashchange.owl.navigation") }, this), "prepared.owl.carousel": a.proxy(function (b) { if (b.namespace) { var c = a(b.content).find("[data-hash]").addBack("[data-hash]").attr( "data-hash"); if (!c) return; this._hashes[c] = b.content } }, this), "changed.owl.carousel": a.proxy(function (c) { if (c.namespace && "position" === c.property.name) { var d = this._core.items(this._core.relative(this._core.current())), e = a.map(this._hashes, function (a, b) { return a === d ? b : null }).join(); if (!e || b.location.hash.slice(1) === e) return; b.location.hash = e } }, this) }, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this ._handlers), a(b) .on("hashchange.owl.navigation", a.proxy(function (a) { var c = b.location.hash.substring(1), e = this._core.$stage.children(), f = this._hashes[c] && e.index(this._hashes[c]); f !== d && f !== this._core.current() && this._core.to(this._core.relative(f), !1, ! 0) }, this)) }; e.Defaults = { URLhashListener: !1 }, e.prototype.destroy = function () { var c, d; a(b).off("hashchange.owl.navigation"); for (c in this._handlers) this._core.$element.off(c, this._handlers[c]); for (d in Object.getOwnPropertyNames(this)) "function" != typeof this[d] && (this[d] = null) }, a.fn.owlCarousel.Constructor.Plugins.Hash = e }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { function e(b, c) { var e = !1, f = b.charAt(0).toUpperCase() + b.slice(1); return a.each((b + " " + h.join(f + " ") + f).split(" "), function (a, b) { return g[b] !== d ? (e = c ? b : !0, !1) : void 0 }), e } function f(a) { return e(a, !0) } var g = a("
").get(0).style, h = "Webkit Moz O ms".split(" "), i = { transition: { end: { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", transition: "transitionend" } }, animation: { end: { WebkitAnimation: "webkitAnimationEnd", MozAnimation: "animationend", OAnimation: "oAnimationEnd", animation: "animationend" } } }, j = { csstransforms: function () { return !!e("transform") }, csstransforms3d: function () { return !!e("perspective") }, csstransitions: function () { return !!e("transition") }, cssanimations: function () { return !!e("animation") } }; j.csstransitions() && (a.support.transition = new String(f("transition")), a.support.transition.end = i .transition .end[a.support.transition]), j.cssanimations() && (a.support.animation = new String(f("animation")), a.support .animation.end = i.animation.end[a.support.animation]), j.csstransforms() && (a.support.transform = new String(f("transform")), a.support.transform3d = j.csstransforms3d()) }(window.Zepto || window.jQuery, window, document); ! function (a, b, c, d) { function e(b, c) { this.element = b, this.options = a.extend({}, g, c), this._defaults = g, this._name = f, this.init() } var f = "stellar", g = { scrollProperty: "scroll", positionProperty: "position", horizontalScrolling: !0, verticalScrolling: !0, horizontalOffset: 0, verticalOffset: 0, responsive: !1, parallaxBackgrounds: !0, parallaxElements: !0, hideDistantElements: !0, hideElement: function (a) { a.hide() }, showElement: function (a) { a.show() } }, h = { scroll: { getLeft: function (a) { return a.scrollLeft() }, setLeft: function (a, b) { a.scrollLeft(b) }, getTop: function (a) { return a.scrollTop() }, setTop: function (a, b) { a.scrollTop(b) } }, position: { getLeft: function (a) { return -1 * parseInt(a.css("left"), 10) }, getTop: function (a) { return -1 * parseInt(a.css("top"), 10) } }, margin: { getLeft: function (a) { return -1 * parseInt(a.css("margin-left"), 10) }, getTop: function (a) { return -1 * parseInt(a.css("margin-top"), 10) } }, transform: { getLeft: function (a) { var b = getComputedStyle(a[0])[k]; return "none" !== b ? -1 * parseInt(b.match(/(-?[0-9]+)/g)[4], 10) : 0 }, getTop: function (a) { var b = getComputedStyle(a[0])[k]; return "none" !== b ? -1 * parseInt(b.match(/(-?[0-9]+)/g)[5], 10) : 0 } } }, i = { position: { setLeft: function (a, b) { a.css("left", b) }, setTop: function (a, b) { a.css("top", b) } }, transform: { setPosition: function (a, b, c, d, e) { a[0].style[k] = "translate3d(" + (b - c) + "px, " + (d - e) + "px, 0)" } } }, j = function () { var b, c = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, d = a("script")[0].style, e = ""; for (b in d) if (c.test(b)) { e = b.match(c)[0]; break } return "WebkitOpacity" in d && (e = "Webkit"), "KhtmlOpacity" in d && (e = "Khtml"), function (a) { return e + (e.length > 0 ? a.charAt(0).toUpperCase() + a.slice(1) : a) } }(), k = j("transform"), l = a("", { style: "background:#fff" }).css("background-position-x") !== d, m = l ? function (a, b, c) { a.css({ "background-position-x": b, "background-position-y": c }) } : function (a, b, c) { a.css("background-position", b + " " + c) }, n = l ? function (a) { return [a.css("background-position-x"), a.css("background-position-y")] } : function (a) { return a.css("background-position").split(" ") }, o = b.requestAnimationFrame || b.webkitRequestAnimationFrame || b.mozRequestAnimationFrame || b .oRequestAnimationFrame || b.msRequestAnimationFrame || function (a) { setTimeout(a, 1e3 / 60) }; e.prototype = { init: function () { this.options.name = f + "_" + Math.floor(1e9 * Math.random()), this._defineElements(), this ._defineGetters(), this._defineSetters(), this._handleWindowLoadAndResize(), this ._detectViewport(), this.refresh({ firstLoad: !0 }), "scroll" === this.options.scrollProperty ? this._handleScrollEvent() : this ._startAnimationLoop() }, _defineElements: function () { this.element === c.body && (this.element = b), this.$scrollElement = a(this.element), this .$element = this .element === b ? a("body") : this.$scrollElement, this.$viewportElement = this.options .viewportElement !== d ? a(this.options.viewportElement) : this.$scrollElement[0] === b || "scroll" === this.options.scrollProperty ? this.$scrollElement : this.$scrollElement.parent() }, _defineGetters: function () { var a = this, b = h[a.options.scrollProperty]; this._getScrollLeft = function () { return b.getLeft(a.$scrollElement) }, this._getScrollTop = function () { return b.getTop(a.$scrollElement) } }, _defineSetters: function () { var b = this, c = h[b.options.scrollProperty], d = i[b.options.positionProperty], e = c.setLeft, f = c.setTop; this._setScrollLeft = "function" == typeof e ? function (a) { e(b.$scrollElement, a) } : a.noop, this._setScrollTop = "function" == typeof f ? function (a) { f(b.$scrollElement, a) } : a.noop, this._setPosition = d.setPosition || function (a, c, e, f, g) { b.options.horizontalScrolling && d.setLeft(a, c, e), b.options.verticalScrolling && d.setTop(a, f, g) } }, _handleWindowLoadAndResize: function () { var c = this, d = a(b); c.options.responsive && d.bind("load." + this.name, function () { c.refresh() }), d.bind("resize." + this.name, function () { c._detectViewport(), c.options.responsive && c.refresh() }) }, refresh: function (c) { var d = this, e = d._getScrollLeft(), f = d._getScrollTop(); c && c.firstLoad || this._reset(), this._setScrollLeft(0), this._setScrollTop(0), this ._setOffsets(), this ._findParticles(), this._findBackgrounds(), c && c.firstLoad && /WebKit/.test(navigator .userAgent) && a( b).load(function () { var a = d._getScrollLeft(), b = d._getScrollTop(); d._setScrollLeft(a + 1), d._setScrollTop(b + 1), d._setScrollLeft(a), d ._setScrollTop(b) }), this._setScrollLeft(e), this._setScrollTop(f) }, _detectViewport: function () { var a = this.$viewportElement.offset(), b = null !== a && a !== d; this.viewportWidth = this.$viewportElement.width(), this.viewportHeight = this .$viewportElement.height(), this.viewportOffsetTop = b ? a.top : 0, this.viewportOffsetLeft = b ? a.left : 0 }, _findParticles: function () { { var b = this; this._getScrollLeft(), this._getScrollTop() } if (this.particles !== d) for (var c = this.particles.length - 1; c >= 0; c--) this.particles[c].$element.data( "stellar-elementIsActive", d); this.particles = [], this.options.parallaxElements && this.$element.find( "[data-stellar-ratio]").each( function () { var c, e, f, g, h, i, j, k, l, m = a(this), n = 0, o = 0, p = 0, q = 0; if (m.data("stellar-elementIsActive")) { if (m.data("stellar-elementIsActive") !== this) return } else m.data("stellar-elementIsActive", this); b.options.showElement(m), m.data("stellar-startingLeft") ? (m.css("left", m .data( "stellar-startingLeft")), m.css("top", m.data( "stellar-startingTop"))) : (m.data( "stellar-startingLeft", m.css("left")), m.data( "stellar-startingTop", m.css("top"))), f = m .position().left, g = m.position().top, h = "auto" === m.css( "margin-left") ? 0 : parseInt(m.css( "margin-left"), 10), i = "auto" === m.css("margin-top") ? 0 : parseInt(m .css("margin-top"), 10), k = m.offset().left - h, l = m.offset().top - i, m.parents().each( function () { var b = a(this); return b.data("stellar-offset-parent") === !0 ? (n = p, o = q, j = b, !1) : (p += b.position() .left, void(q += b.position().top)) }), c = m.data("stellar-horizontal-offset") !== d ? m.data( "stellar-horizontal-offset") : j !== d && j.data("stellar-horizontal-offset") !== d ? j.data( "stellar-horizontal-offset") : b .horizontalOffset, e = m.data("stellar-vertical-offset") !== d ? m.data( "stellar-vertical-offset") : j !== d && j.data( "stellar-vertical-offset") !== d ? j.data( "stellar-vertical-offset") : b.verticalOffset, b.particles.push({ $element: m, $offsetParent: j, isFixed: "fixed" === m.css("position"), horizontalOffset: c, verticalOffset: e, startingPositionLeft: f, startingPositionTop: g, startingOffsetLeft: k, startingOffsetTop: l, parentOffsetLeft: n, parentOffsetTop: o, stellarRatio: m.data("stellar-ratio") !== d ? m.data( "stellar-ratio") : 1, width: m.outerWidth(!0), height: m.outerHeight(!0), isHidden: !1 }) }) }, _findBackgrounds: function () { var b, c = this, e = this._getScrollLeft(), f = this._getScrollTop(); this.backgrounds = [], this.options.parallaxBackgrounds && (b = this.$element.find( "[data-stellar-background-ratio]"), this.$element.data( "stellar-background-ratio") && (b = b.add( this.$element)), b.each(function () { var b, g, h, i, j, k, l, o = a(this), p = n(o), q = 0, r = 0, s = 0, t = 0; if (o.data("stellar-backgroundIsActive")) { if (o.data("stellar-backgroundIsActive") !== this) return } else o.data("stellar-backgroundIsActive", this); o.data("stellar-backgroundStartingLeft") ? m(o, o.data( "stellar-backgroundStartingLeft"), o.data( "stellar-backgroundStartingTop")) : (o.data( "stellar-backgroundStartingLeft", p[0]), o.data( "stellar-backgroundStartingTop", p[1])), h = "auto" === o.css( "margin-left") ? 0 : parseInt(o .css("margin-left"), 10), i = "auto" === o.css("margin-top") ? 0 : parseInt(o.css( "margin-top"), 10), j = o.offset().left - h - e, k = o.offset() .top - i - f, o.parents().each( function () { var b = a(this); return b.data("stellar-offset-parent") === !0 ? (q = s, r = t, l = b, !1) : (s += b .position().left, void(t += b.position().top)) }), b = o.data("stellar-horizontal-offset") !== d ? o.data( "stellar-horizontal-offset") : l !== d && l.data("stellar-horizontal-offset") !== d ? l.data( "stellar-horizontal-offset") : c .horizontalOffset, g = o.data("stellar-vertical-offset") !== d ? o.data( "stellar-vertical-offset") : l !== d && l.data( "stellar-vertical-offset") !== d ? l.data( "stellar-vertical-offset") : c.verticalOffset, c.backgrounds.push({ $element: o, $offsetParent: l, isFixed: "fixed" === o.css("background-attachment"), horizontalOffset: b, verticalOffset: g, startingValueLeft: p[0], startingValueTop: p[1], startingBackgroundPositionLeft: isNaN(parseInt(p[0], 10)) ? 0 : parseInt(p[0], 10), startingBackgroundPositionTop: isNaN(parseInt(p[1], 10)) ? 0 : parseInt(p[1], 10), startingPositionLeft: o.position().left, startingPositionTop: o.position().top, startingOffsetLeft: j, startingOffsetTop: k, parentOffsetLeft: q, parentOffsetTop: r, stellarRatio: o.data("stellar-background-ratio") === d ? 1 : o .data( "stellar-background-ratio") }) })) }, _reset: function () { var a, b, c, d, e; for (e = this.particles.length - 1; e >= 0; e--) a = this.particles[e], b = a.$element.data( "stellar-startingLeft"), c = a.$element.data("stellar-startingTop"), this ._setPosition(a.$element, b, b, c, c), this.options.showElement(a.$element), a.$element.data( "stellar-startingLeft", null).data( "stellar-elementIsActive", null).data("stellar-backgroundIsActive", null); for (e = this.backgrounds.length - 1; e >= 0; e--) d = this.backgrounds[e], d.$element.data( "stellar-backgroundStartingLeft", null).data("stellar-backgroundStartingTop", null), m(d.$element, d .startingValueLeft, d.startingValueTop) }, destroy: function () { this._reset(), this.$scrollElement.unbind("resize." + this.name).unbind("scroll." + this .name), this ._animationLoop = a.noop, a(b).unbind("load." + this.name).unbind("resize." + this.name) }, _setOffsets: function () { var c = this, d = a(b); d.unbind("resize.horizontal-" + this.name).unbind("resize.vertical-" + this.name), "function" == typeof this.options.horizontalOffset ? (this.horizontalOffset = this.options .horizontalOffset(), d.bind( "resize.horizontal-" + this.name, function () { c.horizontalOffset = c.options.horizontalOffset() })) : this.horizontalOffset = this.options.horizontalOffset, "function" == typeof this.options .verticalOffset ? (this.verticalOffset = this.options.verticalOffset(), d.bind( "resize.vertical-" + this .name, function () { c.verticalOffset = c.options.verticalOffset() })) : this.verticalOffset = this.options.verticalOffset }, _repositionElements: function () { var a, b, c, d, e, f, g, h, i, j, k = this._getScrollLeft(), l = this._getScrollTop(), n = !0, o = !0; if (this.currentScrollLeft !== k || this.currentScrollTop !== l || this.currentWidth !== this .viewportWidth || this.currentHeight !== this.viewportHeight) { for (this.currentScrollLeft = k, this.currentScrollTop = l, this.currentWidth = this .viewportWidth, this .currentHeight = this.viewportHeight, j = this.particles.length - 1; j >= 0; j--) a = this.particles[ j], b = a.isFixed ? 1 : 0, this.options.horizontalScrolling ? (f = (k + a .horizontalOffset + this .viewportOffsetLeft + a.startingPositionLeft - a.startingOffsetLeft + a .parentOffsetLeft) * -(a .stellarRatio + b - 1) + a.startingPositionLeft, h = f - a .startingPositionLeft + a .startingOffsetLeft) : (f = a.startingPositionLeft, h = a.startingOffsetLeft), this.options .verticalScrolling ? (g = (l + a.verticalOffset + this.viewportOffsetTop + a .startingPositionTop - a .startingOffsetTop + a.parentOffsetTop) * -(a.stellarRatio + b - 1) + a .startingPositionTop, i = g - a.startingPositionTop + a.startingOffsetTop) : (g = a.startingPositionTop, i = a .startingOffsetTop), this.options.hideDistantElements && (o = !this.options .horizontalScrolling || h + a.width > (a.isFixed ? 0 : k) && h < (a.isFixed ? 0 : k) + this .viewportWidth + this .viewportOffsetLeft, n = !this.options.verticalScrolling || i + a.height > (a .isFixed ? 0 : l) && i < (a.isFixed ? 0 : l) + this.viewportHeight + this.viewportOffsetTop), o && n ? (a.isHidden && ( this.options.showElement(a.$element), a.isHidden = !1), this._setPosition(a .$element, f, a .startingPositionLeft, g, a.startingPositionTop)) : a.isHidden || (this.options .hideElement(a .$element), a.isHidden = !0); for (j = this.backgrounds.length - 1; j >= 0; j--) c = this.backgrounds[j], b = c .isFixed ? 0 : 1, d = this.options.horizontalScrolling ? (k + c.horizontalOffset - this .viewportOffsetLeft - c .startingOffsetLeft + c.parentOffsetLeft - c.startingBackgroundPositionLeft) * ( b - c .stellarRatio) + "px" : c.startingValueLeft, e = this.options .verticalScrolling ? (l + c .verticalOffset - this.viewportOffsetTop - c.startingOffsetTop + c .parentOffsetTop - c .startingBackgroundPositionTop) * (b - c.stellarRatio) + "px" : c .startingValueTop, m(c.$element, d, e) } }, _handleScrollEvent: function () { var a = this, b = !1, c = function () { a._repositionElements(), b = !1 }, d = function () { b || (o(c), b = !0) }; this.$scrollElement.bind("scroll." + this.name, d), d() }, _startAnimationLoop: function () { var a = this; this._animationLoop = function () { o(a._animationLoop), a._repositionElements() }, this._animationLoop() } }, a.fn[f] = function (b) { var c = arguments; return b === d || "object" == typeof b ? this.each(function () { a.data(this, "plugin_" + f) || a.data(this, "plugin_" + f, new e(this, b)) }) : "string" == typeof b && "_" !== b[0] && "init" !== b ? this.each(function () { var d = a.data(this, "plugin_" + f); d instanceof e && "function" == typeof d[b] && d[b].apply(d, Array.prototype.slice.call( c, 1)), "destroy" === b && a.data(this, "plugin_" + f, null) }) : void 0 }, a[f] = function () { var c = a(b); return c.stellar.apply(c, Array.prototype.slice.call(arguments, 0)) }, a[f].scrollProperty = h, a[f].positionProperty = i, b.Stellar = e }(jQuery, this, document); ! function ($) { "use strict"; var Typed = function (el, options) { // chosen element to manipulate text this.el = $(el); // options this.options = $.extend({}, $.fn.typed.defaults, options); // attribute to type into this.isInput = this.el.is('input'); this.attr = this.options.attr; // show cursor this.showCursor = this.isInput ? false : this.options.showCursor; // text content of element this.elContent = this.attr ? this.el.attr(this.attr) : this.el.text(); // html or plain text this.contentType = this.options.contentType; // typing speed this.typeSpeed = this.options.typeSpeed; // add a delay before typing starts this.startDelay = this.options.startDelay; // backspacing speed this.backSpeed = this.options.backSpeed; // amount of time to wait before backspacing this.backDelay = this.options.backDelay; // div containing strings this.stringsElement = this.options.stringsElement; // input strings of text this.strings = this.options.strings; // character number position of current string this.strPos = 0; // current array position this.arrayPos = 0; // number to stop backspacing on. // default 0, can change depending on how many chars // you want to remove at the time this.stopNum = 0; // Looping logic this.loop = this.options.loop; this.loopCount = this.options.loopCount; this.curLoop = 0; // for stopping this.stop = false; // custom cursor this.cursorChar = this.options.cursorChar; // shuffle the strings this.shuffle = this.options.shuffle; // the order of strings this.sequence = []; // All systems go! this.build(); }; Typed.prototype = { constructor: Typed, init: function () { // begin the loop w/ first current string (global self.strings) // current string will be passed as an argument each time after this var self = this; self.timeout = setTimeout(function () { for (var i = 0; i < self.strings.length; ++i) self.sequence[i] = i; // shuffle the array if true if (self.shuffle) self.sequence = self.shuffleArray(self.sequence); // Start typing self.typewrite(self.strings[self.sequence[self.arrayPos]], self.strPos); }, self.startDelay); }, build: function () { var self = this; // Insert cursor if (this.showCursor === true) { this.cursor = $("" + this.cursorChar + ""); this.el.after(this.cursor); } if (this.stringsElement) { this.strings = []; this.stringsElement.hide(); console.log(this.stringsElement.children()); var strings = this.stringsElement.children(); $.each(strings, function (key, value) { self.strings.push($(value).html()); }); } this.init(); }, // pass current string state to each function, types 1 char per call typewrite: function (curString, curStrPos) { // exit when stopped if (this.stop === true) { return; } // varying values for setTimeout during typing // can't be global since number changes each time loop is executed var humanize = Math.round(Math.random() * (100 - 30)) + this.typeSpeed; var self = this; // ------------- optional ------------- // // backpaces a certain string faster // ------------------------------------ // // if (self.arrayPos == 1){ // self.backDelay = 50; // } // else{ self.backDelay = 500; } // contain typing function in a timeout humanize'd delay self.timeout = setTimeout(function () { // check for an escape character before a pause value // format: \^\d+ .. eg: ^1000 .. should be able to print the ^ too using ^^ // single ^ are removed from string var charPause = 0; var substr = curString.substr(curStrPos); if (substr.charAt(0) === '^') { var skip = 1; // skip atleast 1 if (/^\^\d+/.test(substr)) { substr = /\d+/.exec(substr)[0]; skip += substr.length; charPause = parseInt(substr); } // strip out the escape character and pause value so they're not printed curString = curString.substring(0, curStrPos) + curString.substring( curStrPos + skip); } if (self.contentType === 'html') { // skip over html tags while typing var curChar = curString.substr(curStrPos).charAt(0) if (curChar === '<' || curChar === '&') { var tag = ''; var endTag = ''; if (curChar === '<') { endTag = '>' } else { endTag = ';' } while (curString.substr(curStrPos + 1).charAt(0) !== endTag) { tag += curString.substr(curStrPos).charAt(0); curStrPos++; if (curStrPos + 1 > curString.length) { break; } } curStrPos++; tag += endTag; } } // timeout for any pause after a character self.timeout = setTimeout(function () { if (curStrPos === curString.length) { // fires callback function self.options.onStringTyped(self.arrayPos); // is this the final string if (self.arrayPos === self.strings.length - 1) { // animation that occurs on the last typed string self.options.callback(); self.curLoop++; // quit if we wont loop back if (self.loop === false || self.curLoop === self.loopCount) return; } self.timeout = setTimeout(function () { self.backspace(curString, curStrPos); }, self.backDelay); } else { /* call before functions if applicable */ if (curStrPos === 0) { self.options.preStringTyped(self.arrayPos); } // start typing each new char into existing string // curString: arg, self.el.html: original text inside element var nextString = curString.substr(0, curStrPos + 1); if (self.attr) { self.el.attr(self.attr, nextString); } else { if (self.isInput) { self.el.val(nextString); } else if (self.contentType === 'html') { self.el.html(nextString); } else { self.el.text(nextString); } } // add characters one by one curStrPos++; // loop the function self.typewrite(curString, curStrPos); } // end of character pause }, charPause); // humanized value for typing }, humanize); }, backspace: function (curString, curStrPos) { // exit when stopped if (this.stop === true) { return; } // varying values for setTimeout during typing // can't be global since number changes each time loop is executed var humanize = Math.round(Math.random() * (100 - 30)) + this.backSpeed; var self = this; self.timeout = setTimeout(function () { // ----- this part is optional ----- // // check string array position // on the first string, only delete one word // the stopNum actually represents the amount of chars to // keep in the current string. In my case it's 14. // if (self.arrayPos == 1){ // self.stopNum = 14; // } //every other time, delete the whole typed string // else{ // self.stopNum = 0; // } if (self.contentType === 'html') { // skip over html tags while backspacing if (curString.substr(curStrPos).charAt(0) === '>') { var tag = ''; while (curString.substr(curStrPos - 1).charAt(0) !== '<') { tag -= curString.substr(curStrPos).charAt(0); curStrPos--; if (curStrPos < 0) { break; } } curStrPos--; tag += '<'; } } // ----- continue important stuff ----- // // replace text with base text + typed characters var nextString = curString.substr(0, curStrPos); if (self.attr) { self.el.attr(self.attr, nextString); } else { if (self.isInput) { self.el.val(nextString); } else if (self.contentType === 'html') { self.el.html(nextString); } else { self.el.text(nextString); } } // if the number (id of character in current string) is // less than the stop number, keep going if (curStrPos > self.stopNum) { // subtract characters one by one curStrPos--; // loop the function self.backspace(curString, curStrPos); } // if the stop number has been reached, increase // array position to next string else if (curStrPos <= self.stopNum) { self.arrayPos++; if (self.arrayPos === self.strings.length) { self.arrayPos = 0; // Shuffle sequence again if (self.shuffle) self.sequence = self.shuffleArray(self.sequence); self.init(); } else self.typewrite(self.strings[self.sequence[self.arrayPos]], curStrPos); } // humanized value for typing }, humanize); }, /** * Shuffles the numbers in the given array. * @param {Array} array * @returns {Array} */ shuffleArray: function (array) { var tmp, current, top = array.length; if (top) while (--top) { current = Math.floor(Math.random() * (top + 1)); tmp = array[current]; array[current] = array[top]; array[top] = tmp; } return array; }, // Start & Stop currently not working // , stop: function() { // var self = this; // self.stop = true; // clearInterval(self.timeout); // } // , start: function() { // var self = this; // if(self.stop === false) // return; // this.stop = false; // this.init(); // } // Reset and rebuild the element reset: function () { var self = this; clearInterval(self.timeout); var id = this.el.attr('id'); this.el.empty(); if (typeof this.cursor !== 'undefined') { this.cursor.remove(); } this.strPos = 0; this.arrayPos = 0; this.curLoop = 0; // Send the callback this.options.resetCallback(); } }; $.fn.typed = function (option) { return this.each(function () { var $this = $(this), data = $this.data('typed'), options = typeof option == 'object' && option; if (data) { data.reset(); } $this.data('typed', (data = new Typed(this, options))); if (typeof option == 'string') data[option](); }); }; $.fn.typed.defaults = { strings: ["These are the default values...", "You know what you should do?", "Use your own!", "Have a great day!" ], stringsElement: null, // typing speed typeSpeed: 0, // time before typing starts startDelay: 0, // backspacing speed backSpeed: 0, // shuffle the strings shuffle: false, // time before backspacing backDelay: 500, // loop loop: false, // false = infinite loopCount: false, // show cursor showCursor: true, // character for cursor cursorChar: "|", // attribute to type (null == text) attr: null, // either html or text contentType: 'html', // call when done callback function callback: function () {}, // starting callback function before each string preStringTyped: function () {}, //callback for every typed string onStringTyped: function () {}, // callback for reset resetCallback: function () {} }; }(window.jQuery); /*! Waypoints - 4.0.1 Copyright © 2011-2016 Caleb Troughton Licensed under the MIT license. https://github.com/imakewebthings/waypoints/blob/master/licenses.txt */ ! function () { "use strict"; function t(o) { if (!o) throw new Error("No options passed to Waypoint constructor"); if (!o.element) throw new Error("No element option passed to Waypoint constructor"); if (!o.handler) throw new Error("No handler option passed to Waypoint constructor"); this.key = "waypoint-" + e, this.options = t.Adapter.extend({}, t.defaults, o), this.element = this .options .element, this.adapter = new t.Adapter(this.element), this.callback = o.handler, this.axis = this .options .horizontal ? "horizontal" : "vertical", this.enabled = this.options.enabled, this.triggerPoint = null, this .group = t.Group.findOrCreate({ name: this.options.group, axis: this.axis }), this.context = t.Context.findOrCreateByElement(this.options.context), t.offsetAliases[this .options .offset] && (this.options.offset = t.offsetAliases[this.options.offset]), this.group.add(this), this.context .add(this), i[this.key] = this, e += 1 } var e = 0, i = {}; t.prototype.queueTrigger = function (t) { this.group.queueTrigger(this, t) }, t.prototype.trigger = function (t) { this.enabled && this.callback && this.callback.apply(this, t) }, t.prototype.destroy = function () { this.context.remove(this), this.group.remove(this), delete i[this.key] }, t.prototype.disable = function () { return this.enabled = !1, this }, t.prototype.enable = function () { return this.context.refresh(), this.enabled = !0, this }, t.prototype.next = function () { return this.group.next(this) }, t.prototype.previous = function () { return this.group.previous(this) }, t.invokeAll = function (t) { var e = []; for (var o in i) e.push(i[o]); for (var n = 0, r = e.length; r > n; n++) e[n][t]() }, t.destroyAll = function () { t.invokeAll("destroy") }, t.disableAll = function () { t.invokeAll("disable") }, t.enableAll = function () { t.Context.refreshAll(); for (var e in i) i[e].enabled = !0; return this }, t.refreshAll = function () { t.Context.refreshAll() }, t.viewportHeight = function () { return window.innerHeight || document.documentElement.clientHeight }, t.viewportWidth = function () { return document.documentElement.clientWidth }, t.adapters = [], t.defaults = { context: window, continuous: !0, enabled: !0, group: "default", horizontal: !1, offset: 0 }, t.offsetAliases = { "bottom-in-view": function () { return this.context.innerHeight() - this.adapter.outerHeight() }, "right-in-view": function () { return this.context.innerWidth() - this.adapter.outerWidth() } }, window.Waypoint = t }(), function () { "use strict"; function t(t) { window.setTimeout(t, 1e3 / 60) } function e(t) { this.element = t, this.Adapter = n.Adapter, this.adapter = new this.Adapter(t), this.key = "waypoint-context-" + i, this.didScroll = !1, this.didResize = !1, this.oldScroll = { x: this.adapter.scrollLeft(), y: this.adapter.scrollTop() }, this.waypoints = { vertical: {}, horizontal: {} }, t.waypointContextKey = this.key, o[t.waypointContextKey] = this, i += 1, n.windowContext || (n .windowContext = !0, n.windowContext = new e(window)), this.createThrottledScrollHandler(), this .createThrottledResizeHandler() } var i = 0, o = {}, n = window.Waypoint, r = window.onload; e.prototype.add = function (t) { var e = t.options.horizontal ? "horizontal" : "vertical"; this.waypoints[e][t.key] = t, this.refresh() }, e.prototype.checkEmpty = function () { var t = this.Adapter.isEmptyObject(this.waypoints.horizontal), e = this.Adapter.isEmptyObject(this.waypoints.vertical), i = this.element == this.element.window; t && e && !i && (this.adapter.off(".waypoints"), delete o[this.key]) }, e.prototype.createThrottledResizeHandler = function () { function t() { e.handleResize(), e.didResize = !1 } var e = this; this.adapter.on("resize.waypoints", function () { e.didResize || (e.didResize = !0, n.requestAnimationFrame(t)) }) }, e.prototype.createThrottledScrollHandler = function () { function t() { e.handleScroll(), e.didScroll = !1 } var e = this; this.adapter.on("scroll.waypoints", function () { (!e.didScroll || n.isTouch) && (e.didScroll = !0, n.requestAnimationFrame(t)) }) }, e.prototype.handleResize = function () { n.Context.refreshAll() }, e.prototype.handleScroll = function () { var t = {}, e = { horizontal: { newScroll: this.adapter.scrollLeft(), oldScroll: this.oldScroll.x, forward: "right", backward: "left" }, vertical: { newScroll: this.adapter.scrollTop(), oldScroll: this.oldScroll.y, forward: "down", backward: "up" } }; for (var i in e) { var o = e[i], n = o.newScroll > o.oldScroll, r = n ? o.forward : o.backward; for (var s in this.waypoints[i]) { var a = this.waypoints[i][s]; if (null !== a.triggerPoint) { var l = o.oldScroll < a.triggerPoint, h = o.newScroll >= a.triggerPoint, p = l && h, u = !l && !h; (p || u) && (a.queueTrigger(r), t[a.group.id] = a.group) } } } for (var c in t) t[c].flushTriggers(); this.oldScroll = { x: e.horizontal.newScroll, y: e.vertical.newScroll } }, e.prototype.innerHeight = function () { return this.element == this.element.window ? n.viewportHeight() : this.adapter.innerHeight() }, e.prototype.remove = function (t) { delete this.waypoints[t.axis][t.key], this.checkEmpty() }, e.prototype.innerWidth = function () { return this.element == this.element.window ? n.viewportWidth() : this.adapter.innerWidth() }, e.prototype.destroy = function () { var t = []; for (var e in this.waypoints) for (var i in this.waypoints[e]) t.push(this.waypoints[e][i]); for (var o = 0, n = t.length; n > o; o++) t[o].destroy() }, e.prototype.refresh = function () { var t, e = this.element == this.element.window, i = e ? void 0 : this.adapter.offset(), o = {}; this.handleScroll(), t = { horizontal: { contextOffset: e ? 0 : i.left, contextScroll: e ? 0 : this.oldScroll.x, contextDimension: this.innerWidth(), oldScroll: this.oldScroll.x, forward: "right", backward: "left", offsetProp: "left" }, vertical: { contextOffset: e ? 0 : i.top, contextScroll: e ? 0 : this.oldScroll.y, contextDimension: this.innerHeight(), oldScroll: this.oldScroll.y, forward: "down", backward: "up", offsetProp: "top" } }; for (var r in t) { var s = t[r]; for (var a in this.waypoints[r]) { var l, h, p, u, c, d = this.waypoints[r][a], f = d.options.offset, w = d.triggerPoint, y = 0, g = null == w; d.element !== d.element.window && (y = d.adapter.offset()[s.offsetProp]), "function" == typeof f ? f = f .apply(d) : "string" == typeof f && (f = parseFloat(f), d.options.offset.indexOf("%") > -1 && (f = Math .ceil(s.contextDimension * f / 100))), l = s.contextScroll - s.contextOffset, d .triggerPoint = Math .floor(y + l - f), h = w < s.oldScroll, p = d.triggerPoint >= s.oldScroll, u = h && p, c = !h && !p, ! g && u ? (d.queueTrigger(s.backward), o[d.group.id] = d.group) : !g && c ? (d .queueTrigger(s.forward), o[d.group.id] = d.group) : g && s.oldScroll >= d.triggerPoint && (d.queueTrigger(s .forward), o[d.group .id] = d.group) } } return n.requestAnimationFrame(function () { for (var t in o) o[t].flushTriggers() }), this }, e.findOrCreateByElement = function (t) { return e.findByElement(t) || new e(t) }, e.refreshAll = function () { for (var t in o) o[t].refresh() }, e.findByElement = function (t) { return o[t.waypointContextKey] }, window.onload = function () { r && r(), e.refreshAll() }, n.requestAnimationFrame = function (e) { var i = window.requestAnimationFrame || window.mozRequestAnimationFrame || window .webkitRequestAnimationFrame || t; i.call(window, e) }, n.Context = e }(), function () { "use strict"; function t(t, e) { return t.triggerPoint - e.triggerPoint } function e(t, e) { return e.triggerPoint - t.triggerPoint } function i(t) { this.name = t.name, this.axis = t.axis, this.id = this.name + "-" + this.axis, this.waypoints = [], this .clearTriggerQueues(), o[this.axis][this.name] = this } var o = { vertical: {}, horizontal: {} }, n = window.Waypoint; i.prototype.add = function (t) { this.waypoints.push(t) }, i.prototype.clearTriggerQueues = function () { this.triggerQueues = { up: [], down: [], left: [], right: [] } }, i.prototype.flushTriggers = function () { for (var i in this.triggerQueues) { var o = this.triggerQueues[i], n = "up" === i || "left" === i; o.sort(n ? e : t); for (var r = 0, s = o.length; s > r; r += 1) { var a = o[r]; (a.options.continuous || r === o.length - 1) && a.trigger([i]) } } this.clearTriggerQueues() }, i.prototype.next = function (e) { this.waypoints.sort(t); var i = n.Adapter.inArray(e, this.waypoints), o = i === this.waypoints.length - 1; return o ? null : this.waypoints[i + 1] }, i.prototype.previous = function (e) { this.waypoints.sort(t); var i = n.Adapter.inArray(e, this.waypoints); return i ? this.waypoints[i - 1] : null }, i.prototype.queueTrigger = function (t, e) { this.triggerQueues[e].push(t) }, i.prototype.remove = function (t) { var e = n.Adapter.inArray(t, this.waypoints); e > -1 && this.waypoints.splice(e, 1) }, i.prototype.first = function () { return this.waypoints[0] }, i.prototype.last = function () { return this.waypoints[this.waypoints.length - 1] }, i.findOrCreate = function (t) { return o[t.axis][t.name] || new i(t) }, n.Group = i }(), function () { "use strict"; function t(t) { this.$element = e(t) } var e = window.jQuery, i = window.Waypoint; e.each(["innerHeight", "innerWidth", "off", "offset", "on", "outerHeight", "outerWidth", "scrollLeft", "scrollTop" ], function (e, i) { t.prototype[i] = function () { var t = Array.prototype.slice.call(arguments); return this.$element[i].apply(this.$element, t) } }), e.each(["extend", "inArray", "isEmptyObject"], function (i, o) { t[o] = e[o] }), i.adapters.push({ name: "jquery", Adapter: t }), i.Adapter = t }(), function () { "use strict"; function t(t) { return function () { var i = [], o = arguments[0]; return t.isFunction(arguments[0]) && (o = t.extend({}, arguments[1]), o.handler = arguments[0]), this.each( function () { var n = t.extend({}, o, { element: this }); "string" == typeof n.context && (n.context = t(this).closest(n.context)[0]), i.push( new e(n)) }), i } } var e = window.Waypoint; window.jQuery && (window.jQuery.fn.waypoint = t(window.jQuery)), window.Zepto && (window.Zepto.fn.waypoint = t( window.Zepto)) }(); ! function (t) { "use strict"; t.fn.countUp = function (e) { var a = t.extend({ time: 2e3, delay: 10 }, e); return this.each(function () { var e = t(this), n = a, u = function () { e.data("counterupTo") || e.data("counterupTo", e.text()); var t = parseInt(e.data("counter-time")) > 0 ? parseInt(e.data( "counter-time")) : n.time, a = parseInt(e.data("counter-delay")) > 0 ? parseInt(e.data( "counter-delay")) : n.delay, u = t / a, r = e.data("counterupTo"), o = [r], c = /[0-9]+,[0-9]+/.test(r); r = r.replace(/,/g, ""); for (var d = (/^[0-9]+$/.test(r), /^[0-9]+\.[0-9]+$/.test(r)), s = d ? (r.split( ".")[1] || []) .length : 0, i = u; i >= 1; i--) { var p = parseInt(Math.round(r / u * i)); if (d && (p = parseFloat(r / u * i).toFixed(s)), c) for (; /(\d+)(\d{3})/.test(p.toString());) p = p.toString().replace( /(\d+)(\d{3})/, "$1,$2"); o.unshift(p) } e.data("counterup-nums", o), e.text("0"); var f = function () { e.text(e.data("counterup-nums").shift()), e.data("counterup-nums") .length ? setTimeout(e.data( "counterup-func"), a) : (delete e.data("counterup-nums"), e .data("counterup-nums", null), e .data("counterup-func", null)) }; e.data("counterup-func", f), setTimeout(e.data("counterup-func"), a) }; e.waypoint(u, { offset: "100%", triggerOnce: !0 }) }) } }(jQuery); //]]>