/*!
* SlickNav Responsive Mobile Menu v1.0.10
* (c) 2016 Josh Cope
* licensed under MIT
*/
! function(e, t, n) {
function a(t, n) {
this.element = t, this.settings = e.extend({}, i, n), this.settings.duplicate || n.hasOwnProperty("removeIds") || (this.settings.removeIds = !1), this._defaults = i, this._name = s, this.init()
}
var i = {
label: "MENU",
duplicate: !0,
duration: 200,
easingOpen: "swing",
easingClose: "swing",
closedSymbol: "►",
openedSymbol: "▼",
prependTo: "body",
appendTo: "",
parentTag: "a",
closeOnClick: !1,
allowParentLinks: !1,
nestedParentLinks: !0,
showChildren: !1,
removeIds: !0,
removeClasses: !1,
removeStyles: !1,
brand: "",
animations: "jquery",
init: function() {},
beforeOpen: function() {},
beforeClose: function() {},
afterOpen: function() {},
afterClose: function() {}
},
s = "slicknav",
o = "slicknav",
l = {
DOWN: 40,
ENTER: 13,
ESCAPE: 27,
LEFT: 37,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
};
a.prototype.init = function() {
var n, a, i = this,
s = e(this.element),
r = this.settings;
if (r.duplicate ? i.mobileNav = s.clone() : i.mobileNav = s, r.removeIds && (i.mobileNav.removeAttr("id"), i.mobileNav.find("*").each(function(t, n) {
e(n).removeAttr("id")
})), r.removeClasses && (i.mobileNav.removeAttr("class"), i.mobileNav.find("*").each(function(t, n) {
e(n).removeAttr("class")
})), r.removeStyles && (i.mobileNav.removeAttr("style"), i.mobileNav.find("*").each(function(t, n) {
e(n).removeAttr("style")
})), n = o + "_icon", "" === r.label && (n += " " + o + "_no-text"), "a" == r.parentTag && (r.parentTag = 'a href="#"'), i.mobileNav.attr("class", o + "_nav"), a = e('
'), "" !== r.brand) {
var c = e('' + r.brand + "
");
e(a).append(c)
}
i.btn = e(["<" + r.parentTag + ' aria-haspopup="true" role="button" tabindex="0" class="' + o + "_btn " + o + '_collapsed">', '", '', '', '', '', "", "" + r.parentTag + ">"].join("")), e(a).append(i.btn), "" !== r.appendTo ? e(r.appendTo).append(a) : e(r.prependTo).prepend(a), a.append(i.mobileNav);
var p = i.mobileNav.find("li");
e(p).each(function() {
var t = e(this),
n = {};
if (n.children = t.children("ul").attr("role", "menu"), t.data("menu", n), n.children.length > 0) {
var a = t.contents(),
s = !1,
l = [];
e(a).each(function() {
return e(this).is("ul") ? !1 : (l.push(this), void(e(this).is("a") && (s = !0)))
});
var c = e("<" + r.parentTag + ' role="menuitem" aria-haspopup="true" tabindex="-1" class="' + o + '_item"/>');
if (r.allowParentLinks && !r.nestedParentLinks && s) e(l).wrapAll('').parent();
else {
var p = e(l).wrapAll(c).parent();
p.addClass(o + "_row")
}
r.showChildren ? t.addClass(o + "_open") : t.addClass(o + "_collapsed"), t.addClass(o + "_parent");
var d = e('' + (r.showChildren ? r.openedSymbol : r.closedSymbol) + "");
r.allowParentLinks && !r.nestedParentLinks && s && (d = d.wrap(c).parent()), e(l).last().after(d)
} else 0 === t.children().length && t.addClass(o + "_txtnode");
t.children("a").attr("role", "menuitem").click(function(t) {
r.closeOnClick && !e(t.target).parent().closest("li").hasClass(o + "_parent") && e(i.btn).click()
}), r.closeOnClick && r.allowParentLinks && (t.children("a").children("a").click(function(t) {
e(i.btn).click()
}), t.find("." + o + "_parent-link a:not(." + o + "_item)").click(function(t) {
e(i.btn).click()
}))
}), e(p).each(function() {
var t = e(this).data("menu");
r.showChildren || i._visibilityToggle(t.children, null, !1, null, !0)
}), i._visibilityToggle(i.mobileNav, null, !1, "init", !0), i.mobileNav.attr("role", "menu"), e(t).mousedown(function() {
i._outlines(!1)
}), e(t).keyup(function() {
i._outlines(!0)
}), e(i.btn).click(function(e) {
e.preventDefault(), i._menuToggle()
}), i.mobileNav.on("click", "." + o + "_item", function(t) {
t.preventDefault(), i._itemClick(e(this))
}), e(i.btn).keydown(function(t) {
var n = t || event;
switch (n.keyCode) {
case l.ENTER:
case l.SPACE:
case l.DOWN:
t.preventDefault(), n.keyCode === l.DOWN && e(i.btn).hasClass(o + "_open") || i._menuToggle(), e(i.btn).next().find('[role="menuitem"]').first().focus()
}
}), i.mobileNav.on("keydown", "." + o + "_item", function(t) {
var n = t || event;
switch (n.keyCode) {
case l.ENTER:
t.preventDefault(), i._itemClick(e(t.target));
break;
case l.RIGHT:
t.preventDefault(), e(t.target).parent().hasClass(o + "_collapsed") && i._itemClick(e(t.target)), e(t.target).next().find('[role="menuitem"]').first().focus()
}
}), i.mobileNav.on("keydown", '[role="menuitem"]', function(t) {
var n = t || event;
switch (n.keyCode) {
case l.DOWN:
t.preventDefault();
var a = e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),
s = a.index(t.target),
r = s + 1;
a.length <= r && (r = 0);
var c = a.eq(r);
c.focus();
break;
case l.UP:
t.preventDefault();
var a = e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),
s = a.index(t.target),
c = a.eq(s - 1);
c.focus();
break;
case l.LEFT:
if (t.preventDefault(), e(t.target).parent().parent().parent().hasClass(o + "_open")) {
var p = e(t.target).parent().parent().prev();
p.focus(), i._itemClick(p)
} else e(t.target).parent().parent().hasClass(o + "_nav") && (i._menuToggle(), e(i.btn).focus());
break;
case l.ESCAPE:
t.preventDefault(), i._menuToggle(), e(i.btn).focus()
}
}), r.allowParentLinks && r.nestedParentLinks && e("." + o + "_item a").click(function(e) {
e.stopImmediatePropagation()
})
}, a.prototype._menuToggle = function(e) {
var t = this,
n = t.btn,
a = t.mobileNav;
n.hasClass(o + "_collapsed") ? (n.removeClass(o + "_collapsed"), n.addClass(o + "_open")) : (n.removeClass(o + "_open"), n.addClass(o + "_collapsed")), n.addClass(o + "_animating"), t._visibilityToggle(a, n.parent(), !0, n)
}, a.prototype._itemClick = function(e) {
var t = this,
n = t.settings,
a = e.data("menu");
a || (a = {}, a.arrow = e.children("." + o + "_arrow"), a.ul = e.next("ul"), a.parent = e.parent(), a.parent.hasClass(o + "_parent-link") && (a.parent = e.parent().parent(), a.ul = e.parent().next("ul")), e.data("menu", a)), a.parent.hasClass(o + "_collapsed") ? (a.arrow.html(n.openedSymbol), a.parent.removeClass(o + "_collapsed"), a.parent.addClass(o + "_open"), a.parent.addClass(o + "_animating"), t._visibilityToggle(a.ul, a.parent, !0, e)) : (a.arrow.html(n.closedSymbol), a.parent.addClass(o + "_collapsed"), a.parent.removeClass(o + "_open"), a.parent.addClass(o + "_animating"), t._visibilityToggle(a.ul, a.parent, !0, e))
}, a.prototype._visibilityToggle = function(t, n, a, i, s) {
function l(t, n) {
e(t).removeClass(o + "_animating"), e(n).removeClass(o + "_animating"), s || p.afterOpen(t)
}
function r(n, a) {
t.attr("aria-hidden", "true"), d.attr("tabindex", "-1"), c._setVisAttr(t, !0), t.hide(), e(n).removeClass(o + "_animating"), e(a).removeClass(o + "_animating"), s ? "init" == n && p.init() : p.afterClose(n)
}
var c = this,
p = c.settings,
d = c._getActionItems(t),
u = 0;
a && (u = p.duration), t.hasClass(o + "_hidden") ? (t.removeClass(o + "_hidden"), s || p.beforeOpen(i), "jquery" === p.animations ? t.stop(!0, !0).slideDown(u, p.easingOpen, function() {
l(i, n)
}) : "velocity" === p.animations && t.velocity("finish").velocity("slideDown", {
duration: u,
easing: p.easingOpen,
complete: function() {
l(i, n)
}
}), t.attr("aria-hidden", "false"), d.attr("tabindex", "0"), c._setVisAttr(t, !1)) : (t.addClass(o + "_hidden"), s || p.beforeClose(i), "jquery" === p.animations ? t.stop(!0, !0).slideUp(u, this.settings.easingClose, function() {
r(i, n)
}) : "velocity" === p.animations && t.velocity("finish").velocity("slideUp", {
duration: u,
easing: p.easingClose,
complete: function() {
r(i, n)
}
}))
}, a.prototype._setVisAttr = function(t, n) {
var a = this,
i = t.children("li").children("ul").not("." + o + "_hidden");
n ? i.each(function() {
var t = e(this);
t.attr("aria-hidden", "true");
var i = a._getActionItems(t);
i.attr("tabindex", "-1"), a._setVisAttr(t, n)
}) : i.each(function() {
var t = e(this);
t.attr("aria-hidden", "false");
var i = a._getActionItems(t);
i.attr("tabindex", "0"), a._setVisAttr(t, n)
})
}, a.prototype._getActionItems = function(e) {
var t = e.data("menu");
if (!t) {
t = {};
var n = e.children("li"),
a = n.find("a");
t.links = a.add(n.find("." + o + "_item")), e.data("menu", t)
}
return t.links
}, a.prototype._outlines = function(t) {
t ? e("." + o + "_item, ." + o + "_btn").css("outline", "") : e("." + o + "_item, ." + o + "_btn").css("outline", "none")
}, a.prototype.toggle = function() {
var e = this;
e._menuToggle()
}, a.prototype.open = function() {
var e = this;
e.btn.hasClass(o + "_collapsed") && e._menuToggle()
}, a.prototype.close = function() {
var e = this;
e.btn.hasClass(o + "_open") && e._menuToggle()
}, e.fn[s] = function(t) {
var n = arguments;
if (void 0 === t || "object" == typeof t) return this.each(function() {
e.data(this, "plugin_" + s) || e.data(this, "plugin_" + s, new a(this, t))
});
if ("string" == typeof t && "_" !== t[0] && "init" !== t) {
var i;
return this.each(function() {
var o = e.data(this, "plugin_" + s);
o instanceof a && "function" == typeof o[t] && (i = o[t].apply(o, Array.prototype.slice.call(n, 1)))
}), void 0 !== i ? i : this
}
}
}(jQuery, document, window);
! function(t, e, i, s) {
function o(e, i) {
this.element = e, this.options = t.extend({}, r, i), this._defaults = r, this._name = n, this.init()
}
var n = "stellar",
r = {
scrollProperty: "scroll",
positionProperty: "position",
horizontalScrolling: !0,
verticalScrolling: !0,
horizontalOffset: 0,
verticalOffset: 0,
responsive: !1,
parallaxBackgrounds: !0,
parallaxElements: !0,
hideDistantElements: !0,
hideElement: function(t) {
t.hide()
},
showElement: function(t) {
t.show()
}
},
a = {
scroll: {
getLeft: function(t) {
return t.scrollLeft()
},
setLeft: function(t, e) {
t.scrollLeft(e)
},
getTop: function(t) {
return t.scrollTop()
},
setTop: function(t, e) {
t.scrollTop(e)
}
},
position: {
getLeft: function(t) {
return -1 * parseInt(t.css("left"), 10)
},
getTop: function(t) {
return -1 * parseInt(t.css("top"), 10)
}
},
margin: {
getLeft: function(t) {
return -1 * parseInt(t.css("margin-left"), 10)
},
getTop: function(t) {
return -1 * parseInt(t.css("margin-top"), 10)
}
},
transform: {
getLeft: function(t) {
var e = getComputedStyle(t[0])[c];
return "none" !== e ? -1 * parseInt(e.match(/(-?[0-9]+)/g)[4], 10) : 0
},
getTop: function(t) {
var e = getComputedStyle(t[0])[c];
return "none" !== e ? -1 * parseInt(e.match(/(-?[0-9]+)/g)[5], 10) : 0
}
}
},
l = {
position: {
setLeft: function(t, e) {
t.css("left", e)
},
setTop: function(t, e) {
t.css("top", e)
}
},
transform: {
setPosition: function(t, e, i, s, o) {
t[0].style[c] = "translate3d(" + (e - i) + "px, " + (s - o) + "px, 0)"
}
}
},
f = function() {
var e, i = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,
s = t("script")[0].style,
o = "";
for (e in s)
if (i.test(e)) {
o = e.match(i)[0];
break
}
return "WebkitOpacity" in s && (o = "Webkit"), "KhtmlOpacity" in s && (o = "Khtml"),
function(t) {
return o + (o.length > 0 ? t.charAt(0).toUpperCase() + t.slice(1) : t)
}
}(),
c = f("transform"),
h = t("", {
style: "background:#fff"
}).css("background-position-x") !== s,
p = h ? function(t, e, i) {
t.css({
"background-position-x": e,
"background-position-y": i
})
} : function(t, e, i) {
t.css("background-position", e + " " + i)
},
d = h ? function(t) {
return [t.css("background-position-x"), t.css("background-position-y")]
} : function(t) {
return t.css("background-position").split(" ")
},
u = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function(t) {
setTimeout(t, 1e3 / 60)
};
o.prototype = {
init: function() {
this.options.name = n + "_" + 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 === i.body && (this.element = e), this.$scrollElement = t(this.element), this.$element = this.element === e ? t("body") : this.$scrollElement, this.$viewportElement = this.options.viewportElement !== s ? t(this.options.viewportElement) : this.$scrollElement[0] === e || "scroll" === this.options.scrollProperty ? this.$scrollElement : this.$scrollElement.parent()
},
_defineGetters: function() {
var t = this,
e = a[t.options.scrollProperty];
this._getScrollLeft = function() {
return e.getLeft(t.$scrollElement)
}, this._getScrollTop = function() {
return e.getTop(t.$scrollElement)
}
},
_defineSetters: function() {
var e = this,
i = a[e.options.scrollProperty],
s = l[e.options.positionProperty],
o = i.setLeft,
n = i.setTop;
this._setScrollLeft = "function" == typeof o ? function(t) {
o(e.$scrollElement, t)
} : t.noop, this._setScrollTop = "function" == typeof n ? function(t) {
n(e.$scrollElement, t)
} : t.noop, this._setPosition = s.setPosition || function(t, i, o, n, r) {
e.options.horizontalScrolling && s.setLeft(t, i, o), e.options.verticalScrolling && s.setTop(t, n, r)
}
},
_handleWindowLoadAndResize: function() {
var i = this,
s = t(e);
i.options.responsive && s.bind("load." + this.name, function() {
i.refresh()
}), s.bind("resize." + this.name, function() {
i._detectViewport(), i.options.responsive && i.refresh()
})
},
refresh: function(i) {
var s = this,
o = s._getScrollLeft(),
n = s._getScrollTop();
i && i.firstLoad || this._reset(), this._setScrollLeft(0), this._setScrollTop(0), this._setOffsets(), this._findParticles(), this._findBackgrounds(), i && i.firstLoad && /WebKit/.test(navigator.userAgent) && t(e).load(function() {
var t = s._getScrollLeft(),
e = s._getScrollTop();
s._setScrollLeft(t + 1), s._setScrollTop(e + 1), s._setScrollLeft(t), s._setScrollTop(e)
}), this._setScrollLeft(o), this._setScrollTop(n)
},
_detectViewport: function() {
var t = this.$viewportElement.offset(),
e = null !== t && t !== s;
this.viewportWidth = this.$viewportElement.width(), this.viewportHeight = this.$viewportElement.height(), this.viewportOffsetTop = e ? t.top : 0, this.viewportOffsetLeft = e ? t.left : 0
},
_findParticles: function() {
var e = this;
this._getScrollLeft(), this._getScrollTop();
if (this.particles !== s)
for (var i = this.particles.length - 1; i >= 0; i--) this.particles[i].$element.data("stellar-elementIsActive", s);
this.particles = [], this.options.parallaxElements && this.$element.find("[data-stellar-ratio]").each(function(i) {
var o, n, r, a, l, f, c, h, p, d = t(this),
u = 0,
g = 0,
m = 0,
v = 0;
if (d.data("stellar-elementIsActive")) {
if (d.data("stellar-elementIsActive") !== this) return
} else d.data("stellar-elementIsActive", this);
e.options.showElement(d), d.data("stellar-startingLeft") ? (d.css("left", d.data("stellar-startingLeft")), d.css("top", d.data("stellar-startingTop"))) : (d.data("stellar-startingLeft", d.css("left")), d.data("stellar-startingTop", d.css("top"))), r = d.position().left, a = d.position().top, l = "auto" === d.css("margin-left") ? 0 : parseInt(d.css("margin-left"), 10), f = "auto" === d.css("margin-top") ? 0 : parseInt(d.css("margin-top"), 10), h = d.offset().left - l, p = d.offset().top - f, d.parents().each(function() {
var e = t(this);
return e.data("stellar-offset-parent") === !0 ? (u = m, g = v, c = e, !1) : (m += e.position().left, void(v += e.position().top))
}), o = d.data("stellar-horizontal-offset") !== s ? d.data("stellar-horizontal-offset") : c !== s && c.data("stellar-horizontal-offset") !== s ? c.data("stellar-horizontal-offset") : e.horizontalOffset, n = d.data("stellar-vertical-offset") !== s ? d.data("stellar-vertical-offset") : c !== s && c.data("stellar-vertical-offset") !== s ? c.data("stellar-vertical-offset") : e.verticalOffset, e.particles.push({
$element: d,
$offsetParent: c,
isFixed: "fixed" === d.css("position"),
horizontalOffset: o,
verticalOffset: n,
startingPositionLeft: r,
startingPositionTop: a,
startingOffsetLeft: h,
startingOffsetTop: p,
parentOffsetLeft: u,
parentOffsetTop: g,
stellarRatio: d.data("stellar-ratio") !== s ? d.data("stellar-ratio") : 1,
width: d.outerWidth(!0),
height: d.outerHeight(!0),
isHidden: !1
})
})
},
_findBackgrounds: function() {
var e, i = this,
o = this._getScrollLeft(),
n = this._getScrollTop();
this.backgrounds = [], this.options.parallaxBackgrounds && (e = this.$element.find("[data-stellar-background-ratio]"), this.$element.data("stellar-background-ratio") && (e = e.add(this.$element)), e.each(function() {
var e, r, a, l, f, c, h, u = t(this),
g = d(u),
m = 0,
v = 0,
L = 0,
_ = 0;
if (u.data("stellar-backgroundIsActive")) {
if (u.data("stellar-backgroundIsActive") !== this) return
} else u.data("stellar-backgroundIsActive", this);
u.data("stellar-backgroundStartingLeft") ? p(u, u.data("stellar-backgroundStartingLeft"), u.data("stellar-backgroundStartingTop")) : (u.data("stellar-backgroundStartingLeft", g[0]), u.data("stellar-backgroundStartingTop", g[1])), a = "auto" === u.css("margin-left") ? 0 : parseInt(u.css("margin-left"), 10), l = "auto" === u.css("margin-top") ? 0 : parseInt(u.css("margin-top"), 10), f = u.offset().left - a - o, c = u.offset().top - l - n, u.parents().each(function() {
var e = t(this);
return e.data("stellar-offset-parent") === !0 ? (m = L, v = _, h = e, !1) : (L += e.position().left, void(_ += e.position().top))
}), e = u.data("stellar-horizontal-offset") !== s ? u.data("stellar-horizontal-offset") : h !== s && h.data("stellar-horizontal-offset") !== s ? h.data("stellar-horizontal-offset") : i.horizontalOffset, r = u.data("stellar-vertical-offset") !== s ? u.data("stellar-vertical-offset") : h !== s && h.data("stellar-vertical-offset") !== s ? h.data("stellar-vertical-offset") : i.verticalOffset, i.backgrounds.push({
$element: u,
$offsetParent: h,
isFixed: "fixed" === u.css("background-attachment"),
horizontalOffset: e,
verticalOffset: r,
startingValueLeft: g[0],
startingValueTop: g[1],
startingBackgroundPositionLeft: isNaN(parseInt(g[0], 10)) ? 0 : parseInt(g[0], 10),
startingBackgroundPositionTop: isNaN(parseInt(g[1], 10)) ? 0 : parseInt(g[1], 10),
startingPositionLeft: u.position().left,
startingPositionTop: u.position().top,
startingOffsetLeft: f,
startingOffsetTop: c,
parentOffsetLeft: m,
parentOffsetTop: v,
stellarRatio: u.data("stellar-background-ratio") === s ? 1 : u.data("stellar-background-ratio")
})
}))
},
_reset: function() {
var t, e, i, s, o;
for (o = this.particles.length - 1; o >= 0; o--) t = this.particles[o], e = t.$element.data("stellar-startingLeft"), i = t.$element.data("stellar-startingTop"), this._setPosition(t.$element, e, e, i, i), this.options.showElement(t.$element), t.$element.data("stellar-startingLeft", null).data("stellar-elementIsActive", null).data("stellar-backgroundIsActive", null);
for (o = this.backgrounds.length - 1; o >= 0; o--) s = this.backgrounds[o], s.$element.data("stellar-backgroundStartingLeft", null).data("stellar-backgroundStartingTop", null), p(s.$element, s.startingValueLeft, s.startingValueTop)
},
destroy: function() {
this._reset(), this.$scrollElement.unbind("resize." + this.name).unbind("scroll." + this.name), this._animationLoop = t.noop, t(e).unbind("load." + this.name).unbind("resize." + this.name)
},
_setOffsets: function() {
var i = this,
s = t(e);
s.unbind("resize.horizontal-" + this.name).unbind("resize.vertical-" + this.name), "function" == typeof this.options.horizontalOffset ? (this.horizontalOffset = this.options.horizontalOffset(), s.bind("resize.horizontal-" + this.name, function() {
i.horizontalOffset = i.options.horizontalOffset()
})) : this.horizontalOffset = this.options.horizontalOffset, "function" == typeof this.options.verticalOffset ? (this.verticalOffset = this.options.verticalOffset(), s.bind("resize.vertical-" + this.name, function() {
i.verticalOffset = i.options.verticalOffset()
})) : this.verticalOffset = this.options.verticalOffset
},
_repositionElements: function() {
var t, e, i, s, o, n, r, a, l, f, c = this._getScrollLeft(),
h = this._getScrollTop(),
d = !0,
u = !0;
if (this.currentScrollLeft !== c || this.currentScrollTop !== h || this.currentWidth !== this.viewportWidth || this.currentHeight !== this.viewportHeight) {
for (this.currentScrollLeft = c, this.currentScrollTop = h, this.currentWidth = this.viewportWidth, this.currentHeight = this.viewportHeight, f = this.particles.length - 1; f >= 0; f--) t = this.particles[f], e = t.isFixed ? 1 : 0, this.options.horizontalScrolling ? (n = (c + t.horizontalOffset + this.viewportOffsetLeft + t.startingPositionLeft - t.startingOffsetLeft + t.parentOffsetLeft) * -(t.stellarRatio + e - 1) + t.startingPositionLeft, a = n - t.startingPositionLeft + t.startingOffsetLeft) : (n = t.startingPositionLeft, a = t.startingOffsetLeft), this.options.verticalScrolling ? (r = (h + t.verticalOffset + this.viewportOffsetTop + t.startingPositionTop - t.startingOffsetTop + t.parentOffsetTop) * -(t.stellarRatio + e - 1) + t.startingPositionTop, l = r - t.startingPositionTop + t.startingOffsetTop) : (r = t.startingPositionTop, l = t.startingOffsetTop), this.options.hideDistantElements && (u = !this.options.horizontalScrolling || a + t.width > (t.isFixed ? 0 : c) && a < (t.isFixed ? 0 : c) + this.viewportWidth + this.viewportOffsetLeft, d = !this.options.verticalScrolling || l + t.height > (t.isFixed ? 0 : h) && l < (t.isFixed ? 0 : h) + this.viewportHeight + this.viewportOffsetTop), u && d ? (t.isHidden && (this.options.showElement(t.$element), t.isHidden = !1), this._setPosition(t.$element, n, t.startingPositionLeft, r, t.startingPositionTop)) : t.isHidden || (this.options.hideElement(t.$element), t.isHidden = !0);
for (f = this.backgrounds.length - 1; f >= 0; f--) i = this.backgrounds[f], e = i.isFixed ? 0 : 1, s = this.options.horizontalScrolling ? (c + i.horizontalOffset - this.viewportOffsetLeft - i.startingOffsetLeft + i.parentOffsetLeft - i.startingBackgroundPositionLeft) * (e - i.stellarRatio) + "px" : i.startingValueLeft, o = this.options.verticalScrolling ? (h + i.verticalOffset - this.viewportOffsetTop - i.startingOffsetTop + i.parentOffsetTop - i.startingBackgroundPositionTop) * (e - i.stellarRatio) + "px" : i.startingValueTop, p(i.$element, s, o)
}
},
_handleScrollEvent: function() {
var t = this,
e = !1,
i = function() {
t._repositionElements(), e = !1
},
s = function() {
e || (u(i), e = !0)
};
this.$scrollElement.bind("scroll." + this.name, s), s()
},
_startAnimationLoop: function() {
var t = this;
this._animationLoop = function() {
u(t._animationLoop), t._repositionElements()
}, this._animationLoop()
}
}, t.fn[n] = function(e) {
var i = arguments;
return e === s || "object" == typeof e ? this.each(function() {
t.data(this, "plugin_" + n) || t.data(this, "plugin_" + n, new o(this, e))
}) : "string" == typeof e && "_" !== e[0] && "init" !== e ? this.each(function() {
var s = t.data(this, "plugin_" + n);
s instanceof o && "function" == typeof s[e] && s[e].apply(s, Array.prototype.slice.call(i, 1)), "destroy" === e && t.data(this, "plugin_" + n, null)
}) : void 0
}, t[n] = function(i) {
var s = t(e);
return s.stellar.apply(s, Array.prototype.slice.call(arguments, 0))
}, t[n].scrollProperty = a, t[n].positionProperty = l, e.Stellar = o
}(jQuery, this, document);