<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*
 * Horizon Swiper
 * Version 1.1.1
 * Domain ( http://horizon-swiper.sebsauer.de/ )
 * Copyright 2015 Sebastian Sauer ( http://www.sebsauer.de/ )
 * Licensed under MIT ( https://github.com/sebsauer90/horizon-swiper/blob/master/LICENSE )
 */
"use strict";
! function (a) {
    "function" == typeof define &amp;&amp; define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : jQuery)
}(function (a) {
    var b = "horizonSwiper",
        c = {
            item: ".horizon-item",
            showItems: "auto",
            dots: !1,
            numberedDots: !1,
            arrows: !0,
            arrowPrevText: "",
            arrowNextText: "",
            animationSpeed: 500,
            mouseDrag: !0,
			onClass: "active",
            checkOn: !0,
			padding: 70,
            onStart: function () {},
            onEnd: function () {},
            onSlideStart: function () {},
            onSlideEnd: function () {},
            onDragStart: function () {},
            onDragEnd: function () {}
        }, d = {
            $window: a(window),
            $document: a(document),
            innerClass: "horizon-inner",
            outerClass: "horizon-outer",
            dotContainer: '&lt;nav class="horizon-dots"&gt;&lt;/nav&gt;',
            arrowPrev: ['&lt;button class="horizon-prev"&gt;', "&lt;/button&gt;"],
            arrowNext: ['&lt;button class="horizon-next"&gt;', "&lt;/button&gt;"],
            showArrowsClass: "arrows",
            showDotsClass: "dots",
            initializedClass: "initialized",
            mouseDragClass: "mouse-drag",
            firstItemClass: "first-item",
            lastItemClass: "last-item"
        }, e = function () {
            function b(b, e) {
                var f = this;
                f.settings = a.extend({}, c, e), f.$element = a(b), f.$items = f.$element.find(this.settings.item), f.$inner = null, f.$outer = null, f.$dots = null, f.$arrowPrev = null, f.$arrowNext = null, f.initialized = !1, f.maxHeight = 0, f.innerContainerWidth = 0, f.viewportSize = 0, f.isAnimate = !1;
                var g = function h() {
                    f.initialized ? f._setSizes() : setTimeout(function () {
                        h()
                    }, 1e3)
                };
                d.$document.ready(function () {
                    f.init()
                }), d.$window.load(function () {
                    g()
                })
            }
            return b.prototype.init = function () {
                var a = this;
                a._setWrapper(), a._addArrows(), a._addDots(), a._mouseDrag(), a._setSizes(), a._resize(), a._checkPosition(), a._setOnPosition() , a.initialized = !0
            }, 
			/* add by @wheat 2017.05.20 */
			b.prototype._setOnPosition = function () {
                var b = this;
                if (b.viewportSize &lt; b.innerContainerWidth &amp;&amp; c.checkOn) {
                    var i = a(b.settings.item + "." + b.settings.onClass);
					//alert(b.viewportSize + "-" + b.innerContainerWidth + "-" + i.offset().left);
					if (i.length) {
                        var o = i.offset().left;
						//alert(b.viewportSize + "-" + o + "-" + b.settings.padding);
						if(o &gt; (b.viewportSize-b.settings.padding)){
							var scroll_padding = (b.viewportSize-b.settings.padding)/2;
							b.$inner.scrollLeft(o-scroll_padding);
						}
						//b.viewportSize &lt; o &amp;&amp; (void 0, b.$inner.scrollLeft(o - b.settings.padding))
                    }
                }
            },
			/* end */			
			b.prototype._setSizes = function () {
                var b = this;
                b.maxHeight = 0, b.innerContainerWidth = 0;
                for (var c = 0; c &lt; b.$items.length; ++c) {
                    var e = a(b.$items[c]),
                        f = e.outerHeight(!0),
                        g = e.outerWidth(!0);
                    f &gt; b.maxHeight &amp;&amp; (b.maxHeight = f), b.innerContainerWidth += g
                }
                b.viewportSize = b.$inner.width(), b.$outer.css({
                    "max-height": b.maxHeight + "px"
                }), b.viewportSize &lt; b.innerContainerWidth ? (b.$element.addClass(d.initializedClass), b.settings.arrows &amp;&amp; b.$element.addClass(d.showArrowsClass), b.settings.dots &amp;&amp; b.$element.addClass(d.showDotsClass)) : (b.$element.removeClass(d.initializedClass), b.$element.addClass(d.showArrowsClass))
            }, b.prototype._resize = function () {
                var a = this,
                    b = null,
                    c = function () {
                        a._setSizes(), a._checkPosition()
                    };
                d.$window.resize(function () {
                    clearTimeout(b), setTimeout(function () {
                        c()
                    }, 250)
                })
            }, b.prototype._setWrapper = function () {
                var b = this,
                    c = 0;
                b.$items.wrapAll('&lt;div class="' + d.outerClass + '"&gt;'), b.$items.wrapAll('&lt;div class="' + d.innerClass + '"&gt;'), b.$inner = b.$element.find("." + d.innerClass), b.$outer = b.$element.find("." + d.outerClass), "auto" !== b.settings.showItems &amp;&amp; b.settings.showItems === parseInt(b.settings.showItems, 10) &amp;&amp; (c = 100 / b.settings.showItems, b.$items.css({
                    width: c + "%"
                }));
                for (var e = 0; e &lt; b.$items.length; ++e) a(b.$items[e]).attr("data-horizon-index", e)
            }, b.prototype._addDots = function () {
                var b = this;
                if (b.settings.dots) {
                    b.$dots = a(d.dotContainer);
                    for (var c = 0; c &lt; b.$items.length; ++c) {
                        var e = b.settings.numberedDots ? c : "",
                            f = a('&lt;button class="horizon-dot" data-horizon-target="' + c + '"&gt;' + e + "&lt;/button&gt;");
                        b.$dots.append(f)
                    }
                    b.$element.append(b.$dots), b.$dots.find("button").on("click", function (c) {
                        c.preventDefault();
                        var d = a(this).attr("data-horizon-target");
                        b._dotScroll(d)
                    })
                }
            }, b.prototype._dotScroll = function (b) {
                var c = this,
                    d = c.$dots.find('[data-horizon-index="' + b + '"]'),
                    e = (d.outerWidth(!0), 0);
                c.isAnimate = !0, c.settings.onSlideStart();
                for (var f = 0; f &lt; c.$items.length; ++f) b &gt; f &amp;&amp; (e += a(c.$items[f]).outerWidth(!0));
                c.$inner.animate({
                    scrollLeft: e
                }, c.settings.animationSpeed, function () {
                    c._checkPosition(), c.settings.onSlideEnd(), b === c.$items.length ? c.settings.onEnd() : 0 === b &amp;&amp; c.settings.onStart(), c.isAnimate = !1
                })
            }, b.prototype._addArrows = function () {
                var b = this;
                b.settings.arrows === !0 &amp;&amp; (b.$arrowPrev = a(d.arrowPrev[0] + b.settings.arrowPrevText + d.arrowPrev[1]), b.$arrowNext = a(d.arrowNext[0] + b.settings.arrowNextText + d.arrowNext[1]), b.$arrowNext.insertAfter(b.$outer), b.$arrowPrev.insertAfter(b.$outer), b.$element.addClass(d.firstItemClass), b.$arrowPrev.attr("disabled", "disabled"), b.$arrowPrev.on("click", function (a) {
                    a.preventDefault(), b.isAnimate || b._scrollTo("previous")
                }), b.$arrowNext.on("click", function (a) {
                    a.preventDefault(), b.isAnimate || b._scrollTo("next")
                }))
            }, b.prototype._scrollTo = function (a) {
                var b = this,
                    c = b._getOffset(a);
                return b.isAnimate = !0, "end" === c || "start" === c ? void(b.isAnimate = !1) : (b.settings.onSlideStart(), void b.$inner.animate({
                    scrollLeft: c[0]
                }, b.settings.animationSpeed, function () {
                    "end" === c[1] ? b.settings.onEnd() : "start" === c[1] &amp;&amp; b.settings.onStart(), b._checkPosition(), b.settings.onSlideEnd(), b.isAnimate = !1
                }))
            }, b.prototype._getOffset = function (b) {
                var c = this,
                    d = c.$inner.scrollLeft(),
                    e = 0,
                    f = d + c.viewportSize;
                if ("next" === b &amp;&amp; d + c.viewportSize === c.innerContainerWidth) return "end";
                if ("previous" === b &amp;&amp; 0 === d) return "start";
                for (var g = 0; g &lt; c.$items.length; ++g) {
                    var h = a(c.$items[g]).outerWidth(!0),
                        i = "";
                    if (e += h, "next" === b &amp;&amp; e &gt; f) return g + 1 === c.$items.length &amp;&amp; (i = "end"), [e - c.viewportSize, i];
                    if ("previous" === b &amp;&amp; e &gt;= d) return 0 &gt;= e - h &amp;&amp; (i = "start"), [e - h, i]
                }
            }, b.prototype._mouseDrag = function () {
                var a = this,
                    b = !1,
                    c = !1,
                    e = 0,
                    f = 0,
                    g = (a.$inner.offset().left, 0),
                    h = !1,
                    i = !1,
                    j = null,
                    k = function (c) {
                        b || (g = f + (e - c.pageX), a.$inner.scrollLeft(g))
                    };
                a.$element.on({
                    touchstart: function (c) {
                        b = !0, h = !0, i = !0, a.settings.onDragStart()
                    }
                }), d.$document.on({
                    touchend: function (b) {
                        h &amp;&amp; (a._checkPosition(), a.settings.onDragEnd(), h = !1)
                    }
                }), a.$inner.scroll(function () {
                    clearTimeout(j), j = setTimeout(function () {
                        i &amp;&amp; (a._checkPosition(), a.settings.onDragEnd(), i = !1)
                    }, 250)
                }), a.settings.mouseDrag &amp;&amp; !b &amp;&amp; (a.$element.addClass(d.mouseDragClass), a.$element.on({
                    mousedown: function (b) {
                        c = !0, e = b.pageX, f = a.$inner.scrollLeft(), "button" !== b.target.tagName.toLowerCase() &amp;&amp; a.settings.onDragStart()
                    }
                }), d.$document.on({
                    mousemove: function (a) {
                        c &amp;&amp; k(a)
                    },
                    mouseup: function (b) {
                        c &amp;&amp; "button" !== b.target.tagName.toLowerCase() &amp;&amp; (a._checkPosition(), a.settings.onDragEnd()), c = !1
                    }
                }))
            }, b.prototype._checkPosition = function () {
                var a = this,
                    b = a.$inner.scrollLeft();
                a.settings.arrows &amp;&amp; a._checkArrowState(b), a.settings.dots &amp;&amp; a._checkActiveDots(b)
            }, b.prototype._checkActiveDots = function (b) {
                for (var c = this, d = 0, e = 0, f = [b, b + c.viewportSize], g = 0; g &lt; c.$items.length; ++g) {
                    var h = a(c.$items[g]),
                        i = h.outerWidth(!0);
                    e += i, d + i / 2 &gt;= f[0] &amp;&amp; e - i / 2 &lt;= f[1] ? c.$dots.find('[data-horizon-target="' + g + '"]').addClass("active") : c.$dots.find('[data-horizon-target="' + g + '"]').removeClass("active"), d += i
                }
            }, b.prototype._checkArrowState = function (a) {
                var b = this;
                a + b.viewportSize &gt;= b.innerContainerWidth - 1 ? (b.$element.addClass(d.lastItemClass), b.$arrowNext.attr("disabled", "disabled"), b.$element.removeClass(d.firstItemClass), b.$arrowPrev.removeAttr("disabled")) : 0 &gt;= a ? (b.$element.addClass(d.firstItemClass), b.$arrowPrev.attr("disabled", "disabled"), b.$element.removeClass(d.lastItemClass), b.$arrowNext.removeAttr("disabled")) : (b.$element.removeClass(d.lastItemClass).removeClass(d.firstItemClass), b.$arrowPrev.removeAttr("disabled"), b.$arrowNext.removeAttr("disabled"))
            }, b
        }();
    a.fn[b] = function (c) {
        return this.each(function () {
            a.data(this, b) || a.data(this, b, new e(this, c))
        }), this
    }
});</pre></body></html>