File: /home/retoti4c1e1s/www/thecommitment.earth/wp-content/themes/ananke/js/plugins.js
!(function (e) {
"use strict";
function t(e) {
return new RegExp("(^|\\s+)" + e + "(\\s+|$)");
}
function i(e, t) {
var i = n(e, t) ? s : o;
i(e, t);
}
var n, o, s;
"classList" in document.documentElement
? ((n = function (e, t) {
return e.classList.contains(t);
}),
(o = function (e, t) {
e.classList.add(t);
}),
(s = function (e, t) {
e.classList.remove(t);
}))
: ((n = function (e, i) {
return t(i).test(e.className);
}),
(o = function (e, t) {
n(e, t) || (e.className = e.className + " " + t);
}),
(s = function (e, i) {
e.className = e.className.replace(t(i), " ");
}));
var a = { hasClass: n, addClass: o, removeClass: s, toggleClass: i, has: n, add: o, remove: s, toggle: i };
"function" == typeof define && define.amd ? define(a) : (e.classie = a);
})(window);
var cbpAnimatedHeader = (function () {
function e() {
window.addEventListener(
"scroll",
function (e) {
s || ((s = !0), setTimeout(t, 250));
},
!1
);
}
function t() {
var e = i();
e >= a ? classie.add(o, "cbp-af-header-shrink") : classie.remove(o, "cbp-af-header-shrink"), (s = !1);
}
function i() {
return window.pageYOffset || n.scrollTop;
}
var n = document.documentElement,
o = document.querySelector(".cbp-af-header"),
s = !1,
a = 100;
e();
})();
(jQuery.easing.jswing = jQuery.easing.swing),
jQuery.extend(jQuery.easing, {
def: "easeOutQuad",
swing: function (e, t, i, n, o) {
return jQuery.easing[jQuery.easing.def](e, t, i, n, o);
},
easeInQuad: function (e, t, i, n, o) {
return n * (t /= o) * t + i;
},
easeOutQuad: function (e, t, i, n, o) {
return -n * (t /= o) * (t - 2) + i;
},
easeInOutQuad: function (e, t, i, n, o) {
return (t /= o / 2) < 1 ? (n / 2) * t * t + i : (-n / 2) * (--t * (t - 2) - 1) + i;
},
easeInCubic: function (e, t, i, n, o) {
return n * (t /= o) * t * t + i;
},
easeOutCubic: function (e, t, i, n, o) {
return n * ((t = t / o - 1) * t * t + 1) + i;
},
easeInOutCubic: function (e, t, i, n, o) {
return (t /= o / 2) < 1 ? (n / 2) * t * t * t + i : (n / 2) * ((t -= 2) * t * t + 2) + i;
},
easeInQuart: function (e, t, i, n, o) {
return n * (t /= o) * t * t * t + i;
},
easeOutQuart: function (e, t, i, n, o) {
return -n * ((t = t / o - 1) * t * t * t - 1) + i;
},
easeInOutQuart: function (e, t, i, n, o) {
return (t /= o / 2) < 1 ? (n / 2) * t * t * t * t + i : (-n / 2) * ((t -= 2) * t * t * t - 2) + i;
},
easeInQuint: function (e, t, i, n, o) {
return n * (t /= o) * t * t * t * t + i;
},
easeOutQuint: function (e, t, i, n, o) {
return n * ((t = t / o - 1) * t * t * t * t + 1) + i;
},
easeInOutQuint: function (e, t, i, n, o) {
return (t /= o / 2) < 1 ? (n / 2) * t * t * t * t * t + i : (n / 2) * ((t -= 2) * t * t * t * t + 2) + i;
},
easeInSine: function (e, t, i, n, o) {
return -n * Math.cos((t / o) * (Math.PI / 2)) + n + i;
},
easeOutSine: function (e, t, i, n, o) {
return n * Math.sin((t / o) * (Math.PI / 2)) + i;
},
easeInOutSine: function (e, t, i, n, o) {
return (-n / 2) * (Math.cos((Math.PI * t) / o) - 1) + i;
},
easeInExpo: function (e, t, i, n, o) {
return 0 == t ? i : n * Math.pow(2, 10 * (t / o - 1)) + i;
},
easeOutExpo: function (e, t, i, n, o) {
return t == o ? i + n : n * (-Math.pow(2, (-10 * t) / o) + 1) + i;
},
easeInOutExpo: function (e, t, i, n, o) {
return 0 == t ? i : t == o ? i + n : (t /= o / 2) < 1 ? (n / 2) * Math.pow(2, 10 * (t - 1)) + i : (n / 2) * (-Math.pow(2, -10 * --t) + 2) + i;
},
easeInCirc: function (e, t, i, n, o) {
return -n * (Math.sqrt(1 - (t /= o) * t) - 1) + i;
},
easeOutCirc: function (e, t, i, n, o) {
return n * Math.sqrt(1 - (t = t / o - 1) * t) + i;
},
easeInOutCirc: function (e, t, i, n, o) {
return (t /= o / 2) < 1 ? (-n / 2) * (Math.sqrt(1 - t * t) - 1) + i : (n / 2) * (Math.sqrt(1 - (t -= 2) * t) + 1) + i;
},
easeInElastic: function (e, t, i, n, o) {
var s = 1.70158,
a = 0,
r = n;
if (0 == t) return i;
if (1 == (t /= o)) return i + n;
if ((a || (a = 0.3 * o), r < Math.abs(n))) {
r = n;
var s = a / 4;
} else var s = (a / (2 * Math.PI)) * Math.asin(n / r);
return -(r * Math.pow(2, 10 * (t -= 1)) * Math.sin(((t * o - s) * (2 * Math.PI)) / a)) + i;
},
easeOutElastic: function (e, t, i, n, o) {
var s = 1.70158,
a = 0,
r = n;
if (0 == t) return i;
if (1 == (t /= o)) return i + n;
if ((a || (a = 0.3 * o), r < Math.abs(n))) {
r = n;
var s = a / 4;
} else var s = (a / (2 * Math.PI)) * Math.asin(n / r);
return r * Math.pow(2, -10 * t) * Math.sin(((t * o - s) * (2 * Math.PI)) / a) + n + i;
},
easeInOutElastic: function (e, t, i, n, o) {
var s = 1.70158,
a = 0,
r = n;
if (0 == t) return i;
if (2 == (t /= o / 2)) return i + n;
if ((a || (a = o * (0.3 * 1.5)), r < Math.abs(n))) {
r = n;
var s = a / 4;
} else var s = (a / (2 * Math.PI)) * Math.asin(n / r);
return 1 > t ? -0.5 * (r * Math.pow(2, 10 * (t -= 1)) * Math.sin(((t * o - s) * (2 * Math.PI)) / a)) + i : r * Math.pow(2, -10 * (t -= 1)) * Math.sin(((t * o - s) * (2 * Math.PI)) / a) * 0.5 + n + i;
},
easeInBack: function (e, t, i, n, o, s) {
return void 0 == s && (s = 1.70158), n * (t /= o) * t * ((s + 1) * t - s) + i;
},
easeOutBack: function (e, t, i, n, o, s) {
return void 0 == s && (s = 1.70158), n * ((t = t / o - 1) * t * ((s + 1) * t + s) + 1) + i;
},
easeInOutBack: function (e, t, i, n, o, s) {
return void 0 == s && (s = 1.70158), (t /= o / 2) < 1 ? (n / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + i : (n / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + i;
},
easeInBounce: function (e, t, i, n, o) {
return n - jQuery.easing.easeOutBounce(e, o - t, 0, n, o) + i;
},
easeOutBounce: function (e, t, i, n, o) {
return (t /= o) < 1 / 2.75
? n * (7.5625 * t * t) + i
: 2 / 2.75 > t
? n * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + i
: 2.5 / 2.75 > t
? n * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + i
: n * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + i;
},
easeInOutBounce: function (e, t, i, n, o) {
return o / 2 > t ? 0.5 * jQuery.easing.easeInBounce(e, 2 * t, 0, n, o) + i : 0.5 * jQuery.easing.easeOutBounce(e, 2 * t - o, 0, n, o) + 0.5 * n + i;
},
});
var $ = jQuery;
$.fn.extend({
flippy: function (e) {
var t = { stop: !1, interval: 3, speed: 1e3, distance: "150px" };
return (
(t = $.extend(t, e)),
this.each(function () {
var e = $(this),
i = e.children().eq(1).css("top"),
n = 1,
o = setInterval(function () {
e
.children()
.eq(0)
.animate({ top: t.distance, opacity: 0 }, t.speed, function () {
$(this).css({ top: i }).remove().appendTo(e);
}),
e
.children()
.eq(1)
.animate({ top: 0, opacity: 1 }, t.speed / 5),
n++,
t.stop && n === e.children().length && clearInterval(o);
}, 1e3 * t.interval);
})
);
},
}),
(function (e) {
(e.flexslider = function (t, i) {
var n = e(t);
n.vars = e.extend({}, e.flexslider.defaults, i);
var o,
s = n.vars.namespace,
a = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
r = ("ontouchstart" in window || a || (window.DocumentTouch && document instanceof DocumentTouch)) && n.vars.touch,
l = "click touchend MSPointerUp",
c = "",
d = "vertical" === n.vars.direction,
h = n.vars.reverse,
u = n.vars.itemWidth > 0,
p = "fade" === n.vars.animation,
f = "" !== n.vars.asNavFor,
m = {},
g = !0;
e.data(t, "flexslider", n),
(m = {
init: function () {
(n.animating = !1),
(n.currentSlide = parseInt(n.vars.startAt ? n.vars.startAt : 0)),
isNaN(n.currentSlide) && (n.currentSlide = 0),
(n.animatingTo = n.currentSlide),
(n.atEnd = 0 === n.currentSlide || n.currentSlide === n.last),
(n.containerSelector = n.vars.selector.substr(0, n.vars.selector.search(" "))),
(n.slides = e(n.vars.selector, n)),
(n.container = e(n.containerSelector, n)),
(n.count = n.slides.length),
(n.syncExists = e(n.vars.sync).length > 0),
"slide" === n.vars.animation && (n.vars.animation = "swing"),
(n.prop = d ? "top" : "marginLeft"),
(n.args = {}),
(n.manualPause = !1),
(n.stopped = !1),
(n.started = !1),
(n.startTimeout = null),
(n.transitions =
!n.vars.video &&
!p &&
n.vars.useCSS &&
(function () {
var e = document.createElement("div"),
t = ["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"];
for (var i in t) if (void 0 !== e.style[t[i]]) return (n.pfx = t[i].replace("Perspective", "").toLowerCase()), (n.prop = "-" + n.pfx + "-transform"), !0;
return !1;
})()),
"" !== n.vars.controlsContainer && (n.controlsContainer = e(n.vars.controlsContainer).length > 0 && e(n.vars.controlsContainer)),
"" !== n.vars.manualControls && (n.manualControls = e(n.vars.manualControls).length > 0 && e(n.vars.manualControls)),
n.vars.randomize &&
(n.slides.sort(function () {
return Math.round(Math.random()) - 0.5;
}),
n.container.empty().append(n.slides)),
n.doMath(),
n.setup("init"),
n.vars.controlNav && m.controlNav.setup(),
n.vars.directionNav && m.directionNav.setup(),
n.vars.keyboard &&
(1 === e(n.containerSelector).length || n.vars.multipleKeyboard) &&
e(document).bind("keyup", function (e) {
var t = e.keyCode;
if (!n.animating && (39 === t || 37 === t)) {
var i = 39 === t ? n.getTarget("next") : 37 === t ? n.getTarget("prev") : !1;
n.flexAnimate(i, n.vars.pauseOnAction);
}
}),
n.vars.mousewheel &&
n.bind("mousewheel", function (e, t, i, o) {
e.preventDefault();
var s = 0 > t ? n.getTarget("next") : n.getTarget("prev");
n.flexAnimate(s, n.vars.pauseOnAction);
}),
n.vars.pausePlay && m.pausePlay.setup(),
n.vars.slideshow && n.vars.pauseInvisible && m.pauseInvisible.init(),
n.vars.slideshow &&
(n.vars.pauseOnHover &&
n.hover(
function () {
!n.manualPlay && !n.manualPause && n.pause();
},
function () {
!n.manualPause && !n.manualPlay && !n.stopped && n.play();
}
),
(n.vars.pauseInvisible && m.pauseInvisible.isHidden()) || (n.vars.initDelay > 0 ? (n.startTimeout = setTimeout(n.play, n.vars.initDelay)) : n.play())),
f && m.asNav.setup(),
r && n.vars.touch && m.touch(),
(!p || (p && n.vars.smoothHeight)) && e(window).bind("resize orientationchange focus", m.resize),
n.find("img").attr("draggable", "false"),
setTimeout(function () {
n.vars.start(n);
}, 200);
},
asNav: {
setup: function () {
(n.asNav = !0),
(n.animatingTo = Math.floor(n.currentSlide / n.move)),
(n.currentItem = n.currentSlide),
n.slides
.removeClass(s + "active-slide")
.eq(n.currentItem)
.addClass(s + "active-slide"),
a
? ((t._slider = n),
n.slides.each(function () {
var t = this;
(t._gesture = new MSGesture()),
(t._gesture.target = t),
t.addEventListener(
"MSPointerDown",
function (e) {
e.preventDefault(), e.currentTarget._gesture && e.currentTarget._gesture.addPointer(e.pointerId);
},
!1
),
t.addEventListener("MSGestureTap", function (t) {
t.preventDefault();
var i = e(this),
o = i.index();
e(n.vars.asNavFor).data("flexslider").animating || i.hasClass("active") || ((n.direction = n.currentItem < o ? "next" : "prev"), n.flexAnimate(o, n.vars.pauseOnAction, !1, !0, !0));
});
}))
: n.slides.click(function (t) {
t.preventDefault();
var i = e(this),
o = i.index(),
a = i.offset().left - e(n).scrollLeft();
0 >= a && i.hasClass(s + "active-slide")
? n.flexAnimate(n.getTarget("prev"), !0)
: e(n.vars.asNavFor).data("flexslider").animating || i.hasClass(s + "active-slide") || ((n.direction = n.currentItem < o ? "next" : "prev"), n.flexAnimate(o, n.vars.pauseOnAction, !1, !0, !0));
});
},
},
controlNav: {
setup: function () {
n.manualControls ? m.controlNav.setupManual() : m.controlNav.setupPaging();
},
setupPaging: function () {
var t,
i,
o = "thumbnails" === n.vars.controlNav ? "control-thumbs" : "control-paging",
a = 1;
if (((n.controlNavScaffold = e('<ol class="' + s + "control-nav " + s + o + '"></ol>')), n.pagingCount > 1))
for (var r = 0; r < n.pagingCount; r++) {
if (
((i = n.slides.eq(r)), (t = "thumbnails" === n.vars.controlNav ? '<img src="' + i.attr("data-thumb") + '"/>' : "<a>" + a + "</a>"), "thumbnails" === n.vars.controlNav && !0 === n.vars.thumbCaptions)
) {
var d = i.attr("data-thumbcaption");
"" != d && void 0 != d && (t += '<span class="' + s + 'caption">' + d + "</span>");
}
n.controlNavScaffold.append("<li>" + t + "</li>"), a++;
}
n.controlsContainer ? e(n.controlsContainer).append(n.controlNavScaffold) : n.append(n.controlNavScaffold),
m.controlNav.set(),
m.controlNav.active(),
n.controlNavScaffold.delegate("a, img", l, function (t) {
if ((t.preventDefault(), "" === c || c === t.type)) {
var i = e(this),
o = n.controlNav.index(i);
i.hasClass(s + "active") || ((n.direction = o > n.currentSlide ? "next" : "prev"), n.flexAnimate(o, n.vars.pauseOnAction));
}
"" === c && (c = t.type), m.setToClearWatchedEvent();
});
},
setupManual: function () {
(n.controlNav = n.manualControls),
m.controlNav.active(),
n.controlNav.bind(l, function (t) {
if ((t.preventDefault(), "" === c || c === t.type)) {
var i = e(this),
o = n.controlNav.index(i);
i.hasClass(s + "active") || (o > n.currentSlide ? (n.direction = "next") : (n.direction = "prev"), n.flexAnimate(o, n.vars.pauseOnAction));
}
"" === c && (c = t.type), m.setToClearWatchedEvent();
});
},
set: function () {
var t = "thumbnails" === n.vars.controlNav ? "img" : "a";
n.controlNav = e("." + s + "control-nav li " + t, n.controlsContainer ? n.controlsContainer : n);
},
active: function () {
n.controlNav
.removeClass(s + "active")
.eq(n.animatingTo)
.addClass(s + "active");
},
update: function (t, i) {
n.pagingCount > 1 && "add" === t ? n.controlNavScaffold.append(e("<li><a>" + n.count + "</a></li>")) : 1 === n.pagingCount ? n.controlNavScaffold.find("li").remove() : n.controlNav.eq(i).closest("li").remove(),
m.controlNav.set(),
n.pagingCount > 1 && n.pagingCount !== n.controlNav.length ? n.update(i, t) : m.controlNav.active();
},
},
directionNav: {
setup: function () {
var t = e('<ul class="' + s + 'direction-nav"><li><a class="' + s + 'prev" href="#">' + n.vars.prevText + '</a></li><li><a class="' + s + 'next" href="#">' + n.vars.nextText + "</a></li></ul>");
n.controlsContainer ? (e(n.controlsContainer).append(t), (n.directionNav = e("." + s + "direction-nav li a", n.controlsContainer))) : (n.append(t), (n.directionNav = e("." + s + "direction-nav li a", n))),
m.directionNav.update(),
n.directionNav.bind(l, function (t) {
t.preventDefault();
var i;
("" === c || c === t.type) && ((i = e(this).hasClass(s + "next") ? n.getTarget("next") : n.getTarget("prev")), n.flexAnimate(i, n.vars.pauseOnAction)),
"" === c && (c = t.type),
m.setToClearWatchedEvent();
});
},
update: function () {
var e = s + "disabled";
1 === n.pagingCount
? n.directionNav.addClass(e).attr("tabindex", "-1")
: n.vars.animationLoop
? n.directionNav.removeClass(e).removeAttr("tabindex")
: 0 === n.animatingTo
? n.directionNav
.removeClass(e)
.filter("." + s + "prev")
.addClass(e)
.attr("tabindex", "-1")
: n.animatingTo === n.last
? n.directionNav
.removeClass(e)
.filter("." + s + "next")
.addClass(e)
.attr("tabindex", "-1")
: n.directionNav.removeClass(e).removeAttr("tabindex");
},
},
pausePlay: {
setup: function () {
var t = e('<div class="' + s + 'pauseplay"><a></a></div>');
n.controlsContainer ? (n.controlsContainer.append(t), (n.pausePlay = e("." + s + "pauseplay a", n.controlsContainer))) : (n.append(t), (n.pausePlay = e("." + s + "pauseplay a", n))),
m.pausePlay.update(n.vars.slideshow ? s + "pause" : s + "play"),
n.pausePlay.bind(l, function (t) {
t.preventDefault(),
("" === c || c === t.type) && (e(this).hasClass(s + "pause") ? ((n.manualPause = !0), (n.manualPlay = !1), n.pause()) : ((n.manualPause = !1), (n.manualPlay = !0), n.play())),
"" === c && (c = t.type),
m.setToClearWatchedEvent();
});
},
update: function (e) {
"play" === e
? n.pausePlay
.removeClass(s + "pause")
.addClass(s + "play")
.html(n.vars.playText)
: n.pausePlay
.removeClass(s + "play")
.addClass(s + "pause")
.html(n.vars.pauseText);
},
},
touch: function () {
function e(e) {
n.animating
? e.preventDefault()
: (window.navigator.msPointerEnabled || 1 === e.touches.length) &&
(n.pause(),
(g = d ? n.h : n.w),
(w = Number(new Date())),
(x = e.touches[0].pageX),
(b = e.touches[0].pageY),
(m =
u && h && n.animatingTo === n.last
? 0
: u && h
? n.limit - (n.itemW + n.vars.itemMargin) * n.move * n.animatingTo
: u && n.currentSlide === n.last
? n.limit
: u
? (n.itemW + n.vars.itemMargin) * n.move * n.currentSlide
: h
? (n.last - n.currentSlide + n.cloneOffset) * g
: (n.currentSlide + n.cloneOffset) * g),
(c = d ? b : x),
(f = d ? x : b),
t.addEventListener("touchmove", i, !1),
t.addEventListener("touchend", o, !1));
}
function i(e) {
(x = e.touches[0].pageX), (b = e.touches[0].pageY), (v = d ? c - b : c - x), (y = d ? Math.abs(v) < Math.abs(x - f) : Math.abs(v) < Math.abs(b - f));
var t = 500;
(!y || Number(new Date()) - w > t) &&
(e.preventDefault(), !p && n.transitions && (n.vars.animationLoop || (v /= (0 === n.currentSlide && 0 > v) || (n.currentSlide === n.last && v > 0) ? Math.abs(v) / g + 2 : 1), n.setProps(m + v, "setTouch")));
}
function o(e) {
if ((t.removeEventListener("touchmove", i, !1), n.animatingTo === n.currentSlide && !y && null !== v)) {
var s = h ? -v : v,
a = s > 0 ? n.getTarget("next") : n.getTarget("prev");
n.canAdvance(a) && ((Number(new Date()) - w < 550 && Math.abs(s) > 50) || Math.abs(s) > g / 2) ? n.flexAnimate(a, n.vars.pauseOnAction) : p || n.flexAnimate(n.currentSlide, n.vars.pauseOnAction, !0);
}
t.removeEventListener("touchend", o, !1), (c = null), (f = null), (v = null), (m = null);
}
function s(e) {
e.stopPropagation(),
n.animating
? e.preventDefault()
: (n.pause(),
t._gesture.addPointer(e.pointerId),
(S = 0),
(g = d ? n.h : n.w),
(w = Number(new Date())),
(m =
u && h && n.animatingTo === n.last
? 0
: u && h
? n.limit - (n.itemW + n.vars.itemMargin) * n.move * n.animatingTo
: u && n.currentSlide === n.last
? n.limit
: u
? (n.itemW + n.vars.itemMargin) * n.move * n.currentSlide
: h
? (n.last - n.currentSlide + n.cloneOffset) * g
: (n.currentSlide + n.cloneOffset) * g));
}
function r(e) {
e.stopPropagation();
var i = e.target._slider;
if (i) {
var n = -e.translationX,
o = -e.translationY;
return (
(S += d ? o : n),
(v = S),
(y = d ? Math.abs(S) < Math.abs(-n) : Math.abs(S) < Math.abs(-o)),
e.detail === e.MSGESTURE_FLAG_INERTIA
? void setImmediate(function () {
t._gesture.stop();
})
: void (
(!y || Number(new Date()) - w > 500) &&
(e.preventDefault(),
!p && i.transitions && (i.vars.animationLoop || (v = S / ((0 === i.currentSlide && 0 > S) || (i.currentSlide === i.last && S > 0) ? Math.abs(S) / g + 2 : 1)), i.setProps(m + v, "setTouch")))
)
);
}
}
function l(e) {
e.stopPropagation();
var t = e.target._slider;
if (t) {
if (t.animatingTo === t.currentSlide && !y && null !== v) {
var i = h ? -v : v,
n = i > 0 ? t.getTarget("next") : t.getTarget("prev");
t.canAdvance(n) && ((Number(new Date()) - w < 550 && Math.abs(i) > 50) || Math.abs(i) > g / 2) ? t.flexAnimate(n, t.vars.pauseOnAction) : p || t.flexAnimate(t.currentSlide, t.vars.pauseOnAction, !0);
}
(c = null), (f = null), (v = null), (m = null), (S = 0);
}
}
var c,
f,
m,
g,
v,
w,
y = !1,
x = 0,
b = 0,
S = 0;
a
? ((t.style.msTouchAction = "none"),
(t._gesture = new MSGesture()),
(t._gesture.target = t),
t.addEventListener("MSPointerDown", s, !1),
(t._slider = n),
t.addEventListener("MSGestureChange", r, !1),
t.addEventListener("MSGestureEnd", l, !1))
: t.addEventListener("touchstart", e, !1);
},
resize: function () {
!n.animating &&
n.is(":visible") &&
(u || n.doMath(),
p
? m.smoothHeight()
: u
? (n.slides.width(n.computedW), n.update(n.pagingCount), n.setProps())
: d
? (n.viewport.height(n.h), n.setProps(n.h, "setTotal"))
: (n.vars.smoothHeight && m.smoothHeight(), n.newSlides.width(n.computedW), n.setProps(n.computedW, "setTotal")));
},
smoothHeight: function (e) {
if (!d || p) {
var t = p ? n : n.viewport;
e ? t.animate({ height: n.slides.eq(n.animatingTo).height() }, e) : t.height(n.slides.eq(n.animatingTo).height());
}
},
sync: function (t) {
var i = e(n.vars.sync).data("flexslider"),
o = n.animatingTo;
switch (t) {
case "animate":
i.flexAnimate(o, n.vars.pauseOnAction, !1, !0);
break;
case "play":
!i.playing && !i.asNav && i.play();
break;
case "pause":
i.pause();
}
},
pauseInvisible: {
visProp: null,
init: function () {
var e = ["webkit", "moz", "ms", "o"];
if ("hidden" in document) return "hidden";
for (var t = 0; t < e.length; t++) e[t] + "Hidden" in document && (m.pauseInvisible.visProp = e[t] + "Hidden");
if (m.pauseInvisible.visProp) {
var i = m.pauseInvisible.visProp.replace(/[H|h]idden/, "") + "visibilitychange";
document.addEventListener(i, function () {
m.pauseInvisible.isHidden() ? (n.startTimeout ? clearTimeout(n.startTimeout) : n.pause()) : n.started ? n.play() : n.vars.initDelay > 0 ? setTimeout(n.play, n.vars.initDelay) : n.play();
});
}
},
isHidden: function () {
return document[m.pauseInvisible.visProp] || !1;
},
},
setToClearWatchedEvent: function () {
clearTimeout(o),
(o = setTimeout(function () {
c = "";
}, 3e3));
},
}),
(n.flexAnimate = function (t, i, o, a, l) {
if (
(!n.vars.animationLoop && t !== n.currentSlide && (n.direction = t > n.currentSlide ? "next" : "prev"),
f && 1 === n.pagingCount && (n.direction = n.currentItem < t ? "next" : "prev"),
!n.animating && (n.canAdvance(t, l) || o) && n.is(":visible"))
) {
if (f && a) {
var c = e(n.vars.asNavFor).data("flexslider");
if (
((n.atEnd = 0 === t || t === n.count - 1),
c.flexAnimate(t, !0, !1, !0, l),
(n.direction = n.currentItem < t ? "next" : "prev"),
(c.direction = n.direction),
Math.ceil((t + 1) / n.visible) - 1 === n.currentSlide || 0 === t)
)
return (
(n.currentItem = t),
n.slides
.removeClass(s + "active-slide")
.eq(t)
.addClass(s + "active-slide"),
!1
);
(n.currentItem = t),
n.slides
.removeClass(s + "active-slide")
.eq(t)
.addClass(s + "active-slide"),
(t = Math.floor(t / n.visible));
}
if (
((n.animating = !0),
(n.animatingTo = t),
i && n.pause(),
n.vars.before(n),
n.syncExists && !l && m.sync("animate"),
n.vars.controlNav && m.controlNav.active(),
u ||
n.slides
.removeClass(s + "active-slide")
.eq(t)
.addClass(s + "active-slide"),
(n.atEnd = 0 === t || t === n.last),
n.vars.directionNav && m.directionNav.update(),
t === n.last && (n.vars.end(n), n.vars.animationLoop || n.pause()),
p)
)
r
? (n.slides.eq(n.currentSlide).css({ opacity: 0, zIndex: 1 }), n.slides.eq(t).css({ opacity: 1, zIndex: 2 }), n.wrapup(y))
: (n.slides.eq(n.currentSlide).css({ zIndex: 1 }).animate({ opacity: 0 }, n.vars.animationSpeed, n.vars.easing),
n.slides.eq(t).css({ zIndex: 2 }).animate({ opacity: 1 }, n.vars.animationSpeed, n.vars.easing, n.wrapup));
else {
var g,
v,
w,
y = d ? n.slides.filter(":first").height() : n.computedW;
u
? ((g = n.vars.itemMargin), (w = (n.itemW + g) * n.move * n.animatingTo), (v = w > n.limit && 1 !== n.visible ? n.limit : w))
: (v =
0 === n.currentSlide && t === n.count - 1 && n.vars.animationLoop && "next" !== n.direction
? h
? (n.count + n.cloneOffset) * y
: 0
: n.currentSlide === n.last && 0 === t && n.vars.animationLoop && "prev" !== n.direction
? h
? 0
: (n.count + 1) * y
: h
? (n.count - 1 - t + n.cloneOffset) * y
: (t + n.cloneOffset) * y),
n.setProps(v, "", n.vars.animationSpeed),
n.transitions
? ((n.vars.animationLoop && n.atEnd) || ((n.animating = !1), (n.currentSlide = n.animatingTo)),
n.container.unbind("webkitTransitionEnd transitionend"),
n.container.bind("webkitTransitionEnd transitionend", function () {
n.wrapup(y);
}))
: n.container.animate(n.args, n.vars.animationSpeed, n.vars.easing, function () {
n.wrapup(y);
});
}
n.vars.smoothHeight && m.smoothHeight(n.vars.animationSpeed);
}
}),
(n.wrapup = function (e) {
!p && !u && (0 === n.currentSlide && n.animatingTo === n.last && n.vars.animationLoop ? n.setProps(e, "jumpEnd") : n.currentSlide === n.last && 0 === n.animatingTo && n.vars.animationLoop && n.setProps(e, "jumpStart")),
(n.animating = !1),
(n.currentSlide = n.animatingTo),
n.vars.after(n);
}),
(n.animateSlides = function () {
!n.animating && g && n.flexAnimate(n.getTarget("next"));
}),
(n.pause = function () {
clearInterval(n.animatedSlides), (n.animatedSlides = null), (n.playing = !1), n.vars.pausePlay && m.pausePlay.update("play"), n.syncExists && m.sync("pause");
}),
(n.play = function () {
n.playing && clearInterval(n.animatedSlides),
(n.animatedSlides = n.animatedSlides || setInterval(n.animateSlides, n.vars.slideshowSpeed)),
(n.started = n.playing = !0),
n.vars.pausePlay && m.pausePlay.update("pause"),
n.syncExists && m.sync("play");
}),
(n.stop = function () {
n.pause(), (n.stopped = !0);
}),
(n.canAdvance = function (e, t) {
var i = f ? n.pagingCount - 1 : n.last;
return t
? !0
: f && n.currentItem === n.count - 1 && 0 === e && "prev" === n.direction
? !0
: f && 0 === n.currentItem && e === n.pagingCount - 1 && "next" !== n.direction
? !1
: e !== n.currentSlide || f
? n.vars.animationLoop
? !0
: n.atEnd && 0 === n.currentSlide && e === i && "next" !== n.direction
? !1
: n.atEnd && n.currentSlide === i && 0 === e && "next" === n.direction
? !1
: !0
: !1;
}),
(n.getTarget = function (e) {
return (n.direction = e), "next" === e ? (n.currentSlide === n.last ? 0 : n.currentSlide + 1) : 0 === n.currentSlide ? n.last : n.currentSlide - 1;
}),
(n.setProps = function (e, t, i) {
var o = (function () {
var i = e ? e : (n.itemW + n.vars.itemMargin) * n.move * n.animatingTo,
o = (function () {
if (u) return "setTouch" === t ? e : h && n.animatingTo === n.last ? 0 : h ? n.limit - (n.itemW + n.vars.itemMargin) * n.move * n.animatingTo : n.animatingTo === n.last ? n.limit : i;
switch (t) {
case "setTotal":
return h ? (n.count - 1 - n.currentSlide + n.cloneOffset) * e : (n.currentSlide + n.cloneOffset) * e;
case "setTouch":
return h ? e : e;
case "jumpEnd":
return h ? e : n.count * e;
case "jumpStart":
return h ? n.count * e : e;
default:
return e;
}
})();
return -1 * o + "px";
})();
n.transitions && ((o = d ? "translate3d(0," + o + ",0)" : "translate3d(" + o + ",0,0)"), (i = void 0 !== i ? i / 1e3 + "s" : "0s"), n.container.css("-" + n.pfx + "-transition-duration", i)),
(n.args[n.prop] = o),
(n.transitions || void 0 === i) && n.container.css(n.args);
}),
(n.setup = function (t) {
if (p)
n.slides.css({ width: "100%", float: "left", marginRight: "-100%", position: "relative" }),
"init" === t &&
(r
? n.slides
.css({ opacity: 0, display: "block", webkitTransition: "opacity " + n.vars.animationSpeed / 1e3 + "s ease", zIndex: 1 })
.eq(n.currentSlide)
.css({ opacity: 1, zIndex: 2 })
: n.slides.css({ opacity: 0, display: "block", zIndex: 1 }).eq(n.currentSlide).css({ zIndex: 2 }).animate({ opacity: 1 }, n.vars.animationSpeed, n.vars.easing)),
n.vars.smoothHeight && m.smoothHeight();
else {
var i, o;
"init" === t &&
((n.viewport = e('<div class="' + s + 'viewport"></div>')
.css({ overflow: "hidden", position: "relative" })
.appendTo(n)
.append(n.container)),
(n.cloneCount = 0),
(n.cloneOffset = 0),
h && ((o = e.makeArray(n.slides).reverse()), (n.slides = e(o)), n.container.empty().append(n.slides))),
n.vars.animationLoop &&
!u &&
((n.cloneCount = 2),
(n.cloneOffset = 1),
"init" !== t && n.container.find(".clone").remove(),
n.container.append(n.slides.first().clone().addClass("clone").attr("aria-hidden", "true")).prepend(n.slides.last().clone().addClass("clone").attr("aria-hidden", "true"))),
(n.newSlides = e(n.vars.selector, n)),
(i = h ? n.count - 1 - n.currentSlide + n.cloneOffset : n.currentSlide + n.cloneOffset),
d && !u
? (n.container
.height(200 * (n.count + n.cloneCount) + "%")
.css("position", "absolute")
.width("100%"),
setTimeout(
function () {
n.newSlides.css({ display: "block" }), n.doMath(), n.viewport.height(n.h), n.setProps(i * n.h, "init");
},
"init" === t ? 100 : 0
))
: (n.container.width(200 * (n.count + n.cloneCount) + "%"),
n.setProps(i * n.computedW, "init"),
setTimeout(
function () {
n.doMath(), n.newSlides.css({ width: n.computedW, float: "left", display: "block" }), n.vars.smoothHeight && m.smoothHeight();
},
"init" === t ? 100 : 0
));
}
u ||
n.slides
.removeClass(s + "active-slide")
.eq(n.currentSlide)
.addClass(s + "active-slide");
}),
(n.doMath = function () {
var e = n.slides.first(),
t = n.vars.itemMargin,
i = n.vars.minItems,
o = n.vars.maxItems;
(n.w = void 0 === n.viewport ? n.width() : n.viewport.width()),
(n.h = e.height()),
(n.boxPadding = e.outerWidth() - e.width()),
u
? ((n.itemT = n.vars.itemWidth + t),
(n.minW = i ? i * n.itemT : n.w),
(n.maxW = o ? o * n.itemT - t : n.w),
(n.itemW = n.minW > n.w ? (n.w - t * (i - 1)) / i : n.maxW < n.w ? (n.w - t * (o - 1)) / o : n.vars.itemWidth > n.w ? n.w : n.vars.itemWidth),
(n.visible = Math.floor(n.w / n.itemW)),
(n.move = n.vars.move > 0 && n.vars.move < n.visible ? n.vars.move : n.visible),
(n.pagingCount = Math.ceil((n.count - n.visible) / n.move + 1)),
(n.last = n.pagingCount - 1),
(n.limit = 1 === n.pagingCount ? 0 : n.vars.itemWidth > n.w ? n.itemW * (n.count - 1) + t * (n.count - 1) : (n.itemW + t) * n.count - n.w - t))
: ((n.itemW = n.w), (n.pagingCount = n.count), (n.last = n.count - 1)),
(n.computedW = n.itemW - n.boxPadding);
}),
(n.update = function (e, t) {
n.doMath(),
u || (e < n.currentSlide ? (n.currentSlide += 1) : e <= n.currentSlide && 0 !== e && (n.currentSlide -= 1), (n.animatingTo = n.currentSlide)),
n.vars.controlNav &&
!n.manualControls &&
(("add" === t && !u) || n.pagingCount > n.controlNav.length
? m.controlNav.update("add")
: (("remove" === t && !u) || n.pagingCount < n.controlNav.length) && (u && n.currentSlide > n.last && ((n.currentSlide -= 1), (n.animatingTo -= 1)), m.controlNav.update("remove", n.last))),
n.vars.directionNav && m.directionNav.update();
}),
(n.addSlide = function (t, i) {
var o = e(t);
(n.count += 1),
(n.last = n.count - 1),
d && h ? (void 0 !== i ? n.slides.eq(n.count - i).after(o) : n.container.prepend(o)) : void 0 !== i ? n.slides.eq(i).before(o) : n.container.append(o),
n.update(i, "add"),
(n.slides = e(n.vars.selector + ":not(.clone)", n)),
n.setup(),
n.vars.added(n);
}),
(n.removeSlide = function (t) {
var i = isNaN(t) ? n.slides.index(e(t)) : t;
(n.count -= 1),
(n.last = n.count - 1),
isNaN(t) ? e(t, n.slides).remove() : d && h ? n.slides.eq(n.last).remove() : n.slides.eq(t).remove(),
n.doMath(),
n.update(i, "remove"),
(n.slides = e(n.vars.selector + ":not(.clone)", n)),
n.setup(),
n.vars.removed(n);
}),
m.init();
}),
e(window)
.blur(function (e) {
focused = !1;
})
.focus(function (e) {
focused = !0;
}),
(e.flexslider.defaults = {
namespace: "flex-",
selector: ".slides > li",
animation: "fade",
easing: "swing",
direction: "horizontal",
reverse: !1,
animationLoop: !0,
smoothHeight: !1,
startAt: 0,
slideshow: !0,
slideshowSpeed: 7e3,
animationSpeed: 600,
initDelay: 0,
randomize: !1,
thumbCaptions: !1,
pauseOnAction: !0,
pauseOnHover: !1,
pauseInvisible: !0,
useCSS: !0,
touch: !0,
video: !1,
controlNav: !0,
directionNav: !0,
prevText: "Previous",
nextText: "Next",
keyboard: !0,
multipleKeyboard: !1,
mousewheel: !1,
pausePlay: !1,
pauseText: "Pause",
playText: "Play",
controlsContainer: "",
manualControls: "",
sync: "",
asNavFor: "",
itemWidth: 0,
itemMargin: 0,
minItems: 1,
maxItems: 0,
move: 0,
allowOneSlide: !0,
start: function () {},
before: function () {},
after: function () {},
end: function () {},
added: function () {},
removed: function () {},
}),
(e.fn.flexslider = function (t) {
if ((void 0 === t && (t = {}), "object" == typeof t))
return this.each(function () {
var i = e(this),
n = t.selector ? t.selector : ".slides > li",
o = i.find(n);
(1 === o.length && t.allowOneSlide === !0) || 0 === o.length ? (o.fadeIn(400), t.start && t.start(i)) : void 0 === i.data("flexslider") && new e.flexslider(this, t);
});
var i = e(this).data("flexslider");
switch (t) {
case "play":
i.play();
break;
case "pause":
i.pause();
break;
case "stop":
i.stop();
break;
case "next":
i.flexAnimate(i.getTarget("next"), !0);
break;
case "prev":
case "previous":
i.flexAnimate(i.getTarget("prev"), !0);
break;
default:
"number" == typeof t && i.flexAnimate(t, !0);
}
});
})(jQuery),
(function (e) {
var t = e(window),
i = t.height();
t.resize(function () {
i = t.height();
}),
(e.fn.parallax = function (n, o, s) {
function a() {
var s = t.scrollTop();
c.each(function () {
var t = e(this),
a = t.offset().top,
d = r(t);
s > a + d || a > s + i || c.css("backgroundPosition", n + " " + Math.round((l - s) * o) + "px");
});
}
var r,
l,
c = e(this);
c.each(function () {
l = c.offset().top;
}),
(r = s
? function (e) {
return e.outerHeight(!0);
}
: function (e) {
return e.height();
}),
(arguments.length < 1 || null === n) && (n = "50%"),
(arguments.length < 2 || null === o) && (o = 0.1),
(arguments.length < 3 || null === s) && (s = !0),
t.bind("scroll", a).resize(a),
a();
});
})(jQuery),
(function (e) {
function t(t, i, n) {
var o = i.hash.slice(1),
s = document.getElementById(o) || document.getElementsByName(o)[0];
if (s) {
t && t.preventDefault();
var a = e(n.target);
if (!((n.lock && a.is(":animated")) || (n.onBefore && n.onBefore.call(n, t, s, a) === !1))) {
if ((n.stop && a.stop(!0), n.hash)) {
var r = s.id == o ? "id" : "name",
l = e("<a> </a>")
.attr(r, o)
.css({ position: "absolute", top: e(window).scrollTop(), left: e(window).scrollLeft() });
(s[r] = ""), e("body").prepend(l), (location = i.hash), l.remove(), (s[r] = o);
}
a.scrollTo(s, n).trigger("notify.serialScroll", [s]);
}
}
}
var i = location.href.replace(/#.*/, ""),
n = (e.localScroll = function (t) {
e("body").localScroll(t);
});
(n.defaults = { duration: 1e3, axis: "y", event: "click", stop: !0, target: window, reset: !0 }),
(n.hash = function (i) {
if (location.hash) {
if (((i = e.extend({}, n.defaults, i)), (i.hash = !1), i.reset)) {
var o = i.duration;
delete i.duration, e(i.target).scrollTo(0, i), (i.duration = o);
}
t(0, location, i);
}
}),
(e.fn.localScroll = function (o) {
function s() {
return !!this.href && !!this.hash && this.href.replace(this.hash, "") == i && (!o.filter || e(this).is(o.filter));
}
return (
(o = e.extend({}, n.defaults, o)),
o.lazy
? this.bind(o.event, function (i) {
var n = e([i.target, i.target.parentNode]).filter(s)[0];
n && t(i, n, o);
})
: this.find("a,area")
.filter(s)
.bind(o.event, function (e) {
t(e, this, o);
})
.end()
.end()
);
});
})(jQuery),
(function (e) {
function t(e) {
return "object" == typeof e ? e : { top: e, left: e };
}
var i = (e.scrollTo = function (t, i, n) {
e(window).scrollTo(t, i, n);
});
(i.defaults = { axis: "xy", duration: parseFloat(e.fn.jquery) >= 1.3 ? 0 : 1 }),
(i.window = function (t) {
return e(window)._scrollable();
}),
(e.fn._scrollable = function () {
return this.map(function () {
var t = this,
i = !t.nodeName || -1 != e.inArray(t.nodeName.toLowerCase(), ["iframe", "#document", "html", "body"]);
if (!i) return t;
var n = (t.contentWindow || t).document || t.ownerDocument || t;
return e.browser.safari || "BackCompat" == n.compatMode ? n.body : n.documentElement;
});
}),
(e.fn.scrollTo = function (n, o, s) {
return (
"object" == typeof o && ((s = o), (o = 0)),
"function" == typeof s && (s = { onAfter: s }),
"max" == n && (n = 9e9),
(s = e.extend({}, i.defaults, s)),
(o = o || s.speed || s.duration),
(s.queue = s.queue && s.axis.length > 1),
s.queue && (o /= 2),
(s.offset = t(s.offset)),
(s.over = t(s.over)),
this._scrollable()
.each(function () {
function a(e) {
c.animate(
h,
o,
s.easing,
e &&
function () {
e.call(this, n, s);
}
);
}
var r,
l = this,
c = e(l),
d = n,
h = {},
u = c.is("html,body");
switch (typeof d) {
case "number":
case "string":
if (/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(d)) {
d = t(d);
break;
}
d = e(d, this);
case "object":
(d.is || d.style) && (r = (d = e(d)).offset());
}
e.each(s.axis.split(""), function (e, t) {
var n = "x" == t ? "Left" : "Top",
o = n.toLowerCase(),
p = "scroll" + n,
f = l[p],
m = i.max(l, t);
if (r)
(h[p] = r[o] + (u ? 0 : f - c.offset()[o])),
s.margin && ((h[p] -= parseInt(d.css("margin" + n)) || 0), (h[p] -= parseInt(d.css("border" + n + "Width")) || 0)),
(h[p] += s.offset[o] || 0),
s.over[o] && (h[p] += d["x" == t ? "width" : "height"]() * s.over[o]);
else {
var g = d[o];
h[p] = g.slice && "%" == g.slice(-1) ? (parseFloat(g) / 100) * m : g;
}
/^\d+$/.test(h[p]) && (h[p] = h[p] <= 0 ? 0 : Math.min(h[p], m)), !e && s.queue && (f != h[p] && a(s.onAfterFirst), delete h[p]);
}),
a(s.onAfter);
})
.end()
);
}),
(i.max = function (t, i) {
var n = "x" == i ? "Width" : "Height",
o = "scroll" + n;
if (!e(t).is("html,body")) return t[o] - e(t)[n.toLowerCase()]();
var s = "client" + n,
a = t.ownerDocument.documentElement,
r = t.ownerDocument.body;
return Math.max(a[o], r[o]) - Math.min(a[s], r[s]);
});
})(jQuery),
(function (e, t, i, n) {
"use strict";
var o = i("html"),
s = i(e),
a = i(t),
r = (i.fancybox = function () {
r.open.apply(this, arguments);
}),
l = navigator.userAgent.match(/msie/i),
c = null,
d = t.createTouch !== n,
h = function (e) {
return e && e.hasOwnProperty && e instanceof i;
},
u = function (e) {
return e && "string" === i.type(e);
},
p = function (e) {
return u(e) && e.indexOf("%") > 0;
},
f = function (e) {
return e && !(e.style.overflow && "hidden" === e.style.overflow) && ((e.clientWidth && e.scrollWidth > e.clientWidth) || (e.clientHeight && e.scrollHeight > e.clientHeight));
},
m = function (e, t) {
var i = parseInt(e, 10) || 0;
return t && p(e) && (i = (r.getViewport()[t] / 100) * i), Math.ceil(i);
},
g = function (e, t) {
return m(e, t) + "px";
};
i.extend(r, {
version: "2.1.5",
defaults: {
padding: 15,
margin: 20,
width: 800,
height: 600,
minWidth: 100,
minHeight: 100,
maxWidth: 9999,
maxHeight: 9999,
pixelRatio: 1,
autoSize: !0,
autoHeight: !1,
autoWidth: !1,
autoResize: !0,
autoCenter: !d,
fitToView: !0,
aspectRatio: !1,
topRatio: 0.5,
leftRatio: 0.5,
scrolling: "auto",
wrapCSS: "",
arrows: !0,
closeBtn: !0,
closeClick: !1,
nextClick: !1,
mouseWheel: !0,
autoPlay: !1,
playSpeed: 3e3,
preload: 3,
modal: !1,
loop: !0,
ajax: { dataType: "html", headers: { "X-fancyBox": !0 } },
iframe: { scrolling: "auto", preload: !0 },
swf: { wmode: "transparent", allowfullscreen: "true", allowscriptaccess: "always" },
keys: { next: { 13: "left", 34: "up", 39: "left", 40: "up" }, prev: { 8: "right", 33: "down", 37: "right", 38: "down" }, close: [27], play: [32], toggle: [70] },
direction: { next: "left", prev: "right" },
scrollOutside: !0,
index: 0,
type: null,
href: null,
content: null,
title: null,
tpl: {
wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
image: '<img class="fancybox-image" src="{href}" alt="" />',
iframe:
'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' +
(l ? ' allowtransparency="true"' : "") +
"></iframe>",
error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',
},
openEffect: "fade",
openSpeed: 250,
openEasing: "swing",
openOpacity: !0,
openMethod: "zoomIn",
closeEffect: "fade",
closeSpeed: 250,
closeEasing: "swing",
closeOpacity: !0,
closeMethod: "zoomOut",
nextEffect: "elastic",
nextSpeed: 250,
nextEasing: "swing",
nextMethod: "changeIn",
prevEffect: "elastic",
prevSpeed: 250,
prevEasing: "swing",
prevMethod: "changeOut",
helpers: { overlay: !0, title: !0 },
onCancel: i.noop,
beforeLoad: i.noop,
afterLoad: i.noop,
beforeShow: i.noop,
afterShow: i.noop,
beforeChange: i.noop,
beforeClose: i.noop,
afterClose: i.noop,
},
group: {},
opts: {},
previous: null,
coming: null,
current: null,
isActive: !1,
isOpen: !1,
isOpened: !1,
wrap: null,
skin: null,
outer: null,
inner: null,
player: { timer: null, isActive: !1 },
ajaxLoad: null,
imgPreload: null,
transitions: {},
helpers: {},
open: function (e, t) {
return e && (i.isPlainObject(t) || (t = {}), !1 !== r.close(!0))
? (i.isArray(e) || (e = h(e) ? i(e).get() : [e]),
i.each(e, function (o, s) {
var a,
l,
c,
d,
p,
f,
m,
g = {};
"object" === i.type(s) &&
(s.nodeType && (s = i(s)),
h(s) ? ((g = { href: s.data("fancybox-href") || s.attr("href"), title: s.data("fancybox-title") || s.attr("title"), isDom: !0, element: s }), i.metadata && i.extend(!0, g, s.metadata())) : (g = s)),
(a = t.href || g.href || (u(s) ? s : null)),
(l = t.title !== n ? t.title : g.title || ""),
(c = t.content || g.content),
(d = c ? "html" : t.type || g.type),
!d && g.isDom && ((d = s.data("fancybox-type")), d || ((p = s.prop("class").match(/fancybox\.(\w+)/)), (d = p ? p[1] : null))),
u(a) &&
(d || (r.isImage(a) ? (d = "image") : r.isSWF(a) ? (d = "swf") : "#" === a.charAt(0) ? (d = "inline") : u(s) && ((d = "html"), (c = s))),
"ajax" === d && ((f = a.split(/\s+/, 2)), (a = f.shift()), (m = f.shift()))),
c || ("inline" === d ? (a ? (c = i(u(a) ? a.replace(/.*(?=#[^\s]+$)/, "") : a)) : g.isDom && (c = s)) : "html" === d ? (c = a) : d || a || !g.isDom || ((d = "inline"), (c = s))),
i.extend(g, { href: a, type: d, content: c, title: l, selector: m }),
(e[o] = g);
}),
(r.opts = i.extend(!0, {}, r.defaults, t)),
t.keys !== n && (r.opts.keys = t.keys ? i.extend({}, r.defaults.keys, t.keys) : !1),
(r.group = e),
r._start(r.opts.index))
: void 0;
},
cancel: function () {
var e = r.coming;
e &&
!1 !== r.trigger("onCancel") &&
(r.hideLoading(),
r.ajaxLoad && r.ajaxLoad.abort(),
(r.ajaxLoad = null),
r.imgPreload && (r.imgPreload.onload = r.imgPreload.onerror = null),
e.wrap && e.wrap.stop(!0, !0).trigger("onReset").remove(),
(r.coming = null),
r.current || r._afterZoomOut(e));
},
close: function (e) {
r.cancel(),
!1 !== r.trigger("beforeClose") &&
(r.unbindEvents(),
r.isActive &&
(r.isOpen && e !== !0
? ((r.isOpen = r.isOpened = !1), (r.isClosing = !0), i(".fancybox-item, .fancybox-nav").remove(), r.wrap.stop(!0, !0).removeClass("fancybox-opened"), r.transitions[r.current.closeMethod]())
: (i(".fancybox-wrap").stop(!0).trigger("onReset").remove(), r._afterZoomOut())));
},
play: function (e) {
var t = function () {
clearTimeout(r.player.timer);
},
i = function () {
t(), r.current && r.player.isActive && (r.player.timer = setTimeout(r.next, r.current.playSpeed));
},
n = function () {
t(), a.unbind(".player"), (r.player.isActive = !1), r.trigger("onPlayEnd");
},
o = function () {
r.current &&
(r.current.loop || r.current.index < r.group.length - 1) &&
((r.player.isActive = !0), a.bind({ "onCancel.player beforeClose.player": n, "onUpdate.player": i, "beforeLoad.player": t }), i(), r.trigger("onPlayStart"));
};
e === !0 || (!r.player.isActive && e !== !1) ? o() : n();
},
next: function (e) {
var t = r.current;
t && (u(e) || (e = t.direction.next), r.jumpto(t.index + 1, e, "next"));
},
prev: function (e) {
var t = r.current;
t && (u(e) || (e = t.direction.prev), r.jumpto(t.index - 1, e, "prev"));
},
jumpto: function (e, t, i) {
var o = r.current;
o &&
((e = m(e)),
(r.direction = t || o.direction[e >= o.index ? "next" : "prev"]),
(r.router = i || "jumpto"),
o.loop && (0 > e && (e = o.group.length + (e % o.group.length)), (e %= o.group.length)),
o.group[e] !== n && (r.cancel(), r._start(e)));
},
reposition: function (e, t) {
var n,
o = r.current,
s = o ? o.wrap : null;
s && ((n = r._getPosition(t)), e && "scroll" === e.type ? (delete n.position, s.stop(!0, !0).animate(n, 200)) : (s.css(n), (o.pos = i.extend({}, o.dim, n))));
},
update: function (e) {
var t = e && e.type,
i = !t || "orientationchange" === t;
i && (clearTimeout(c), (c = null)),
r.isOpen &&
!c &&
(c = setTimeout(
function () {
var n = r.current;
n &&
!r.isClosing &&
(r.wrap.removeClass("fancybox-tmp"), (i || "load" === t || ("resize" === t && n.autoResize)) && r._setDimension(), ("scroll" === t && n.canShrink) || r.reposition(e), r.trigger("onUpdate"), (c = null));
},
i && !d ? 0 : 300
));
},
toggle: function (e) {
r.isOpen && ((r.current.fitToView = "boolean" === i.type(e) ? e : !r.current.fitToView), d && (r.wrap.removeAttr("style").addClass("fancybox-tmp"), r.trigger("onUpdate")), r.update());
},
hideLoading: function () {
a.unbind(".loading"), i("#fancybox-loading").remove();
},
showLoading: function () {
var e, t;
r.hideLoading(),
(e = i('<div id="fancybox-loading"><div></div></div>').click(r.cancel).appendTo("body")),
a.bind("keydown.loading", function (e) {
27 === (e.which || e.keyCode) && (e.preventDefault(), r.cancel());
}),
r.defaults.fixed || ((t = r.getViewport()), e.css({ position: "absolute", top: 0.5 * t.h + t.y, left: 0.5 * t.w + t.x }));
},
getViewport: function () {
var t = (r.current && r.current.locked) || !1,
i = { x: s.scrollLeft(), y: s.scrollTop() };
return t ? ((i.w = t[0].clientWidth), (i.h = t[0].clientHeight)) : ((i.w = d && e.innerWidth ? e.innerWidth : s.width()), (i.h = d && e.innerHeight ? e.innerHeight : s.height())), i;
},
unbindEvents: function () {
r.wrap && h(r.wrap) && r.wrap.unbind(".fb"), a.unbind(".fb"), s.unbind(".fb");
},
bindEvents: function () {
var e,
t = r.current;
t &&
(s.bind("orientationchange.fb" + (d ? "" : " resize.fb") + (t.autoCenter && !t.locked ? " scroll.fb" : ""), r.update),
(e = t.keys),
e &&
a.bind("keydown.fb", function (o) {
var s = o.which || o.keyCode,
a = o.target || o.srcElement;
return 27 === s && r.coming
? !1
: void (
o.ctrlKey ||
o.altKey ||
o.shiftKey ||
o.metaKey ||
(a && (a.type || i(a).is("[contenteditable]"))) ||
i.each(e, function (e, a) {
return t.group.length > 1 && a[s] !== n ? (r[e](a[s]), o.preventDefault(), !1) : i.inArray(s, a) > -1 ? (r[e](), o.preventDefault(), !1) : void 0;
})
);
}),
i.fn.mousewheel &&
t.mouseWheel &&
r.wrap.bind("mousewheel.fb", function (e, n, o, s) {
for (var a = e.target || null, l = i(a), c = !1; l.length && !(c || l.is(".fancybox-skin") || l.is(".fancybox-wrap")); ) (c = f(l[0])), (l = i(l).parent());
0 === n || c || (r.group.length > 1 && !t.canShrink && (s > 0 || o > 0 ? r.prev(s > 0 ? "down" : "left") : (0 > s || 0 > o) && r.next(0 > s ? "up" : "right"), e.preventDefault()));
}));
},
trigger: function (e, t) {
var n,
o = t || r.coming || r.current;
if (o) {
if ((i.isFunction(o[e]) && (n = o[e].apply(o, Array.prototype.slice.call(arguments, 1))), n === !1)) return !1;
o.helpers &&
i.each(o.helpers, function (t, n) {
n && r.helpers[t] && i.isFunction(r.helpers[t][e]) && r.helpers[t][e](i.extend(!0, {}, r.helpers[t].defaults, n), o);
}),
a.trigger(e);
}
},
isImage: function (e) {
return u(e) && e.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
},
isSWF: function (e) {
return u(e) && e.match(/\.(swf)((\?|#).*)?$/i);
},
_start: function (e) {
var t,
n,
o,
s,
a,
l = {};
if (((e = m(e)), (t = r.group[e] || null), !t)) return !1;
if (
((l = i.extend(!0, {}, r.opts, t)),
(s = l.margin),
(a = l.padding),
"number" === i.type(s) && (l.margin = [s, s, s, s]),
"number" === i.type(a) && (l.padding = [a, a, a, a]),
l.modal && i.extend(!0, l, { closeBtn: !1, closeClick: !1, nextClick: !1, arrows: !1, mouseWheel: !1, keys: null, helpers: { overlay: { closeClick: !1 } } }),
l.autoSize && (l.autoWidth = l.autoHeight = !0),
"auto" === l.width && (l.autoWidth = !0),
"auto" === l.height && (l.autoHeight = !0),
(l.group = r.group),
(l.index = e),
(r.coming = l),
!1 === r.trigger("beforeLoad"))
)
return void (r.coming = null);
if (((o = l.type), (n = l.href), !o)) return (r.coming = null), r.current && r.router && "jumpto" !== r.router ? ((r.current.index = e), r[r.router](r.direction)) : !1;
if (
((r.isActive = !0),
("image" === o || "swf" === o) && ((l.autoHeight = l.autoWidth = !1), (l.scrolling = "visible")),
"image" === o && (l.aspectRatio = !0),
"iframe" === o && d && (l.scrolling = "scroll"),
(l.wrap = i(l.tpl.wrap)
.addClass("fancybox-" + (d ? "mobile" : "desktop") + " fancybox-type-" + o + " fancybox-tmp " + l.wrapCSS)
.appendTo(l.parent || "body")),
i.extend(l, { skin: i(".fancybox-skin", l.wrap), outer: i(".fancybox-outer", l.wrap), inner: i(".fancybox-inner", l.wrap) }),
i.each(["Top", "Right", "Bottom", "Left"], function (e, t) {
l.skin.css("padding" + t, g(l.padding[e]));
}),
r.trigger("onReady"),
"inline" === o || "html" === o)
) {
if (!l.content || !l.content.length) return r._error("content");
} else if (!n) return r._error("href");
"image" === o ? r._loadImage() : "ajax" === o ? r._loadAjax() : "iframe" === o ? r._loadIframe() : r._afterLoad();
},
_error: function (e) {
i.extend(r.coming, { type: "html", autoWidth: !0, autoHeight: !0, minWidth: 0, minHeight: 0, scrolling: "no", hasError: e, content: r.coming.tpl.error }), r._afterLoad();
},
_loadImage: function () {
var e = (r.imgPreload = new Image());
(e.onload = function () {
(this.onload = this.onerror = null), (r.coming.width = this.width / r.opts.pixelRatio), (r.coming.height = this.height / r.opts.pixelRatio), r._afterLoad();
}),
(e.onerror = function () {
(this.onload = this.onerror = null), r._error("image");
}),
(e.src = r.coming.href),
e.complete !== !0 && r.showLoading();
},
_loadAjax: function () {
var e = r.coming;
r.showLoading(),
(r.ajaxLoad = i.ajax(
i.extend({}, e.ajax, {
url: e.href,
error: function (e, t) {
r.coming && "abort" !== t ? r._error("ajax", e) : r.hideLoading();
},
success: function (t, i) {
"success" === i && ((e.content = t), r._afterLoad());
},
})
));
},
_loadIframe: function () {
var e = r.coming,
t = i(e.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
.attr("scrolling", d ? "auto" : e.iframe.scrolling)
.attr("src", e.href);
i(e.wrap).bind("onReset", function () {
try {
i(this).find("iframe").hide().attr("src", "//about:blank").end().empty();
} catch (e) {}
}),
e.iframe.preload &&
(r.showLoading(),
t.one("load", function () {
i(this).data("ready", 1), d || i(this).bind("load.fb", r.update), i(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(), r._afterLoad();
})),
(e.content = t.appendTo(e.inner)),
e.iframe.preload || r._afterLoad();
},
_preloadImages: function () {
var e,
t,
i = r.group,
n = r.current,
o = i.length,
s = n.preload ? Math.min(n.preload, o - 1) : 0;
for (t = 1; s >= t; t += 1) (e = i[(n.index + t) % o]), "image" === e.type && e.href && (new Image().src = e.href);
},
_afterLoad: function () {
var e,
t,
n,
o,
s,
a,
l = r.coming,
c = r.current,
d = "fancybox-placeholder";
if ((r.hideLoading(), l && r.isActive !== !1)) {
if (!1 === r.trigger("afterLoad", l, c)) return l.wrap.stop(!0).trigger("onReset").remove(), void (r.coming = null);
switch (
(c && (r.trigger("beforeChange", c), c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()),
r.unbindEvents(),
(e = l),
(t = l.content),
(n = l.type),
(o = l.scrolling),
i.extend(r, { wrap: e.wrap, skin: e.skin, outer: e.outer, inner: e.inner, current: e, previous: c }),
(s = e.href),
n)
) {
case "inline":
case "ajax":
case "html":
e.selector
? (t = i("<div>").html(t).find(e.selector))
: h(t) &&
(t.data(d) ||
t.data(
d,
i('<div class="' + d + '"></div>')
.insertAfter(t)
.hide()
),
(t = t.show().detach()),
e.wrap.bind("onReset", function () {
i(this).find(t).length && t.hide().replaceAll(t.data(d)).data(d, !1);
}));
break;
case "image":
t = e.tpl.image.replace("{href}", s);
break;
case "swf":
(t = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + s + '"></param>'),
(a = ""),
i.each(e.swf, function (e, i) {
(t += '<param name="' + e + '" value="' + i + '"></param>'), (a += " " + e + '="' + i + '"');
}),
(t += '<embed src="' + s + '" type="application/x-shockwave-flash" width="100%" height="100%"' + a + "></embed></object>");
}
(h(t) && t.parent().is(e.inner)) || e.inner.append(t),
r.trigger("beforeShow"),
e.inner.css("overflow", "yes" === o ? "scroll" : "no" === o ? "hidden" : o),
r._setDimension(),
r.reposition(),
(r.isOpen = !1),
(r.coming = null),
r.bindEvents(),
r.isOpened ? c.prevMethod && r.transitions[c.prevMethod]() : i(".fancybox-wrap").not(e.wrap).stop(!0).trigger("onReset").remove(),
r.transitions[r.isOpened ? e.nextMethod : e.openMethod](),
r._preloadImages();
}
},
_setDimension: function () {
var e,
t,
n,
o,
s,
a,
l,
c,
d,
h,
u,
f,
v,
w,
y,
x = r.getViewport(),
b = 0,
S = !1,
C = !1,
M = r.wrap,
z = r.skin,
T = r.inner,
_ = r.current,
k = _.width,
L = _.height,
E = _.minWidth,
I = _.minHeight,
H = _.maxWidth,
P = _.maxHeight,
A = _.scrolling,
O = _.scrollOutside ? _.scrollbarWidth : 0,
B = _.margin,
N = m(B[1] + B[3]),
F = m(B[0] + B[2]);
if (
(M.add(z).add(T).width("auto").height("auto").removeClass("fancybox-tmp"),
(e = m(z.outerWidth(!0) - z.width())),
(t = m(z.outerHeight(!0) - z.height())),
(n = N + e),
(o = F + t),
(s = p(k) ? ((x.w - n) * m(k)) / 100 : k),
(a = p(L) ? ((x.h - o) * m(L)) / 100 : L),
"iframe" === _.type)
) {
if (((w = _.content), _.autoHeight && 1 === w.data("ready")))
try {
w[0].contentWindow.document.location && (T.width(s).height(9999), (y = w.contents().find("body")), O && y.css("overflow-x", "hidden"), (a = y.outerHeight(!0)));
} catch (W) {}
} else (_.autoWidth || _.autoHeight) && (T.addClass("fancybox-tmp"), _.autoWidth || T.width(s), _.autoHeight || T.height(a), _.autoWidth && (s = T.width()), _.autoHeight && (a = T.height()), T.removeClass("fancybox-tmp"));
if (
((k = m(s)),
(L = m(a)),
(d = s / a),
(E = m(p(E) ? m(E, "w") - n : E)),
(H = m(p(H) ? m(H, "w") - n : H)),
(I = m(p(I) ? m(I, "h") - o : I)),
(P = m(p(P) ? m(P, "h") - o : P)),
(l = H),
(c = P),
_.fitToView && ((H = Math.min(x.w - n, H)), (P = Math.min(x.h - o, P))),
(f = x.w - N),
(v = x.h - F),
_.aspectRatio
? (k > H && ((k = H), (L = m(k / d))), L > P && ((L = P), (k = m(L * d))), E > k && ((k = E), (L = m(k / d))), I > L && ((L = I), (k = m(L * d))))
: ((k = Math.max(E, Math.min(k, H))), _.autoHeight && "iframe" !== _.type && (T.width(k), (L = T.height())), (L = Math.max(I, Math.min(L, P)))),
_.fitToView)
)
if ((T.width(k).height(L), M.width(k + e), (h = M.width()), (u = M.height()), _.aspectRatio))
for (; (h > f || u > v) && k > E && L > I && !(b++ > 19); )
(L = Math.max(I, Math.min(P, L - 10))), (k = m(L * d)), E > k && ((k = E), (L = m(k / d))), k > H && ((k = H), (L = m(k / d))), T.width(k).height(L), M.width(k + e), (h = M.width()), (u = M.height());
else (k = Math.max(E, Math.min(k, k - (h - f)))), (L = Math.max(I, Math.min(L, L - (u - v))));
O && "auto" === A && a > L && f > k + e + O && (k += O),
T.width(k).height(L),
M.width(k + e),
(h = M.width()),
(u = M.height()),
(S = (h > f || u > v) && k > E && L > I),
(C = _.aspectRatio ? l > k && c > L && s > k && a > L : (l > k || c > L) && (s > k || a > L)),
i.extend(_, { dim: { width: g(h), height: g(u) }, origWidth: s, origHeight: a, canShrink: S, canExpand: C, wPadding: e, hPadding: t, wrapSpace: u - z.outerHeight(!0), skinSpace: z.height() - L }),
!w && _.autoHeight && L > I && P > L && !C && T.height("auto");
},
_getPosition: function (e) {
var t = r.current,
i = r.getViewport(),
n = t.margin,
o = r.wrap.width() + n[1] + n[3],
s = r.wrap.height() + n[0] + n[2],
a = { position: "absolute", top: n[0], left: n[3] };
return (
t.autoCenter && t.fixed && !e && s <= i.h && o <= i.w ? (a.position = "fixed") : t.locked || ((a.top += i.y), (a.left += i.x)),
(a.top = g(Math.max(a.top, a.top + (i.h - s) * t.topRatio))),
(a.left = g(Math.max(a.left, a.left + (i.w - o) * t.leftRatio))),
a
);
},
_afterZoomIn: function () {
var e = r.current;
e &&
((r.isOpen = r.isOpened = !0),
r.wrap.css("overflow", "visible").addClass("fancybox-opened"),
r.update(),
(e.closeClick || (e.nextClick && r.group.length > 1)) &&
r.inner.css("cursor", "pointer").bind("click.fb", function (t) {
i(t.target).is("a") || i(t.target).parent().is("a") || (t.preventDefault(), r[e.closeClick ? "close" : "next"]());
}),
e.closeBtn &&
i(e.tpl.closeBtn)
.appendTo(r.skin)
.bind("click.fb", function (e) {
e.preventDefault(), r.close();
}),
e.arrows &&
r.group.length > 1 &&
((e.loop || e.index > 0) && i(e.tpl.prev).appendTo(r.outer).bind("click.fb", r.prev), (e.loop || e.index < r.group.length - 1) && i(e.tpl.next).appendTo(r.outer).bind("click.fb", r.next)),
r.trigger("afterShow"),
e.loop || e.index !== e.group.length - 1 ? r.opts.autoPlay && !r.player.isActive && ((r.opts.autoPlay = !1), r.play()) : r.play(!1));
},
_afterZoomOut: function (e) {
(e = e || r.current),
i(".fancybox-wrap").trigger("onReset").remove(),
i.extend(r, { group: {}, opts: {}, router: !1, current: null, isActive: !1, isOpened: !1, isOpen: !1, isClosing: !1, wrap: null, skin: null, outer: null, inner: null }),
r.trigger("afterClose", e);
},
}),
(r.transitions = {
getOrigPosition: function () {
var e = r.current,
t = e.element,
i = e.orig,
n = {},
o = 50,
s = 50,
a = e.hPadding,
l = e.wPadding,
c = r.getViewport();
return (
!i && e.isDom && t.is(":visible") && ((i = t.find("img:first")), i.length || (i = t)),
h(i) ? ((n = i.offset()), i.is("img") && ((o = i.outerWidth()), (s = i.outerHeight()))) : ((n.top = c.y + (c.h - s) * e.topRatio), (n.left = c.x + (c.w - o) * e.leftRatio)),
("fixed" === r.wrap.css("position") || e.locked) && ((n.top -= c.y), (n.left -= c.x)),
(n = { top: g(n.top - a * e.topRatio), left: g(n.left - l * e.leftRatio), width: g(o + l), height: g(s + a) })
);
},
step: function (e, t) {
var i,
n,
o,
s = t.prop,
a = r.current,
l = a.wrapSpace,
c = a.skinSpace;
("width" === s || "height" === s) &&
((i = t.end === t.start ? 1 : (e - t.start) / (t.end - t.start)),
r.isClosing && (i = 1 - i),
(n = "width" === s ? a.wPadding : a.hPadding),
(o = e - n),
r.skin[s](m("width" === s ? o : o - l * i)),
r.inner[s](m("width" === s ? o : o - l * i - c * i)));
},
zoomIn: function () {
var e = r.current,
t = e.pos,
n = e.openEffect,
o = "elastic" === n,
s = i.extend({ opacity: 1 }, t);
delete s.position,
o ? ((t = this.getOrigPosition()), e.openOpacity && (t.opacity = 0.1)) : "fade" === n && (t.opacity = 0.1),
r.wrap.css(t).animate(s, { duration: "none" === n ? 0 : e.openSpeed, easing: e.openEasing, step: o ? this.step : null, complete: r._afterZoomIn });
},
zoomOut: function () {
var e = r.current,
t = e.closeEffect,
i = "elastic" === t,
n = { opacity: 0.1 };
i && ((n = this.getOrigPosition()), e.closeOpacity && (n.opacity = 0.1)), r.wrap.animate(n, { duration: "none" === t ? 0 : e.closeSpeed, easing: e.closeEasing, step: i ? this.step : null, complete: r._afterZoomOut });
},
changeIn: function () {
var e,
t = r.current,
i = t.nextEffect,
n = t.pos,
o = { opacity: 1 },
s = r.direction,
a = 200;
(n.opacity = 0.1),
"elastic" === i && ((e = "down" === s || "up" === s ? "top" : "left"), "down" === s || "right" === s ? ((n[e] = g(m(n[e]) - a)), (o[e] = "+=" + a + "px")) : ((n[e] = g(m(n[e]) + a)), (o[e] = "-=" + a + "px"))),
"none" === i ? r._afterZoomIn() : r.wrap.css(n).animate(o, { duration: t.nextSpeed, easing: t.nextEasing, complete: r._afterZoomIn });
},
changeOut: function () {
var e = r.previous,
t = e.prevEffect,
n = { opacity: 0.1 },
o = r.direction,
s = 200;
"elastic" === t && (n["down" === o || "up" === o ? "top" : "left"] = ("up" === o || "left" === o ? "-" : "+") + "=" + s + "px"),
e.wrap.animate(n, {
duration: "none" === t ? 0 : e.prevSpeed,
easing: e.prevEasing,
complete: function () {
i(this).trigger("onReset").remove();
},
});
},
}),
(r.helpers.overlay = {
defaults: { closeClick: !0, speedOut: 200, showEarly: !0, css: {}, locked: !d, fixed: !0 },
overlay: null,
fixed: !1,
el: i("html"),
create: function (e) {
(e = i.extend({}, this.defaults, e)),
this.overlay && this.close(),
(this.overlay = i('<div class="fancybox-overlay"></div>').appendTo(r.coming ? r.coming.parent : e.parent)),
(this.fixed = !1),
e.fixed && r.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), (this.fixed = !0));
},
open: function (e) {
var t = this;
(e = i.extend({}, this.defaults, e)),
this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(e),
this.fixed || (s.bind("resize.overlay", i.proxy(this.update, this)), this.update()),
e.closeClick &&
this.overlay.bind("click.overlay", function (e) {
return i(e.target).hasClass("fancybox-overlay") ? (r.isActive ? r.close() : t.close(), !1) : void 0;
}),
this.overlay.css(e.css).show();
},
close: function () {
var e, t;
s.unbind("resize.overlay"),
this.el.hasClass("fancybox-lock") && (i(".fancybox-margin").removeClass("fancybox-margin"), (e = s.scrollTop()), (t = s.scrollLeft()), this.el.removeClass("fancybox-lock"), s.scrollTop(e).scrollLeft(t)),
i(".fancybox-overlay").remove().hide(),
i.extend(this, { overlay: null, fixed: !1 });
},
update: function () {
var e,
i = "100%";
this.overlay.width(i).height("100%"),
l ? ((e = Math.max(t.documentElement.offsetWidth, t.body.offsetWidth)), a.width() > e && (i = a.width())) : a.width() > s.width() && (i = a.width()),
this.overlay.width(i).height(a.height());
},
onReady: function (e, t) {
var n = this.overlay;
i(".fancybox-overlay").stop(!0, !0),
n || this.create(e),
e.locked && this.fixed && t.fixed && (n || (this.margin = a.height() > s.height() ? i("html").css("margin-right").replace("px", "") : !1), (t.locked = this.overlay.append(t.wrap)), (t.fixed = !1)),
e.showEarly === !0 && this.beforeShow.apply(this, arguments);
},
beforeShow: function (e, t) {
var n, o;
t.locked &&
(this.margin !== !1 &&
(i("*")
.filter(function () {
return "fixed" === i(this).css("position") && !i(this).hasClass("fancybox-overlay") && !i(this).hasClass("fancybox-wrap");
})
.addClass("fancybox-margin"),
this.el.addClass("fancybox-margin")),
(n = s.scrollTop()),
(o = s.scrollLeft()),
this.el.addClass("fancybox-lock"),
s.scrollTop(n).scrollLeft(o)),
this.open(e);
},
onUpdate: function () {
this.fixed || this.update();
},
afterClose: function (e) {
this.overlay && !r.coming && this.overlay.fadeOut(e.speedOut, i.proxy(this.close, this));
},
}),
(r.helpers.title = {
defaults: { type: "float", position: "bottom" },
beforeShow: function (e) {
var t,
n,
o = r.current,
s = o.title,
a = e.type;
if ((i.isFunction(s) && (s = s.call(o.element, o)), u(s) && "" !== i.trim(s))) {
switch (((t = i('<div class="fancybox-title fancybox-title-' + a + '-wrap">' + s + "</div>")), a)) {
case "inside":
n = r.skin;
break;
case "outside":
n = r.wrap;
break;
case "over":
n = r.inner;
break;
default:
(n = r.skin), t.appendTo("body"), l && t.width(t.width()), t.wrapInner('<span class="child"></span>'), (r.current.margin[2] += Math.abs(m(t.css("margin-bottom"))));
}
t["top" === e.position ? "prependTo" : "appendTo"](n);
}
},
}),
(i.fn.fancybox = function (e) {
var t,
n = i(this),
o = this.selector || "",
s = function (s) {
var a,
l,
c = i(this).blur(),
d = t;
s.ctrlKey ||
s.altKey ||
s.shiftKey ||
s.metaKey ||
c.is(".fancybox-wrap") ||
((a = e.groupAttr || "data-fancybox-group"),
(l = c.attr(a)),
l || ((a = "rel"), (l = c.get(0)[a])),
l && "" !== l && "nofollow" !== l && ((c = o.length ? i(o) : n), (c = c.filter("[" + a + '="' + l + '"]')), (d = c.index(this))),
(e.index = d),
r.open(c, e) !== !1 && s.preventDefault());
};
return (
(e = e || {}),
(t = e.index || 0),
o && e.live !== !1 ? a.undelegate(o, "click.fb-start").delegate(o + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", s) : n.unbind("click.fb-start").bind("click.fb-start", s),
this.filter("[data-fancybox-start=1]").trigger("click"),
this
);
}),
a.ready(function () {
var t, s;
i.scrollbarWidth === n &&
(i.scrollbarWidth = function () {
var e = i('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),
t = e.children(),
n = t.innerWidth() - t.height(99).innerWidth();
return e.remove(), n;
}),
i.support.fixedPosition === n &&
(i.support.fixedPosition = (function () {
var e = i('<div style="position:fixed;top:20px;"></div>').appendTo("body"),
t = 20 === e[0].offsetTop || 15 === e[0].offsetTop;
return e.remove(), t;
})()),
i.extend(r.defaults, { scrollbarWidth: i.scrollbarWidth(), fixed: i.support.fixedPosition, parent: i("body") }),
(t = i(e).width()),
o.addClass("fancybox-lock-test"),
(s = i(e).width()),
o.removeClass("fancybox-lock-test"),
i("<style type='text/css'>.fancybox-margin{margin-right:" + (s - t) + "px;}</style>").appendTo("head");
});
})(window, document, jQuery);
var browserFilled =
" <svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M28.692,24.431h42.615c2.353,0,4.262,1.908,4.262,4.262v42.615c0,2.354-1.909,4.262-4.262,4.262H28.692c-2.354,0-4.262-1.908-4.262-4.262V28.692C24.431,26.338,26.339,24.431,28.692,24.431z'/><path class='screen' d='M27.982,38.637h44.036v32.672H27.982V38.637z'/><path class='top' d='M24.431,24.431h51.139v11.364H24.431V24.431z'/><path class='green' d='M47.159,27.271c1.57,0,2.841,1.273,2.841,2.841s-1.271,2.841-2.841,2.841c-1.569,0-2.841-1.272-2.841-2.841S45.589,27.271,47.159,27.271z'/><path class='orange' d='M38.344,27.271c1.569,0,2.841,1.273,2.841,2.841s-1.271,2.841-2.841,2.841s-2.841-1.272-2.841-2.841S36.776,27.271,38.344,27.271z'/><path class='red' fill='' d='M29.858,27.271c1.569,0,2.841,1.273,2.841,2.841s-1.272,2.841-2.841,2.841c-1.569,0-2.841-1.272-2.841-2.841S28.289,27.271,29.858,27.271z'/></g></svg>";
$(browserFilled).appendTo("#filled-browser");
var brushFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='brush_base' d='M74.264,24.224c0.863-0.864,2.264-0.864,3.128,0l1.042,1.042c0.863,0.864,0.863,2.265,0,3.129L56.055,57.027L45.628,46.602L74.264,24.224z'/><path class='brush_highlight' d='M74.264,24.224c0.863-0.864,2.264-0.864,3.128,0l1.042,1.042c-1.225,1.133-26.979,27.164-26.979,27.164L45.628,46.6L74.264,24.224z'/><path class='brush_silver' d='M45.662,46.434l10.427,10.425c0.863,0.864,0.863,2.265,0,3.129l-3.128,3.128c-0.863,0.863-2.265,0.863-3.129,0L39.406,52.69c-0.863-0.864-0.863-2.265,0-3.129l3.128-3.127C43.399,45.571,44.799,45.571,45.662,46.434z'/><path class='brush_tip' d='M39.677,53.031l10.229,10.228c-8.683,20.973-28.987,10.601-28.987,10.601s10.482,0.427,10.021-9.586C30.561,56.009,37.24,53.623,39.677,53.031z'/></g></svg>";
$(brushFilled).appendTo("#filled-brush");
var calanderFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base_top' d='M69.436,24.573h-38.89c-2.478,0-4.486,2.009-4.486,4.487V50h47.862V29.061C73.922,26.582,71.912,24.573,69.436,24.573z'/><path class='base_bottom' d='M69.436,75.427h-38.89c-2.478,0-4.486-2.009-4.486-4.487V50h47.862v20.939C73.922,73.418,71.912,75.427,69.436,75.427z'/><path class='left' d='M23.088,47.009h2.991v5.982h-2.991V47.009z'/><path class='right' d='M73.922,47.009h2.99v5.982h-2.99V47.009z'/><path class='number' d='M45.991,39.779c-1.318,0-2.443,0.463-3.378,1.394c-0.936,0.93-1.402,2.059-1.402,3.387v10.898c0,1.316,0.465,2.439,1.395,3.371c0.929,0.929,2.058,1.394,3.386,1.394c1.307,0,2.427-0.464,3.362-1.387c0.935-0.924,1.401-2.05,1.401-3.378V44.56c0-1.317-0.461-2.443-1.385-3.377C48.445,40.246,47.318,39.779,45.991,39.779z M47.632,55.41c0,0.477-0.169,0.886-0.51,1.227c-0.339,0.341-0.748,0.51-1.226,0.51s-0.885-0.169-1.22-0.51s-0.502-0.75-0.502-1.227V44.494c0-0.477,0.167-0.887,0.502-1.226c0.334-0.339,0.742-0.51,1.22-0.51s0.887,0.171,1.226,0.51c0.341,0.339,0.51,0.749,0.51,1.226V55.41z M56.667,40.033c-0.288,0.658-0.758,1.218-1.411,1.682c-0.653,0.462-1.342,0.734-2.063,0.82v2.104h2.565v15.377h3.012V40.033H56.667L56.667,40.033z'/></g></svg>";
$(calanderFilled).appendTo("#filled-calander");
var cameraFilled =
" <svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M75.707,75.279H24.293c-2.839,0-5.141-2.303-5.141-5.143V39.289c0-2.556,1.87-4.659,4.313-5.058l-0.028-0.084c0,0,0.331,0,0.856,0l0,0h4.285c11.14,0,7.712-9.426,15.424-9.426c2.57,0,5.998,0,5.998,0s3.428,0,5.998,0c7.712,0,4.285,9.426,15.424,9.426h4.284l0,0c0.526,0,0.856,0,0.856,0l-0.027,0.084c2.443,0.398,4.313,2.502,4.313,5.058v30.848C80.85,72.977,78.546,75.279,75.707,75.279z'/><path class='strip' d='M19.152,48.715h61.696v17.138H19.152V48.715z'/><path class='lens' d='M50.001,41.86c8.519,0,15.424,6.904,15.424,15.423c0,8.52-6.905,15.426-15.424,15.426c-8.518,0-15.424-6.906-15.424-15.426C34.576,48.764,41.482,41.86,50.001,41.86z'/><path class='lens_inner' d='M50.001,46.144c6.151,0,11.14,4.987,11.14,11.139s-4.986,11.141-11.14,11.141c-6.153,0-11.14-4.986-11.14-11.141C38.861,51.133,43.848,46.144,50.001,46.144z'/><path class='flash' d='M44.859,27.864h10.284c1.795,0,3.428,4.284,3.428,4.284c0,1.42-1.151,2.569-2.571,2.569H44.003c-1.42,0-2.571-1.149-2.571-2.569C41.432,32.148,43.063,27.864,44.859,27.864z'/><path class='red' d='M73.708,36.717c1.42,0,2.571,1.151,2.571,2.571c0,1.421-1.151,2.57-2.571,2.57c-1.419,0-2.571-1.149-2.571-2.57C71.137,37.869,72.289,36.717,73.708,36.717z'/><path class='button' d='M25.722,31.578h3.428c1.419,0,2.57,1.15,2.57,2.57h-8.569C23.151,32.728,24.302,31.578,25.722,31.578z'/></g></svg>";
$(cameraFilled).appendTo("#filled-camera");
var clockFilled =
" <svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M50,16.25c18.641,0,33.75,15.109,33.75,33.75S68.641,83.75,50,83.75c-18.64,0-33.75-15.109-33.75-33.75S31.36,16.25,50,16.25z'/><path class='face' d='M50,22.635c15.113,0,27.365,12.252,27.365,27.365c0,15.113-12.252,27.365-27.365,27.365c-15.113,0-27.365-12.252-27.365-27.365C22.635,34.887,34.887,22.635,50,22.635z'/><path class='seconds' d='M45.915,46.352l0.645-0.645l16.419,16.418l-0.645,0.646L45.915,46.352z'/><path class='middle' d='M50,47.264c1.512,0,2.736,1.226,2.736,2.736S51.512,52.736,50,52.736S47.264,51.511,47.264,50S48.488,47.264,50,47.264z'/><path class='hour' fill='' d='M51.844,50c0,0.504-0.408,0.912-0.912,0.912H37.249c-0.505,0-0.912-0.408-0.912-0.912c0-0.504,0.407-0.912,0.912-0.912h13.683C51.436,49.088,51.844,49.496,51.844,50z'/><path class='minute' d='M50,28.108c0.504,0,0.912,0.408,0.912,0.913v20.067C50.912,49.592,50.504,50,50,50c-0.504,0-0.912-0.408-0.912-0.912V29.021C49.088,28.516,49.496,28.108,50,28.108z'/></g></svg>";
$(clockFilled).appendTo("#filled-clock");
var coffeeFilled =
" <svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M27.253,32.94h45.493l-8.748,46.369H36.002L27.253,32.94z'/><path class='middle' d='M27.253,43.329h45.493l-4.373,20.122H31.627L27.253,43.329z'/><polygon class='top' points='70.996,26.816 66.623,26.816 63.998,20.692 36.002,20.692 33.377,26.816 29.003,26.816 26.378,32.94 73.621,32.94 '/></g></svg>";
$(coffeeFilled).appendTo("#filled-coffee");
var diamondFilled =
" <svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' fill='' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='middle' d='M17.702,38.645h64.597L50,82.607L17.702,38.645z'/><path class='top_3' d='M50,23.393l11.665,15.252H38.336L50,23.393z'/><path class='top_2' d='M38.336,38.645l-8.972-15.252H50L38.336,38.645z'/><path class='top_1' d='M61.664,38.645L50,23.393h20.635L61.664,38.645z'/><path class='top_left' d='M29.364,23.393l8.972,15.252H17.702L29.364,23.393z'/><path class='top_right' d='M70.635,23.393l11.662,15.252H61.662L70.635,23.393z'/><path class='right' d='M61.664,38.645h20.635L50,82.607L61.664,38.645z'/><path class='left' d='M17.702,38.645h20.635L50,82.607L17.702,38.645z'/></g></svg>";
$(diamondFilled).appendTo("#filled-diamond");
var diskFilled =
" <svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M72.848,75.133H27.151c-1.262,0-2.285-1.023-2.285-2.285V27.151c0-1.261,1.022-2.284,2.285-2.284h38.843l9.139,9.138v38.842C75.133,74.109,74.109,75.133,72.848,75.133z'/><path class='top' d='M65.992,24.867v15.994c0,1.261-1.021,2.285-2.283,2.285H36.29c-1.262,0-2.285-1.023-2.285-2.285V24.867H65.992z'/><path class='top_right' d='M55.711,27.914h8.379v12.185h-8.379V27.914z'/><path class='bottom' d='M65.992,75.133V53.047c0-1.261-1.021-2.285-2.283-2.285H36.29c-1.262,0-2.285,1.024-2.285,2.285v22.086H65.992z'/><path class='text' d='M39.718,58.377h20.563c0.211,0,0.381-0.17,0.381-0.379c0-0.211-0.17-0.381-0.381-0.381H39.718c-0.21,0-0.38,0.17-0.38,0.381C39.337,58.207,39.508,58.377,39.718,58.377z M60.281,63.709H39.718c-0.21,0-0.38,0.172-0.38,0.381c0,0.211,0.17,0.381,0.38,0.381h20.563c0.211,0,0.381-0.17,0.381-0.381C60.662,63.881,60.492,63.709,60.281,63.709z M60.281,69.801H39.718c-0.21,0-0.38,0.172-0.38,0.381c0,0.211,0.17,0.381,0.38,0.381h20.563c0.211,0,0.381-0.17,0.381-0.381C60.662,69.975,60.492,69.801,60.281,69.801z'/></g></svg>";
$(diskFilled).appendTo("#filled-disk");
var emailFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='top' d='M76.162,35.079c1.113,0.731,1.113,1.917,0,2.647L52.013,53.615c-1.11,0.731-2.915,0.731-4.024,0l-24.15-15.889c-1.111-0.73-1.111-1.916,0-2.647l24.15-15.889c1.11-0.729,2.914-0.729,4.024,0L76.162,35.079z'/><path class='paper' d='M30.105,32.763h39.791v28.421H30.105V32.763z'/><path class='base' d='M23.003,36.404L50,54.165l26.997-17.761c0,0,0.006-0.667,0.006,1.688v27.002c0,2.354-1.91,4.264-4.264,4.264H27.262c-2.354,0-4.264-1.91-4.264-4.264V38.092C23,35.738,23.003,36.404,23.003,36.404z'/><path class='text' d='M36.145,38.27h27.71c0.199,0,0.357-0.16,0.357-0.356c0-0.195-0.158-0.355-0.357-0.355h-27.71c-0.197,0-0.355,0.16-0.355,0.355C35.788,38.11,35.947,38.27,36.145,38.27z M63.854,39.691H36.144c-0.197,0-0.355,0.159-0.355,0.356c0,0.196,0.158,0.355,0.355,0.355h27.711c0.197,0,0.357-0.16,0.357-0.355C64.211,39.849,64.053,39.691,63.854,39.691z M63.854,41.822H36.144c-0.197,0-0.355,0.161-0.355,0.356c0,0.197,0.158,0.355,0.355,0.355h27.711c0.197,0,0.357-0.158,0.357-0.355C64.211,41.982,64.053,41.822,63.854,41.822z'/></g></svg>";
$(emailFilled).appendTo("#filled-email");
var filmFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' fill='' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M72.021,74.154v-3.552c0-1.177-0.954-2.132-2.131-2.132h-2.842c-1.176,0-2.132,0.955-2.132,2.132v3.552H35.081v-3.552c0-1.177-0.955-2.132-2.131-2.132h-2.843c-1.176,0-2.131,0.955-2.131,2.132v3.552h-2.842V25.846h2.842v3.552c0,1.177,0.955,2.132,2.131,2.132h2.843c1.176,0,2.131-0.955,2.131-2.132v-3.552h29.837v3.552c0,1.177,0.955,2.132,2.132,2.132h2.842c1.178,0,2.131-0.955,2.131-2.132v-3.552h2.843v48.309H72.021z M35.081,36.502c0-1.177-0.955-2.132-2.131-2.132h-2.843c-1.176,0-2.131,0.955-2.131,2.132v1.421c0,1.175,0.955,2.132,2.131,2.132h2.843c1.176,0,2.131-0.957,2.131-2.132V36.502z M35.081,45.026c0-1.176-0.955-2.13-2.131-2.13h-2.843c-1.176,0-2.131,0.953-2.131,2.13v1.42c0,1.177,0.955,2.132,2.131,2.132h2.843c1.176,0,2.131-0.955,2.131-2.132V45.026z M35.081,53.552c0-1.177-0.955-2.132-2.131-2.132h-2.843c-1.176,0-2.131,0.955-2.131,2.132v1.421c0,1.176,0.955,2.13,2.131,2.13h2.843c1.176,0,2.131-0.954,2.131-2.13V53.552z M35.081,62.077c0-1.176-0.955-2.132-2.131-2.132h-2.843c-1.176,0-2.131,0.956-2.131,2.132v1.421c0,1.177,0.955,2.132,2.131,2.132h2.843c1.176,0,2.131-0.955,2.131-2.132V62.077z M72.021,36.502c0-1.177-0.954-2.132-2.131-2.132h-2.842c-1.176,0-2.132,0.955-2.132,2.132v1.421c0,1.175,0.955,2.132,2.132,2.132h2.842c1.177,0,2.131-0.957,2.131-2.132V36.502z M72.021,45.026c0-1.176-0.954-2.13-2.131-2.13h-2.842c-1.176,0-2.132,0.953-2.132,2.13v1.42c0,1.177,0.955,2.132,2.132,2.132h2.842c1.177,0,2.131-0.955,2.131-2.132V45.026z M72.021,53.552c0-1.177-0.954-2.132-2.131-2.132h-2.842c-1.176,0-2.132,0.955-2.132,2.132v1.421c0,1.176,0.955,2.13,2.132,2.13h2.842c1.177,0,2.131-0.954,2.131-2.13V53.552z M72.021,62.077c0-1.176-0.954-2.132-2.131-2.132h-2.842c-1.176,0-2.132,0.956-2.132,2.132v1.421c0,1.177,0.955,2.132,2.132,2.132h2.842c1.177,0,2.131-0.955,2.131-2.132V62.077z'/><path class='bottom' d='M40.054,51.42h19.892c1.177,0,2.132,0.955,2.132,2.132v12.787c0,1.177-0.955,2.132-2.132,2.132H40.054c-1.177,0-2.132-0.955-2.132-2.132V53.552C37.922,52.375,38.876,51.42,40.054,51.42z'/><path class='top' fill='' d='M40.054,31.529h19.892c1.177,0,2.132,0.953,2.132,2.13v12.787c0,1.177-0.955,2.132-2.132,2.132H40.054c-1.177,0-2.132-0.955-2.132-2.132V33.659C37.922,32.482,38.876,31.529,40.054,31.529z'/></g></svg>";
$(filmFilled).appendTo("#filled-film");
var flagFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,4.25c26.441,0,47.875,21.434,47.875,47.875S76.441,100,50,100C17.857,100,2.125,78.566,2.125,52.125S23.559,4.25,50,4.25z'/><g class='icon'><path class='bottom' d='M49.857,36.924l24.678,6.581v24.677l-24.678-6.58V36.924z'/><path class='shadow' d='M49.857,37.45l13.984-4.114v24.678l-13.984,4.113V37.45z'/><path class='top' d='M39.426,26.845l24.677,6.581v24.679l-24.677-6.58V26.845z'/><path class='pole' d='M37.826,22.117c1.817,0,3.29,1.473,3.29,3.291v54.292c0,1.816-1.474,3.289-3.29,3.289c-1.817,0-3.291-1.473-3.291-3.289V25.407C34.536,23.59,36.009,22.117,37.826,22.117z'/></g></svg>";
$(flagFilled).appendTo("#filled-flag");
var folderFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='back' d='M67.715,70.502c0,2.516-2.038,4.555-4.556,4.555H30.51c-2.516,0-4.555-2.041-4.555-4.555V29.499c0-2.516,2.039-4.555,4.555-4.555h6.834c9.871,0,6.833,6.075,18.224,6.075c4.556,0,12.148,0,12.148,0L67.715,70.502L67.715,70.502z'/><path class='paper_back' d='M27.828,34.56h44.04v39.483h-44.04V34.56z'/><path class='paper_front' d='M29.602,38.356h44.798v35.687H29.602V38.356z'/><path class='front' d='M73.491,75.057H30.212c-1.96,0-3.615-1.244-4.26-2.979c0.439,0.863,2.465,1.461,3.5,1.461c1.519,0,3.037-1.52,3.037-4.557V43.167h45.559v27.334C78.048,73.016,76.008,75.057,73.491,75.057z'/></g></svg>";
$(folderFilled).appendTo("#filled-folder");
var graphFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='bar_left' d='M42.401,35.96l15.197,11.053v25.563H42.401V35.96z'/><path class='bar_middle' d='M27.201,42.178l15.199-6.22v36.616c0,0-8.186,0-11.294,0c-1.785,0-3.986-1.842-3.906-3.397C27.518,63.139,27.201,42.178,27.201,42.178z'/><path class='bar_right' d='M72.8,69.178c0.08,1.556-2.121,3.398-3.907,3.398c-3.107,0-11.294,0-11.294,0V47.013l15.199-17.271C72.8,29.741,72.483,63.139,72.8,69.178z'/><path class='dot_4' d='M42.401,33.642c1.524,0,2.763,1.237,2.763,2.764s-1.238,2.764-2.763,2.764c-1.527,0-2.764-1.237-2.764-2.764S40.875,33.642,42.401,33.642z'/><path class='dot_3' d='M57.599,42.623c1.526,0,2.763,1.237,2.763,2.763c0,1.527-1.236,2.765-2.763,2.765c-1.525,0-2.763-1.237-2.763-2.765C54.836,43.86,56.073,42.623,57.599,42.623z'/><path class='dot_2' d='M72.8,27.424c1.524,0,2.762,1.238,2.762,2.764c0,1.527-1.237,2.765-2.762,2.765c-1.527,0-2.764-1.237-2.764-2.765C70.034,28.661,71.271,27.424,72.8,27.424z'/><path class='dot_1' d='M27.201,38.479c1.525,0,2.764,1.237,2.764,2.764s-1.238,2.765-2.764,2.765c-1.526,0-2.763-1.238-2.763-2.765C24.438,39.715,25.675,38.479,27.201,38.479z'/></g></svg>";
$(graphFilled).appendTo("#filled-graph");
var heartFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' fill='' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M50,79.036c-5.322-0.002-30.415-18.54-30.415-37.078c0-5.324,0.566-16.994,15.969-16.994c6.321,0,11.918,4.825,14.446,10.042c2.53-5.217,8.127-10.042,14.448-10.042c15.402,0,15.967,11.67,15.967,16.994C80.415,60.496,55.323,79.034,50,79.036z'/><path class='left' d='M50,79.036c-10.701-3.241-30.415-18.54-30.415-37.078c0-5.324,0.566-16.994,15.969-16.994c6.321,0,11.918,4.825,14.446,10.042C50,46.931,50,68.191,50,79.036z'/></g></svg>";
$(heartFilled).appendTo("#filled-heart");
var homeFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M50,29.753l23.293,17.47v26.011c0,2.572-2.086,4.659-4.66,4.659H31.366c-2.574,0-4.658-2.086-4.658-4.659V47.223L50,29.753z'/><path class='hole' d='M50,50.427c5.145,0,9.316,4.172,9.316,9.316c0,5.144-4.172,9.317-9.316,9.317c-5.146,0-9.316-4.174-9.316-9.317C40.684,54.599,44.854,50.427,50,50.427z'/><path class='roof' d='M50,35.188L22.826,55.374V38.295L50,18.107l27.174,20.188v17.08L50,35.188z'/></g></svg>";
$(homeFilled).appendTo("#filled-home");
var lightningFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><polygon class='bolt' points='76.155,41.825 58.155,41.825 69.163,20.856 42.078,20.856 29.845,55.805 47.029,55.805 38.583,81.145 '/><path class='highlight' d='M65.014,22.603H44.917L33.559,54.059l13.98-27.96L65.014,22.603z M42.296,75.9l10.049-20.096h-2.791L42.296,75.9z'/></g></svg>";
$(lightningFilled).appendTo("#filled-lightning");
var locationFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M50,19.53c13.945,0,25.248,11.213,25.248,25.045C75.248,60.437,54.207,80.47,50,80.47c-4.208,0-25.248-20.033-25.248-35.895C24.752,30.743,36.056,19.53,50,19.53z'/><path class='inner' d='M50,30.488c8.174,0,14.8,6.625,14.8,14.799c0,8.173-6.626,14.8-14.8,14.8s-14.8-6.626-14.8-14.799C35.2,37.114,41.826,30.488,50,30.488z'/></g></svg>";
$(locationFilled).appendTo("#filled-location");
var lockFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M29.929,39.176h38.933c2.688,0,4.866,2.181,4.866,4.868v24.332c0,2.688-2.179,4.869-4.866,4.869H29.929c-2.687,0-4.867-2.179-4.867-4.869V44.043C25.062,41.356,27.242,39.176,29.929,39.176z'/><path class='baselight' d='M27.495,39.176h19.466c1.343,0,2.434,0,2.434,0v34.066c0,0-1.09,0-2.434,0H27.495c-1.344,0-2.433-2.179-2.433-4.867V44.042C25.062,41.356,26.152,39.176,27.495,39.176z'/><path class='keyhole' d='M55.073,53.776c0-3.136-2.542-5.679-5.678-5.679s-5.678,2.543-5.678,5.679c0,2.263,1.328,4.212,3.244,5.124v5.418h4.867V58.9C53.745,57.988,55.073,56.039,55.073,53.776z'/><path class='bar' d='M49.395,27.821c-6.271,0-11.355,5.083-11.355,11.354h-6.489c0-9.854,7.989-17.843,17.844-17.843c9.854,0,17.844,7.989,17.844,17.843h-6.49C60.749,32.904,55.667,27.821,49.395,27.821z'/></g></svg>";
$(lockFilled).appendTo("#filled-lock");
var magnifyFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M72.215,69.959L60.276,58.021c2.497-3.507,3.97-7.792,3.97-12.424c0-11.847-9.604-21.451-21.452-21.451c-11.848,0-21.451,9.604-21.451,21.451c0,11.847,9.604,21.451,21.451,21.451c4.632,0,8.918-1.473,12.425-3.97l11.938,11.938c1.116,1.115,2.928,1.115,4.045,0l1.013-1.014C73.33,72.887,73.33,71.074,72.215,69.959z'/><path class='glass' d='M43.034,30.103c8.689,0,15.732,7.043,15.732,15.731c0,8.689-7.043,15.732-15.732,15.732c-8.688,0-15.731-7.043-15.731-15.732C27.302,37.146,34.345,30.103,43.034,30.103z'/></g></svg>";
$(magnifyFilled).appendTo("#filled-magnify");
var messageFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='back' d='M75.139,28.854h-3.807l-8.125-8.125c-0.381-0.38-0.999-0.382-1.381,0l-8.124,8.125H36.428c-2.79,0-5.05,2.261-5.05,5.048v25.247c0,2.79,2.26,5.051,5.05,5.051h38.711c2.789,0,5.05-2.261,5.05-5.051V33.902C80.188,31.115,77.928,28.854,75.139,28.854z'/><path class='front' d='M63.571,35.8H24.862c-2.789,0-5.05,2.262-5.05,5.049v25.247c0,2.788,2.261,5.049,5.05,5.049h3.806l8.125,8.125c0.382,0.381,1,0.383,1.381,0l8.125-8.125h17.275c2.788,0,5.05-2.261,5.05-5.049V40.85C68.62,38.062,66.361,35.8,63.571,35.8z'/><path class='dots' d='M34.743,50.108c-1.858,0-3.365,1.507-3.365,3.366c0,1.86,1.506,3.367,3.365,3.367c1.86,0,3.367-1.507,3.367-3.367C38.109,51.615,36.603,50.108,34.743,50.108z M44.842,50.108c-1.858,0-3.367,1.507-3.367,3.366c0,1.86,1.507,3.367,3.367,3.367c1.859,0,3.366-1.507,3.366-3.367C48.208,51.615,46.701,50.108,44.842,50.108z M54.94,50.108c-1.857,0-3.365,1.507-3.365,3.366c0,1.86,1.506,3.367,3.365,3.367c1.86,0,3.366-1.507,3.366-3.367C58.307,51.615,56.8,50.108,54.94,50.108z'/></g></svg>";
$(messageFilled).appendTo("#filled-message");
var micFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M50,19.317c8.592,0,15.557,6.964,15.557,15.558v12.101c0,8.593-6.965,15.558-15.557,15.558s-15.558-6.965-15.558-15.558V34.875C34.443,26.281,41.408,19.317,50,19.317z'/><path class='stand' d='M74.201,46.975c0-1.433-1.161-2.594-2.592-2.594c-1.434,0-2.595,1.161-2.595,2.594c0,10.501-8.512,19.015-19.014,19.015c-10.501,0-19.015-8.514-19.015-19.015c0-1.433-1.16-2.594-2.593-2.594c-1.432,0-2.593,1.161-2.593,2.594c0,12.49,9.461,22.765,21.607,24.06v4.461h-6.913c-1.432,0-2.594,1.162-2.594,2.594s1.161,2.594,2.594,2.594h19.014c1.433,0,2.593-1.162,2.593-2.594s-1.16-2.594-2.593-2.594h-6.915v-4.461C64.739,69.74,74.201,59.463,74.201,46.975z'/><path class='bars_left' d='M34.443,33.146v3.458h10.372v-3.458H34.443z M34.443,42.653h10.372v-3.457H34.443V42.653z M34.443,48.704h10.372v-3.458H34.443V48.704z'/><g class='bars_right'><rect x='55.187' y='33.146' width='10.371' height='3.458'/><rect x='55.187' y='39.196' width='10.371' height='3.457'/><rect x='55.187' y='45.246' width='10.371' height='3.458'/></g></g></svg>";
$(micFilled).appendTo("#filled-mic");
var paperFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M33.174,76.947V28.366h37.955v48.581H33.174z'/><path class='front' d='M28.872,71.634V23.053h27.328L66.826,33.68v37.954H28.872z'/><path class='corner' d='M56.199,23.053L66.826,33.68H56.199V23.053z'/><path class='text' d='M36.432,39.247h22.014c0.209,0,0.381-0.169,0.381-0.379c0-0.211-0.17-0.381-0.381-0.381H36.432c-0.21,0-0.38,0.17-0.38,0.381C36.052,39.077,36.222,39.247,36.432,39.247z M58.443,46.079H36.431c-0.21,0-0.38,0.169-0.38,0.379c0,0.211,0.17,0.381,0.38,0.381h22.013c0.211,0,0.381-0.169,0.381-0.381C58.824,46.249,58.654,46.079,58.443,46.079z M58.443,53.67H36.431c-0.21,0-0.38,0.169-0.38,0.379c0,0.211,0.17,0.381,0.38,0.381h22.013c0.211,0,0.381-0.17,0.381-0.381C58.824,53.839,58.654,53.67,58.443,53.67z M58.443,61.261H36.431c-0.21,0-0.38,0.17-0.38,0.379c0,0.211,0.17,0.381,0.38,0.381h22.013c0.211,0,0.381-0.17,0.381-0.381C58.824,61.431,58.654,61.261,58.443,61.261z'/></g></svg>";
$(paperFilled).appendTo("#filled-paper");
var pencilFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,4.25c26.441,0,47.875,21.434,47.875,47.875C97.875,78.566,76.441,100,50,100C17.857,100,2.125,78.566,2.125,52.125C2.125,25.684,23.559,4.25,50,4.25z'/><g class='icon'><path class='wood' d='M26.683,55.108l16.801,16.84L23.62,75.635L26.683,55.108z'/><path class='base_top' d='M53.408,28.524l5.809,5.813L32.489,61.012l-5.807-5.75L53.408,28.524z'/><path class='base_bottom' d='M63.639,38.64l6.569,6.572L43.483,71.948l-6.635-6.575L63.639,38.64z'/><path class='base_middle' d='M58.868,33.931l6.569,6.573L38.714,67.239l-6.569-6.574L58.868,33.931z'/><path class='tip' d='M31.731,74.101l-8.635,1.776l1.776-8.638L31.731,74.101z'/><path class='eraser' d='M65.004,23.567l10.455,10.461c1.926,1.926,1.926,5.049,0,6.975L58.03,23.567C59.958,21.642,63.078,21.642,65.004,23.567z'/><path class='metal' d='M58.555,22.899l17.429,17.437c0.322,0.321,0.322,0.843,0,1.163l-4.244,4.246c-0.32,0.322-0.841,0.322-1.163,0L53.147,28.308c-0.319-0.32-0.319-0.842,0-1.161l4.245-4.248C57.715,22.578,58.235,22.578,58.555,22.899z'/></g></svg>";
$(pencilFilled).appendTo("#filled-pencil");
var phoneFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M37.381,21.793h25.237c2.46,0,4.454,1.994,4.454,4.454v47.506c0,2.46-1.994,4.454-4.454,4.454H37.381c-2.46,0-4.454-1.994-4.454-4.454V26.247C32.928,23.787,34.921,21.793,37.381,21.793z'/><path class='screen' d='M35.896,30.701h28.208v38.598H35.896V30.701z'/><path class='details' d='M50,71.681c-1.23,0-2.227,0.998-2.227,2.228c0,1.227,0.996,2.225,2.227,2.225s2.227-0.998,2.227-2.225C52.227,72.679,51.23,71.681,50,71.681z M52.969,26.401h-5.938c-0.411,0-0.743,0.331-0.743,0.741s0.332,0.743,0.743,0.743h5.938c0.41,0,0.743-0.333,0.743-0.743C53.71,26.732,53.379,26.401,52.969,26.401z'/></g></svg>";
$(phoneFilled).appendTo("#filled-phone");
var pictureFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='back' d='M23.236,32.68l41.281-11.062c1.221-0.327,2.477,0.397,2.804,1.618l11.062,41.279c0.327,1.223-0.397,2.478-1.618,2.805L35.483,78.382c-1.221,0.327-2.477-0.397-2.804-1.618L21.618,35.484C21.29,34.262,22.015,33.007,23.236,32.68z'/><path class='front' d='M28.631,26.343h42.736c1.264,0,2.29,1.024,2.29,2.289v42.736c0,1.265-1.025,2.289-2.29,2.289H28.631c-1.264,0-2.29-1.024-2.29-2.289V28.632C26.342,27.367,27.367,26.343,28.631,26.343z'/><path class='sky' d='M30.158,29.395h39.684c0.422,0,0.764,0.342,0.764,0.765v39.684c0,0.423-0.342,0.765-0.764,0.765H30.158c-0.421,0-0.763-0.342-0.763-0.765V30.159C29.395,29.736,29.736,29.395,30.158,29.395z'/><path class='sun' d='M39.062,35.342c2.529,0,4.579,2.051,4.579,4.579c0,2.529-2.05,4.579-4.579,4.579s-4.579-2.05-4.579-4.579C34.483,37.393,36.534,35.342,39.062,35.342z'/><path class='mountain' d='M29.395,70.033l10.59-16.188c0.535-0.834,1.402-0.834,1.937,0l3.549,5.536l9.875-15.399c0.763-1.192,2.003-1.192,2.766,0c0,0,11.314,23.861,12.494,25.789c-0.003,0.388,0.046,0.834-0.443,0.834C67.2,70.672,35.549,70.6,30.036,70.593C29.526,70.593,29.395,70.033,29.395,70.033z'/></g></svg>";
$(pictureFilled).appendTo("#filled-picture");
var planeFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='bottom' f d='M57.25,62.16L46.755,74.738l4.498-15.933L57.25,62.16z'/><path class='right' d='M75.985,25.262L64.742,73.061L51.247,58.806L75.985,25.262z'/><path class='middle' d='M75.985,25.262L51.996,59.645l-5.247,15.094L33.257,53.771'/><path class='left' d='M75.985,25.262L33.257,54.61l-17.242-0.839L75.985,25.262z'/></g></svg>";
$(planeFilled).appendTo("#filled-plane");
var presentFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,4.25c26.441,0,47.875,21.434,47.875,47.875C97.875,78.566,76.441,100,50,100C17.857,100,2.125,78.566,2.125,52.125C2.125,25.684,23.559,4.25,50,4.25z'/><g class='icon'><path class='base' d='M24.724,47.472h50.554v30.33H24.724V47.472z'/><path class='top' d='M21.354,39.047h57.293v8.426H21.354V39.047z'/><path class='ribbon' d='M58.427,22.196c-4.651,0-8.426,3.772-8.426,8.426c0-4.653-3.773-8.426-8.426-8.426s-8.427,3.772-8.427,8.426c0,4.652,3.774,8.426,8.427,8.426h4.212v38.756h8.426V39.047h4.214c4.651,0,8.425-3.772,8.425-8.426S63.078,22.196,58.427,22.196z M44.944,33.991h-3.369c-1.861,0-3.37-1.51-3.37-3.37s1.509-3.37,3.37-3.37c1.86,0,3.369,1.51,3.369,3.37V33.991z M58.427,33.991h-3.369v-3.37c0-1.86,1.507-3.37,3.369-3.37c1.861,0,3.37,1.51,3.37,3.37S60.288,33.991,58.427,33.991z'/></g></svg>";
$(presentFilled).appendTo("#filled-present");
var robotFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='ears' d='M22.849,58.578l5.43,3.102V43.837l-5.43,3.102V58.578z M71.722,43.835V61.68l5.43-3.105V46.939L71.722,43.835z'/><path class='base' d='M31.381,33.751h37.237c1.714,0,3.102,1.39,3.102,3.103v32.582c0,1.715-1.388,3.104-3.102,3.104H31.381c-1.713,0-3.102-1.389-3.102-3.104V36.854C28.279,35.141,29.668,33.751,31.381,33.751z'/><path class='highlight' d='M29.83,33.751h18.618c0.855,0,1.552,0,1.552,0v38.788c0,0-0.695,0-1.552,0H29.83c-0.856,0-1.552-1.391-1.552-3.104V36.854C28.279,35.141,28.975,33.751,29.83,33.751z'/><path class='antenna' d='M55.431,22.891c0-3-2.431-5.43-5.431-5.43c-2.999,0-5.43,2.43-5.43,5.43c0,2.459,1.637,4.534,3.879,5.203v5.66h3.104v-5.66C53.795,27.425,55.431,25.349,55.431,22.891z'/><path class='eyes' d='M42.241,49.266c-2.141,0-3.879,1.736-3.879,3.879c0,2.141,1.736,3.879,3.879,3.879c2.142,0,3.879-1.738,3.879-3.879C46.121,51.002,44.383,49.266,42.241,49.266z M57.758,49.266c-2.141,0-3.879,1.736-3.879,3.879c0,2.141,1.736,3.879,3.879,3.879s3.879-1.738,3.879-3.879C61.637,51.002,59.898,49.266,57.758,49.266z'/></g></svg>";
$(robotFilled).appendTo("#filled-robot");
var rocketFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='engine' d='M32.515,51.63l16.327,16.328l-3.571,5.612L26.902,55.2L32.515,51.63z'/><path class='base' d='M26.902,46.083l1.021-1.021c0,0,7.669-1.483,14.828-8.643c14.165-14.164,30.583-9.217,30.583-9.217s4.946,16.421-9.216,30.583c-7.159,7.158-8.643,14.829-8.643,14.829l-1.021,1.021L26.902,46.083z'/><path class='window' d='M62.619,39.311c2.817,2.818,2.817,7.387,0,10.205c-2.817,2.82-7.388,2.82-10.204,0c-2.817-2.817-2.817-7.386,0-10.205C55.233,36.493,59.802,36.493,62.619,39.311z'/><path class='glass' d='M61.09,40.841c1.972,1.974,1.972,5.172,0,7.144c-1.974,1.972-5.171,1.972-7.143,0c-1.973-1.973-1.973-5.171,0-7.144C55.919,38.87,59.116,38.87,61.09,40.841z'/><path class='flame' d='M33.326,66.073c1.69,1.692,1.747,4.377,0.126,5.999c-1.859,1.858-6.759,1.656-7.269,1.146c-0.511-0.511-0.713-5.41,1.146-7.27C28.949,64.327,31.635,64.384,33.326,66.073z'/></g></svg>";
$(rocketFilled).appendTo("#filled-rocket");
var screenFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,4.25c26.441,0,47.875,21.434,47.875,47.875S76.441,100,50,100C17.857,100,2.125,78.566,2.125,52.125S23.559,4.25,50,4.25z'/><g class='icon'><path class='stand' d='M33.606,79.886v-2.343c7.113,0,8.588-2.227,8.588-6.242c0-0.133-0.017-0.65-0.021-0.782h15.652c-0.005,0.132-0.021,0.649-0.021,0.782c0,4.016,1.474,6.242,8.588,6.242v2.343H33.606z'/><path class='base' d='M27.361,28.364h45.276c2.587,0,4.685,2.097,4.685,4.685v32.787c0,2.586-2.098,4.683-4.685,4.683H27.361c-2.587,0-4.684-2.097-4.684-4.683V33.049C22.678,30.461,24.774,28.364,27.361,28.364z'/><path class='highlight' d='M27.361,28.364h45.276c2.587,0,4.685,1.786,4.685,3.99v27.929c0,2.205,0,3.992,0,3.992H22.678c0,0,0-1.787,0-3.992V32.354C22.678,30.15,24.774,28.364,27.361,28.364z'/><path class='logo' d='M49.999,64.757c1.294,0,2.342,1.05,2.342,2.343c0,1.292-1.049,2.342-2.342,2.342c-1.292,0-2.342-1.05-2.342-2.342C47.657,65.807,48.706,64.757,49.999,64.757z'/></g></svg>";
$(screenFilled).appendTo("#filled-screen");
var settingsFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M79.649,54.255v-8.509l-8.053-1.832c-0.484-1.721-1.162-3.358-2.019-4.885l4.396-6.986l-6.017-6.017l-6.985,4.396c-1.526-0.859-3.164-1.536-4.885-2.02l-1.832-8.051h-8.509l-1.832,8.051c-1.72,0.485-3.357,1.161-4.886,2.02l-6.986-4.396l-6.017,6.017l4.397,6.986c-0.858,1.527-1.536,3.164-2.021,4.885l-8.052,1.832v8.509l8.052,1.831c0.484,1.721,1.162,3.358,2.021,4.885l-4.397,6.987l6.017,6.017l6.986-4.396c1.527,0.858,3.164,1.535,4.886,2.02l1.832,8.051h8.509l1.832-8.051c1.72-0.484,3.357-1.161,4.885-2.02l6.985,4.396l6.017-6.017l-4.396-6.987c0.858-1.526,1.534-3.164,2.019-4.885L79.649,54.255z'/><path class='top' d='M50,35.171c8.189,0,14.829,6.639,14.829,14.83c0,8.191-6.64,14.83-14.829,14.83c-8.191,0-14.83-6.639-14.83-14.83C35.17,41.81,41.809,35.171,50,35.171z'/></g></svg>";
$(settingsFilled).appendTo("#filled-settings");
var spaceshipFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,4.25c26.441,0,47.875,21.434,47.875,47.875C97.875,78.566,76.441,100,50,100C17.857,100,2.125,78.566,2.125,52.125C2.125,25.684,23.559,4.25,50,4.25z'/><g class='icon'><path class='light' d='M41.156,55.62h17.688l7.37,17.689h-32.43L41.156,55.62z'/><path class='glass' d='M41.156,35.535c0-4.884,3.96-8.845,8.844-8.845c4.885,0,8.845,3.96,8.845,8.845H41.156z'/><path class='base' d='M50,34.798c15.063,0,27.271,4.951,27.271,11.056c0,6.106-12.209,11.056-27.271,11.056c-15.062,0-27.271-4.949-27.271-11.056C22.729,39.749,34.938,34.798,50,34.798z'/><path class='circles' d='M50,41.433c-2.441,0-4.422,1.98-4.422,4.422s1.98,4.423,4.422,4.423c2.44,0,4.422-1.981,4.422-4.423S52.44,41.433,50,41.433z M64.741,41.433c-2.441,0-4.423,1.98-4.423,4.422s1.981,4.423,4.423,4.423s4.422-1.981,4.422-4.423S67.183,41.433,64.741,41.433z M35.259,41.433c-2.442,0-4.423,1.98-4.423,4.422s1.981,4.423,4.423,4.423s4.422-1.981,4.422-4.423S37.701,41.433,35.259,41.433z'/></g></svg>";
$(spaceshipFilled).appendTo("#filled-spaceship");
var stormFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='cloud' d='M70.342,38.521c0.003-0.123,0.02-0.243,0.02-0.367c0-8.339-6.752-15.099-15.083-15.099c-5.764,0-10.769,3.238-13.308,7.996c-0.791-0.285-1.641-0.446-2.53-0.446c-4.166,0-7.541,3.382-7.541,7.549l0.002,0.039c-6.729,0.392-12.068,5.961-12.068,12.795c0,7.088,5.74,12.834,12.821,12.834h34.693c7.081,0,12.82-5.746,12.82-12.834C80.165,44.936,75.974,39.874,70.342,38.521z'/><polygon class='lightning' points='58.151,69.529 51.223,69.529 54.074,63.822 46.737,63.822 41.845,73.606 49.066,73.606 45.922,80.944 '/></g></svg>";
$(stormFilled).appendTo("#filled-storm");
var suitcaseFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875S76.441,97.875,50,97.875C17.857,97.875,2.125,76.441,2.125,50S23.559,2.125,50,2.125z'/><g class='icon'><path class='top' d='M23.542,52.268V37.905c0-2.504,2.031-4.535,4.536-4.535h10.583v-4.534c0-2.505,2.031-4.537,4.536-4.537h13.607c2.504,0,4.535,2.032,4.535,4.537v4.534h10.584c2.504,0,4.535,2.031,4.535,4.535v14.363H23.542z M57.56,31.857v-1.511c0-1.253-1.016-2.269-2.268-2.269H44.709c-1.253,0-2.269,1.016-2.269,2.269v1.511v1.513H57.56V31.857L57.56,31.857z'/><path class='bottom' d='M76.457,52.268v18.898c0,2.506-2.031,4.535-4.536,4.535H28.076c-2.504,0-4.535-2.029-4.535-4.535V52.268H76.457z'/><path class='buttons' d='M36.394,49.245c-1.671,0-3.024,1.353-3.024,3.023s1.354,3.023,3.024,3.023c1.67,0,3.023-1.354,3.023-3.023S38.063,49.245,36.394,49.245z M63.606,49.245c-1.67,0-3.023,1.353-3.023,3.023s1.354,3.023,3.023,3.023s3.023-1.354,3.023-3.023S65.276,49.245,63.606,49.245z'/></g></svg>";
$(suitcaseFilled).appendTo("#filled-suitcase");
var tagFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M75.523,53.617L53.508,75.631c-1.777,1.78-4.662,1.78-6.439,0L25.418,54.174c-2.275-2.276-2.275-7.275-2.275-8.347V27.614c0-2.514,1.821-4.58,4.336-4.58l19.188,0.028c3.036,0,5.313,0.759,7.59,3.033l21.268,21.082C77.303,48.957,77.303,51.842,75.523,53.617z'/><path class='dot' d='M33.866,27.083c2.934,0,5.312,2.379,5.312,5.313c0,2.933-2.377,5.312-5.312,5.312c-2.934,0-5.312-2.379-5.312-5.312C28.555,29.461,30.932,27.083,33.866,27.083z'/></g></svg>";
$(tagFilled).appendTo("#filled-tag");
var thumbsdownFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M52.125,2.125C78.566,2.125,100,23.559,100,50c0,26.441-21.434,47.875-47.875,47.875C19.982,97.875,4.25,76.441,4.25,50C4.25,23.559,25.684,2.125,52.125,2.125z'/><g class='icon'><path class='base' d='M75.731,49.391c0,0,2.573-0.862,2.573-3.451c0-2.59-3.43-4.315-3.43-4.315s1.715-0.693,1.715-3.454c0-2.759-4.287-3.452-4.287-3.452s2.572-0.864,2.572-3.452c0-2.589-4.093-3.452-4.093-3.452H46.568v28.477h4.289c5.587,0,6.003,8.63,6.003,8.63s0,5.173,0,6.04c0,1.726,0.858,4.315,4.289,2.588c3.43-1.726,3.43-4.95,3.43-8.628c0-2.761-0.856-8.63-0.856-8.63s8.283,0,12.008,0c1.717,0,3.431-0.862,3.431-3.451C79.163,50.25,75.731,49.391,75.731,49.391z'/><path class='sleeve' d='M41.424,27.818h-5.988c-8.062,0-14.597,6.567-14.597,14.67c0,8.102,6.535,14.669,14.597,14.669h5.988V27.818z'/><path class='cuff' d='M38.85,58.674h10.293V25.881H38.85V58.674z'/><path class='dot' d='M43.997,35.521c1.42,0,2.573-1.159,2.573-2.589c0-1.429-1.152-2.587-2.573-2.587s-2.573,1.159-2.573,2.587C41.424,34.361,42.576,35.521,43.997,35.521z'/></g></svg>";
$(thumbsdownFilled).appendTo("#filled-thumbsdown");
var thumbsupFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='base' d='M78.856,47.19c0-2.562-1.698-3.417-3.396-3.417c-3.685,0-11.882,0-11.882,0s0.849-5.809,0.849-8.538c0-3.642,0-6.831-3.395-8.538c-3.396-1.708-4.242,0.854-4.242,2.562c0,0.856,0,5.977,0,5.977s-0.414,8.538-5.942,8.538h-4.243V71.95h23.958c0,0,4.051-0.854,4.051-3.416c0-2.561-2.547-3.415-2.547-3.415s4.243-0.687,4.243-3.416c0-2.732-1.697-3.417-1.697-3.417s3.396-1.707,3.396-4.27s-2.548-3.416-2.548-3.416S78.856,49.75,78.856,47.19z'/><path class='sleeve' d='M41.512,42.919h-5.925c-7.977,0-14.443,6.498-14.443,14.515c0,8.017,6.467,14.515,14.443,14.515h5.925V42.919z'/><path class='cuff' d='M38.965,73.865h10.185V41.419H38.965V73.865z'/><path class='dot' d='M41.512,66.891c0,1.415,1.14,2.562,2.546,2.562c1.407,0,2.547-1.146,2.547-2.562c0-1.414-1.141-2.561-2.547-2.561C42.652,64.33,41.512,65.477,41.512,66.891z'/></g></svg>";
$(thumbsupFilled).appendTo("#filled-thumbsup");
var trashFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' fill='' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='base' fill='' d='M72.201,38.16v32.561c0,2.452-1.988,4.44-4.441,4.44H32.241c-2.452,0-4.44-1.988-4.44-4.44V38.16H72.201z'/><path class='details' fill='' d='M40.381,41.861c-0.817,0-1.481,0.661-1.481,1.48V69.98c0,0.817,0.663,1.48,1.481,1.48c0.816,0,1.48-0.661,1.48-1.48v-26.64C41.861,42.522,41.198,41.861,40.381,41.861z M59.621,41.861c-0.816,0-1.48,0.661-1.48,1.48V69.98c0,0.817,0.664,1.48,1.48,1.48s1.48-0.661,1.48-1.48v-26.64C61.102,42.522,60.438,41.861,59.621,41.861z M50.001,41.861c-0.817,0-1.481,0.661-1.481,1.48V69.98c0,0.817,0.663,1.48,1.481,1.48c0.816,0,1.48-0.661,1.48-1.48v-26.64C51.481,42.522,50.817,41.861,50.001,41.861z'/><path class='lid' fill='' d='M24.1,38.16L24.1,38.16c0-2.453,1.987-4.441,4.441-4.441H38.9v-4.44c0-2.452,1.988-4.439,4.44-4.439h13.32c2.453,0,4.441,1.987,4.441,4.439v4.44h10.359c2.451,0,4.439,1.988,4.439,4.441l0,0H24.1z M57.4,32.24v-1.48c0-1.226-0.996-2.22-2.219-2.22H44.82c-1.226,0-2.219,0.994-2.219,2.22v1.48v1.48H57.4V32.24z'/></g></svg>";
$(trashFilled).appendTo("#filled-trash");
var userFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='body' d='M74.302,78.127H25.698c-2.982,0-5.4-2.419-5.4-5.4l0,0l0,0c0-19.884,13.501-25.202,29.702-25.202s29.702,5.318,29.702,25.202l0,0C79.702,75.71,77.283,78.127,74.302,78.127z'/><polygon class='collar_right' points='63.501,49.325 50,54.726 55.4,62.826 '/><polygon class='collar_left' points='46.977,62.826 52.377,54.726 38.876,49.325 '/><path class='head' d='M50.877,21.873c8.947,0,16.201,7.254,16.201,16.201c0,8.948-7.254,16.201-16.201,16.201c-8.947,0-16.201-7.253-16.201-16.201C34.676,29.127,41.928,21.873,50.877,21.873z'/><path class='hair' d='M67.918,39.683c-1.019,0.116-2.053,0.193-3.114,0.193c-8.816,0-16.3-4.136-19.082-9.9h-0.565c-1.256,2.194-3.435,4.371-6.296,6.022c-1.684,0.972-3.41,1.646-5.062,2.043c0.386-7.127,5.121-13.086,11.609-15.266h0.087c0.83-0.279,1.686-0.499,2.564-0.653c0.055-0.009,0.11-0.018,0.166-0.023c0.371-0.061,0.745-0.111,1.124-0.148c0.497-0.044,0.997-0.075,1.504-0.075c7.674,0,14.167,5.054,16.332,12.016c0.168,0.537,0.309,1.083,0.423,1.638c0.229,1.114,0.349,2.267,0.349,3.447C67.954,39.215,67.928,39.445,67.918,39.683z'/></g></svg>";
$(userFilled).appendTo("#filled-user");
var winnerFilled =
"<svg class='flat_icon' xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' ><path class='circle' d='M50,2.125c26.441,0,47.875,21.434,47.875,47.875c0,26.441-21.434,47.875-47.875,47.875C17.857,97.875,2.125,76.441,2.125,50C2.125,23.559,23.559,2.125,50,2.125z'/><g class='icon'><path class='ribbon' d='M39.036,61.003h21.929l2.529,21.928L50,75.341l-13.494,7.59L39.036,61.003z'/><path class='base' d='M74.459,41.529c0,0.771-2.346,1.423-2.42,2.173c-0.074,0.765,2.102,1.855,1.955,2.599c-0.148,0.753-2.576,0.932-2.797,1.659c-0.223,0.734,1.697,2.231,1.406,2.933c-0.293,0.708-2.711,0.405-3.068,1.076c-0.361,0.675,1.227,2.518,0.805,3.15c-0.426,0.636-2.738-0.13-3.221,0.458c-0.484,0.59,0.715,2.708,0.176,3.247c-0.539,0.54-2.656-0.659-3.246-0.177c-0.59,0.484,0.176,2.795-0.457,3.221c-0.633,0.423-2.479-1.167-3.152-0.804c-0.67,0.357-0.369,2.773-1.076,3.066c-0.701,0.292-2.197-1.627-2.932-1.405c-0.727,0.221-0.906,2.649-1.66,2.798c-0.742,0.146-1.833-2.03-2.599-1.956c-0.753,0.074-1.401,2.42-2.173,2.42c-0.771,0-1.421-2.346-2.173-2.42c-0.765-0.074-1.856,2.103-2.599,1.956c-0.754-0.15-0.934-2.578-1.66-2.798c-0.733-0.222-2.23,1.697-2.932,1.405c-0.708-0.293-0.407-2.709-1.077-3.066c-0.675-0.363-2.519,1.227-3.151,0.804c-0.635-0.426,0.131-2.738-0.458-3.221c-0.589-0.482-2.707,0.717-3.247,0.177c-0.54-0.539,0.66-2.657,0.176-3.248c-0.484-0.589-2.795,0.178-3.22-0.457c-0.422-0.633,1.167-2.479,0.805-3.15c-0.359-0.671-2.775-0.369-3.068-1.076c-0.291-0.702,1.628-2.198,1.406-2.933c-0.22-0.725-2.648-0.906-2.797-1.659c-0.147-0.744,2.028-1.834,1.955-2.599c-0.074-0.752-2.42-1.402-2.42-2.173s2.346-1.423,2.42-2.173c0.074-0.765-2.101-1.857-1.955-2.599c0.149-0.754,2.578-0.933,2.797-1.659c0.223-0.734-1.697-2.231-1.406-2.933c0.293-0.708,2.709-0.406,3.069-1.076c0.361-0.675-1.228-2.519-0.805-3.151c0.425-0.634,2.736,0.132,3.219-0.457c0.485-0.587-0.715-2.709-0.175-3.248c0.54-0.54,2.657,0.66,3.247,0.176c0.589-0.483-0.177-2.795,0.457-3.22c0.633-0.423,2.478,1.167,3.151,0.805c0.67-0.358,0.369-2.775,1.077-3.069c0.701-0.29,2.198,1.63,2.933,1.407c0.724-0.221,0.905-2.649,1.659-2.797c0.743-0.146,1.834,2.028,2.599,1.955c0.752-0.074,1.402-2.42,2.173-2.42c0.771,0,1.422,2.346,2.173,2.42c0.766,0.074,1.856-2.101,2.599-1.954c0.756,0.149,0.934,2.577,1.66,2.794c0.732,0.225,2.23-1.695,2.934-1.404c0.705,0.293,0.404,2.71,1.074,3.068c0.676,0.363,2.52-1.227,3.152-0.804c0.635,0.425-0.133,2.736,0.457,3.219c0.588,0.483,2.709-0.716,3.246-0.175c0.539,0.54-0.66,2.657-0.176,3.247c0.484,0.589,2.795-0.177,3.221,0.457c0.422,0.633-1.166,2.478-0.805,3.151c0.357,0.67,2.775,0.369,3.068,1.076c0.291,0.702-1.629,2.198-1.406,2.933c0.221,0.724,2.648,0.905,2.797,1.659c0.146,0.742-2.029,1.834-1.955,2.599C72.113,40.108,74.459,40.758,74.459,41.529z'/><path class='text' d='M50.183,32.507h-2.711l-0.806,4.888h-2.357l0.806-4.888h-2.71l-0.806,4.888h-2.701l-0.417,2.731h2.668l-0.565,3.421h-2.706l-0.417,2.732h2.674L39.43,50.55h2.71l0.704-4.271h2.357l-0.704,4.271h2.71l0.704-4.271h2.831l0.418-2.732h-2.798l0.564-3.421h2.837l0.418-2.731h-2.805L50.183,32.507z M45.652,43.547H43.31l0.549-3.421h2.343L45.652,43.547z M57.184,32.521c-0.258,0.595-0.684,1.101-1.273,1.518c-0.588,0.417-1.209,0.664-1.859,0.74v1.898h2.313v13.873h2.719V32.521H57.184z'/></g></svg>";
$(winnerFilled).appendTo("#filled-winner"),
!(function (e) {
"use strict";
function t(t) {
return (
(r.formatter = n),
e(this)
.not(".tipper-attached")
.addClass("tipper-attached")
.on("mouseenter.tipper", e.extend({}, r, t || {}), i)
);
}
function i(t) {
a = e("body");
var i = e(this),
n = e.extend(!0, {}, t.data, i.data("tipper-options")),
r = "";
(r += '<div class="tipper ' + n.direction + '">'),
(r += '<div class="tipper-content">'),
(r += n.formatter.apply(a, [i])),
(r += '<span class="tipper-caret"</span>'),
(r += "</div>"),
(r += "</div>"),
(n.$target = i),
(n.$tipper = e(r)),
a.append(n.$tipper),
(n.$content = n.$tipper.find(".tipper-content")),
(n.$caret = n.$tipper.find(".tipper-caret")),
(n.offset = i.offset()),
(n.height = i.outerHeight()),
(n.width = i.outerWidth()),
(n.tipperPos = {}),
(n.caretPos = {}),
(n.contentPos = {});
var l = n.$caret.outerHeight(!0),
c = n.$caret.outerWidth(!0),
d = n.$content.outerHeight(!0),
h = n.$content.outerWidth(!0) + c;
"right" === n.direction || "left" === n.direction
? ((n.caretPos.top = (d - l) / 2), (n.contentPos.top = -d / 2), "right" === n.direction ? (n.contentPos.left = c + n.margin) : "left" === n.direction && (n.contentPos.left = -(h + n.margin)))
: ((n.caretPos.left = (h - c) / 2), (n.contentPos.left = -h / 2), "bottom" === n.direction ? (n.contentPos.top = n.margin) : "top" === n.direction && (n.contentPos.top = -(d + n.margin))),
n.$content.css(n.contentPos),
n.$caret.css(n.caretPos),
n.follow
? n.$target.on("mousemove.tipper", n, o).trigger("mousemove")
: ("right" === n.direction || "left" === n.direction
? ((n.tipperPos.top = n.offset.top + n.height / 2), "right" === n.direction ? (n.tipperPos.left = n.offset.left + n.width) : "left" === n.direction && (n.tipperPos.left = n.offset.left))
: ((n.tipperPos.left = n.offset.left + n.width / 2), "bottom" === n.direction ? (n.tipperPos.top = n.offset.top + n.height) : "top" === n.direction && (n.tipperPos.top = n.offset.top)),
n.$tipper.css(n.tipperPos)),
n.$target.one("mouseleave.tipper", n, s);
}
function n(e) {
return e.data("title");
}
function o(e) {
var t = e.data;
t.$tipper.css({ left: e.pageX, top: e.pageY });
}
function s(e) {
var t = e.data;
t.$tipper.remove(), t.$target.off("mousemove.tipper mouseleave.tipper");
}
var a,
r = { direction: "top", follow: !1, formatter: e.noop, margin: 15 },
l = {
defaults: function (t) {
return (r = e.extend(r, t || {})), e(this);
},
destroy: function () {
return e(this).trigger("mouseleave.tipper").off(".tipper").removeClass("tipper-attached");
},
};
(e.fn.tipper = function (e) {
return l[e] ? l[e].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof e && e ? this : t.apply(this, arguments);
}),
(e.tipper = function (e) {
"defaults" === e && l.defaults.apply(this, Array.prototype.slice.call(arguments, 1));
});
})(jQuery),
(function (e) {
var t = !1,
i = !1,
n = 5e3,
o = 2e3,
s = (function () {
var e = document.getElementsByTagName("script"),
e = e[e.length - 1].src.split("?")[0];
return e.split("/").length > 0 ? e.split("/").slice(0, -1).join("/") + "/" : "";
})(),
r = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || !1,
l = window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || !1,
c = !1,
d = function () {
if (c) return c;
var e = document.createElement("DIV"),
t = { haspointerlock: "pointerLockElement" in document || "mozPointerLockElement" in document || "webkitPointerLockElement" in document };
(t.isopera = "opera" in window),
(t.isopera12 = t.isopera && "getUserMedia" in navigator),
(t.isie = "all" in document && "attachEvent" in e && !t.isopera),
(t.isieold = t.isie && !("msInterpolationMode" in e.style)),
(t.isie7 = t.isie && !t.isieold && (!("documentMode" in document) || 7 == document.documentMode)),
(t.isie8 = t.isie && "documentMode" in document && 8 == document.documentMode),
(t.isie9 = t.isie && "performance" in window && document.documentMode >= 9),
(t.isie10 = t.isie && "performance" in window && document.documentMode >= 10),
(t.isie9mobile = /iemobile.9/i.test(navigator.userAgent)),
t.isie9mobile && (t.isie9 = !1),
(t.isie7mobile = !t.isie9mobile && t.isie7 && /iemobile/i.test(navigator.userAgent)),
(t.ismozilla = "MozAppearance" in e.style),
(t.iswebkit = "WebkitAppearance" in e.style),
(t.ischrome = "chrome" in window),
(t.ischrome22 = t.ischrome && t.haspointerlock),
(t.cantouch = "ontouchstart" in document.documentElement || "ontouchstart" in window),
(t.hasmstouch = window.navigator.msPointerEnabled || !1),
(t.ismac = /^mac$/i.test(navigator.platform)),
(t.isios = t.cantouch && /iphone|ipad|ipod/i.test(navigator.platform)),
(t.isios4 = t.isios && !("seal" in Object)),
(t.isandroid = /android/i.test(navigator.userAgent)),
(t.trstyle = !1),
(t.hastransform = !1),
(t.hastranslate3d = !1),
(t.transitionstyle = !1),
(t.hastransition = !1),
(t.transitionend = !1);
for (var i = ["transform", "msTransform", "webkitTransform", "MozTransform", "OTransform"], n = 0; n < i.length; n++)
if ("undefined" != typeof e.style[i[n]]) {
t.trstyle = i[n];
break;
}
(t.hastransform = 0 != t.trstyle),
t.hastransform && ((e.style[t.trstyle] = "translate3d(1px,2px,3px)"), (t.hastranslate3d = /translate3d/.test(e.style[t.trstyle]))),
(t.transitionstyle = !1),
(t.prefixstyle = ""),
(t.transitionend = !1);
for (
var i = "transition,webkitTransition,MozTransition,OTransition,OTransition,msTransition,KhtmlTransition".split(","),
o = ",-webkit-,-moz-,-o-,-o,-ms-,-khtml-".split(","),
s = "transitionend,webkitTransitionEnd,transitionend,otransitionend,oTransitionEnd,msTransitionEnd,KhtmlTransitionEnd".split(","),
n = 0;
n < i.length;
n++
)
if (i[n] in e.style) {
(t.transitionstyle = i[n]), (t.prefixstyle = o[n]), (t.transitionend = s[n]);
break;
}
t.hastransition = t.transitionstyle;
e: {
for (i = ["-moz-grab", "-webkit-grab", "grab"], ((t.ischrome && !t.ischrome22) || t.isie) && (i = []), n = 0; n < i.length; n++)
if (((o = i[n]), (e.style.cursor = o), e.style.cursor == o)) {
i = o;
break e;
}
i = "url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize";
}
return (t.cursorgrabvalue = i), (t.hasmousecapture = "setCapture" in e), (c = t);
},
h = function (a, c) {
function h(e, t, i) {
return (
(t = e.css(t)), (e = parseFloat(t)), isNaN(e) ? ((e = w[t] || 0), (i = 3 == e ? (i ? f.win.outerHeight() - f.win.innerHeight() : f.win.outerWidth() - f.win.innerWidth()) : 1), f.isie8 && e && (e += 1), i ? e : 0) : e
);
}
function p(e, t) {
var i = 0,
n = 0,
o = 1;
"wheelDeltaY" in e
? ((o = f.opt.mousescrollstep / 48), (i = Math.floor(e.wheelDeltaX * o)), (n = Math.floor(e.wheelDeltaY * o)), t && 0 == i && n && ((i = n), (n = 0)))
: (o = e.detail ? -1 * e.detail : e.wheelDelta / 40) && (t ? (i = Math.floor(o * f.opt.mousescrollstep)) : (n = Math.floor(o * f.opt.mousescrollstep))),
i &&
(f.scrollmom && f.scrollmom.stop(),
(f.lastdeltax += i),
f.synched("mousewheelx", function () {
var e = f.lastdeltax;
(f.lastdeltax = 0), f.rail.drag || f.doScrollLeftBy(e);
})),
n &&
(f.scrollmom && f.scrollmom.stop(),
(f.lastdeltay += n),
f.synched("mousewheely", function () {
var e = f.lastdeltay;
(f.lastdeltay = 0), f.rail.drag || f.doScrollBy(e);
}));
}
var f = this;
if (
((this.version = "3.1.4"),
(this.name = "nicescroll"),
(this.me = c),
(this.opt = {
doc: e("body"),
win: !1,
zindex: 1e5,
cursoropacitymin: 0.2,
cursoropacitymax: 1,
cursorcolor: "#bdbdbd",
cursorwidth: "7px",
cursorborder: "",
cursorborderradius: "1px",
scrollspeed: 60,
mousescrollstep: 40,
touchbehavior: !1,
hwacceleration: !0,
usetransition: !0,
boxzoom: !1,
dblclickzoom: !0,
gesturezoom: !0,
grabcursorenabled: !0,
autohidemode: !1,
background: "#827b7d",
iframeautoresize: !0,
cursorminheight: 32,
preservenativescrolling: !0,
railoffset: !1,
bouncescroll: !0,
spacebarenabled: !0,
railpadding: { top: 0, right: 0, left: 0, bottom: 0 },
disableoutline: !0,
horizrailenabled: !0,
railalign: "right",
railvalign: "bottom",
enabletranslate3d: !0,
enablemousewheel: !0,
enablekeyboard: !0,
smoothscroll: !0,
sensitiverail: !0,
enablemouselockapi: !0,
cursorfixedheight: !1,
}),
(this.opt.snapbackspeed = 80),
a)
)
for (var m in f.opt) "undefined" != typeof a[m] && (f.opt[m] = a[m]);
(this.iddoc = (this.doc = f.opt.doc) && this.doc[0] ? this.doc[0].id || "" : ""),
(this.ispage = /BODY|HTML/.test(f.opt.win ? f.opt.win[0].nodeName : this.doc[0].nodeName)),
(this.haswrapper = f.opt.win !== !1),
(this.win = f.opt.win || (this.ispage ? e(window) : this.doc)),
(this.docscroll = this.ispage && !this.haswrapper ? e(window) : this.win),
(this.body = e("body")),
(this.iframe = this.isfixed = this.viewport = !1),
(this.isiframe = "IFRAME" == this.doc[0].nodeName && "IFRAME" == this.win[0].nodeName),
(this.istextarea = "TEXTAREA" == this.win[0].nodeName),
(this.forcescreen = !1),
(this.canshowonmouseevent = "scroll" != f.opt.autohidemode),
(this.page = this.view = this.onzoomout = this.onzoomin = this.onscrollcancel = this.onscrollend = this.onscrollstart = this.onclick = this.ongesturezoom = this.onkeypress = this.onmousewheel = this.onmousemove = this.onmouseup = this.onmousedown = !1),
(this.scroll = { x: 0, y: 0 }),
(this.scrollratio = { x: 0, y: 0 }),
(this.cursorheight = 20),
(this.scrollvaluemax = 0),
(this.observer = this.scrollmom = this.scrollrunning = !1);
do this.id = "ascrail" + o++;
while (document.getElementById(this.id));
(this.hasmousefocus = this.hasfocus = this.zoomactive = this.zoom = this.cursorfreezed = this.cursor = this.rail = !1),
(this.visibility = !0),
(this.hidden = this.locked = !1),
(this.cursoractive = !0),
(this.nativescrollingarea = !1),
(this.events = []),
(this.saved = {}),
(this.delaylist = {}),
(this.synclist = {}),
(this.lastdeltay = this.lastdeltax = 0),
(this.detected = d());
var g = e.extend({}, this.detected);
if (
((this.ishwscroll = (this.canhwscroll = g.hastransform && f.opt.hwacceleration) && f.haswrapper),
(this.istouchcapable = !1),
g.cantouch && g.ischrome && !g.isios && !g.isandroid && ((this.istouchcapable = !0), (g.cantouch = !1)),
g.cantouch && g.ismozilla && !g.isios && ((this.istouchcapable = !0), (g.cantouch = !1)),
f.opt.enablemouselockapi || ((g.hasmousecapture = !1), (g.haspointerlock = !1)),
(this.delayed = function (e, t, i, n) {
var o = f.delaylist[e],
s = new Date().getTime();
return !n && o && o.tt
? !1
: (o && o.tt && clearTimeout(o.tt),
void (o && o.last + i > s && !o.tt
? (f.delaylist[e] = {
last: s + i,
tt: setTimeout(function () {
(f.delaylist[e].tt = 0), t.call();
}, i),
})
: (o && o.tt) ||
((f.delaylist[e] = { last: s, tt: 0 }),
setTimeout(function () {
t.call();
}, 0))));
}),
(this.synched = function (e, t) {
return (
(f.synclist[e] = t),
(function () {
f.onsync ||
(r(function () {
f.onsync = !1;
for (e in f.synclist) {
var t = f.synclist[e];
t && t.call(f), (f.synclist[e] = !1);
}
}),
(f.onsync = !0));
})(),
e
);
}),
(this.unsynched = function (e) {
f.synclist[e] && (f.synclist[e] = !1);
}),
(this.css = function (e, t) {
for (var i in t) f.saved.css.push([e, i, e.css(i)]), e.css(i, t[i]);
}),
(this.scrollTop = function (e) {
return "undefined" == typeof e ? f.getScrollTop() : f.setScrollTop(e);
}),
(this.scrollLeft = function (e) {
return "undefined" == typeof e ? f.getScrollLeft() : f.setScrollLeft(e);
}),
(BezierClass = function (e, t, i, n, o, s, a) {
(this.st = e), (this.ed = t), (this.spd = i), (this.p1 = n || 0), (this.p2 = o || 1), (this.p3 = s || 0), (this.p4 = a || 1), (this.ts = new Date().getTime()), (this.df = this.ed - this.st);
}),
(BezierClass.prototype = {
B2: function (e) {
return 3 * e * e * (1 - e);
},
B3: function (e) {
return 3 * e * (1 - e) * (1 - e);
},
B4: function (e) {
return (1 - e) * (1 - e) * (1 - e);
},
getNow: function () {
var e = 1 - (new Date().getTime() - this.ts) / this.spd,
t = this.B2(e) + this.B3(e) + this.B4(e);
return 0 > e ? this.ed : this.st + Math.round(this.df * t);
},
update: function (e, t) {
return (this.st = this.getNow()), (this.ed = e), (this.spd = t), (this.ts = new Date().getTime()), (this.df = this.ed - this.st), this;
},
}),
this.ishwscroll)
) {
(this.doc.translate = { x: 0, y: 0, tx: "0px", ty: "0px" }), g.hastranslate3d && g.isios && this.doc.css("-webkit-backface-visibility", "hidden");
var v = function () {
var e = f.doc.css(g.trstyle);
return e && "matrix" == e.substr(0, 6)
? e
.replace(/^.*\((.*)\)$/g, "$1")
.replace(/px/g, "")
.split(/, +/)
: !1;
};
(this.getScrollTop = function (e) {
if (!e) {
if ((e = v())) return 16 == e.length ? -e[13] : -e[5];
if (f.timerscroll && f.timerscroll.bz) return f.timerscroll.bz.getNow();
}
return f.doc.translate.y;
}),
(this.getScrollLeft = function (e) {
if (!e) {
if ((e = v())) return 16 == e.length ? -e[12] : -e[4];
if (f.timerscroll && f.timerscroll.bh) return f.timerscroll.bh.getNow();
}
return f.doc.translate.x;
}),
(this.notifyScrollEvent = document.createEvent
? function (e) {
var t = document.createEvent("UIEvents");
t.initUIEvent("scroll", !1, !0, window, 1), e.dispatchEvent(t);
}
: document.fireEvent
? function (e) {
var t = document.createEventObject();
e.fireEvent("onscroll"), (t.cancelBubble = !0);
}
: function () {}),
g.hastranslate3d && f.opt.enabletranslate3d
? ((this.setScrollTop = function (e, t) {
(f.doc.translate.y = e), (f.doc.translate.ty = -1 * e + "px"), f.doc.css(g.trstyle, "translate3d(" + f.doc.translate.tx + "," + f.doc.translate.ty + ",0px)"), t || f.notifyScrollEvent(f.win[0]);
}),
(this.setScrollLeft = function (e, t) {
(f.doc.translate.x = e), (f.doc.translate.tx = -1 * e + "px"), f.doc.css(g.trstyle, "translate3d(" + f.doc.translate.tx + "," + f.doc.translate.ty + ",0px)"), t || f.notifyScrollEvent(f.win[0]);
}))
: ((this.setScrollTop = function (e, t) {
(f.doc.translate.y = e), (f.doc.translate.ty = -1 * e + "px"), f.doc.css(g.trstyle, "translate(" + f.doc.translate.tx + "," + f.doc.translate.ty + ")"), t || f.notifyScrollEvent(f.win[0]);
}),
(this.setScrollLeft = function (e, t) {
(f.doc.translate.x = e), (f.doc.translate.tx = -1 * e + "px"), f.doc.css(g.trstyle, "translate(" + f.doc.translate.tx + "," + f.doc.translate.ty + ")"), t || f.notifyScrollEvent(f.win[0]);
}));
} else
(this.getScrollTop = function () {
return f.docscroll.scrollTop();
}),
(this.setScrollTop = function (e) {
return f.docscroll.scrollTop(e);
}),
(this.getScrollLeft = function () {
return f.docscroll.scrollLeft();
}),
(this.setScrollLeft = function (e) {
return f.docscroll.scrollLeft(e);
});
(this.getTarget = function (e) {
return e ? (e.target ? e.target : e.srcElement ? e.srcElement : !1) : !1;
}),
(this.hasParent = function (e, t) {
if (!e) return !1;
for (var i = e.target || e.srcElement || e || !1; i && i.id != t; ) i = i.parentNode || !1;
return i !== !1;
});
var w = { thin: 1, medium: 3, thick: 5 };
(this.getOffset = function () {
if (f.isfixed) return { top: parseFloat(f.win.css("top")), left: parseFloat(f.win.css("left")) };
if (!f.viewport) return f.win.offset();
var e = f.win.offset(),
t = f.viewport.offset();
return { top: e.top - t.top + f.viewport.scrollTop(), left: e.left - t.left + f.viewport.scrollLeft() };
}),
(this.updateScrollBar = function (e) {
if (f.ishwscroll) f.rail.css({ height: f.win.innerHeight() }), f.railh && f.railh.css({ width: f.win.innerWidth() });
else {
var t = f.getOffset(),
i = t.top,
n = t.left;
(i += h(f.win, "border-top-width", !0)), f.win.outerWidth(), f.win.innerWidth(), (n += f.rail.align ? f.win.outerWidth() - h(f.win, "border-right-width") - f.rail.width : h(f.win, "border-left-width"));
var o = f.opt.railoffset;
o && (o.top && (i += o.top), f.rail.align && o.left && (n += o.left)),
f.locked || f.rail.css({ top: i, left: n, height: e ? e.h : f.win.innerHeight() }),
f.zoom && f.zoom.css({ top: i + 1, left: 1 == f.rail.align ? n - 20 : n + f.rail.width + 4 }),
f.railh &&
!f.locked &&
((i = t.top),
(n = t.left),
(e = f.railh.align ? i + h(f.win, "border-top-width", !0) + f.win.innerHeight() - f.railh.height : i + h(f.win, "border-top-width", !0)),
(n += h(f.win, "border-left-width")),
f.railh.css({ top: e, left: n, width: f.railh.width }));
}
}),
(this.doRailClick = function (e, t, i) {
var n;
!(f.rail.drag && 1 != f.rail.drag.pt) &&
!f.locked &&
!f.rail.drag &&
(f.cancelScroll(),
f.cancelEvent(e),
t
? ((t = i ? f.doScrollLeft : f.doScrollTop), (n = i ? (e.pageX - f.railh.offset().left - f.cursorwidth / 2) * f.scrollratio.x : (e.pageY - f.rail.offset().top - f.cursorheight / 2) * f.scrollratio.y), t(n))
: ((t = i ? f.doScrollLeftBy : f.doScrollBy), (n = i ? f.scroll.x : f.scroll.y), (e = i ? e.pageX - f.railh.offset().left : e.pageY - f.rail.offset().top), (i = i ? f.view.w : f.view.h), t(n >= e ? i : -i)));
}),
(f.hasanimationframe = r),
(f.hascancelanimationframe = l),
f.hasanimationframe
? f.hascancelanimationframe ||
(l = function () {
f.cancelAnimationFrame = !0;
})
: ((r = function (e) {
return setTimeout(e, 16);
}),
(l = clearInterval)),
(this.init = function () {
if (((f.saved.css = []), g.isie7mobile)) return !0;
if ((g.hasmstouch && f.css(f.ispage ? e("html") : f.win, { "-ms-touch-action": "none" }), !f.ispage || (!g.cantouch && !g.isieold && !g.isie9mobile))) {
var o = f.docscroll;
f.ispage && (o = f.haswrapper ? f.win : f.doc),
g.isie9mobile || f.css(o, { "overflow-y": "hidden" }),
f.ispage && g.isie7 && ("BODY" == f.doc[0].nodeName ? f.css(e("html"), { "overflow-y": "hidden" }) : "HTML" == f.doc[0].nodeName && f.css(e("body"), { "overflow-y": "hidden" })),
g.isios && !f.ispage && !f.haswrapper && f.css(e("body"), { "-webkit-overflow-scrolling": "touch" });
var a = e(document.createElement("div"));
a.css({
position: "relative",
top: 0,
float: "right",
width: f.opt.cursorwidth,
height: "0px",
"background-color": f.opt.cursorcolor,
border: f.opt.cursorborder,
"background-clip": "padding-box",
"-webkit-border-radius": f.opt.cursorborderradius,
"-moz-border-radius": f.opt.cursorborderradius,
"border-radius": f.opt.cursorborderradius,
}),
(a.hborder = parseFloat(a.outerHeight() - a.innerHeight())),
(f.cursor = a);
var r = e(document.createElement("div"));
r.attr("id", f.id);
var l,
c,
d,
h = ["left", "right"];
for (d in h) (c = h[d]), (l = f.opt.railpadding[c]) ? r.css("padding-" + c, l + "px") : (f.opt.railpadding[c] = 0);
if (
(r.append(a),
(r.width = Math.max(parseFloat(f.opt.cursorwidth), a.outerWidth()) + f.opt.railpadding.left + f.opt.railpadding.right),
r.css({ width: r.width + "px", zIndex: f.ispage ? f.opt.zindex : f.opt.zindex + 2, background: f.opt.background }),
(r.visibility = !0),
(r.scrollable = !0),
(r.align = "left" == f.opt.railalign ? 0 : 1),
(f.rail = r),
(a = f.rail.drag = !1),
f.opt.boxzoom &&
!f.ispage &&
!g.isieold &&
((a = document.createElement("div")),
f.bind(a, "click", f.doZoom),
(f.zoom = e(a)),
f.zoom.css({ cursor: "pointer", "z-index": f.opt.zindex, backgroundImage: "url(" + s + "zoomico.png)", height: 18, width: 18, backgroundPosition: "0px 0px" }),
f.opt.dblclickzoom && f.bind(f.win, "dblclick", f.doZoom),
g.cantouch && f.opt.gesturezoom) &&
((f.ongesturezoom = function (e) {
return e.scale > 1.5 && f.doZoomIn(e), e.scale < 0.8 && f.doZoomOut(e), f.cancelEvent(e);
}),
f.bind(f.win, "gestureend", f.ongesturezoom)),
(f.railh = !1),
f.opt.horizrailenabled)
) {
f.css(o, { "overflow-x": "hidden" }),
(a = e(document.createElement("div"))),
a.css({
position: "relative",
top: 0,
height: f.opt.cursorwidth,
width: "0px",
"background-color": f.opt.cursorcolor,
border: f.opt.cursorborder,
"background-clip": "padding-box",
"-webkit-border-radius": f.opt.cursorborderradius,
"-moz-border-radius": f.opt.cursorborderradius,
"border-radius": f.opt.cursorborderradius,
}),
(a.wborder = parseFloat(a.outerWidth() - a.innerWidth())),
(f.cursorh = a);
var p = e(document.createElement("div"));
p.attr("id", f.id + "-hr"),
(p.height = 1 + Math.max(parseFloat(f.opt.cursorwidth), a.outerHeight())),
p.css({ height: p.height + "px", zIndex: f.ispage ? f.opt.zindex : f.opt.zindex + 2, background: f.opt.background }),
p.append(a),
(p.visibility = !0),
(p.scrollable = !0),
(p.align = "top" == f.opt.railvalign ? 0 : 1),
(f.railh = p),
(f.railh.drag = !1);
}
if (
(f.ispage
? (r.css({ position: "fixed", top: "0px", height: "100%" }),
r.align ? r.css({ right: "0px" }) : r.css({ left: "0px" }),
f.body.append(r),
f.railh && (p.css({ position: "fixed", left: "0px", width: "100%" }), p.align ? p.css({ bottom: "0px" }) : p.css({ top: "0px" }), f.body.append(p)))
: (f.ishwscroll
? ("static" == f.win.css("position") && f.css(f.win, { position: "relative" }),
(o = "HTML" == f.win[0].nodeName ? f.body : f.win),
f.zoom && (f.zoom.css({ position: "absolute", top: 1, right: 0, "margin-right": r.width + 4 }), o.append(f.zoom)),
r.css({ position: "absolute", top: 0 }),
r.align ? r.css({ right: 0 }) : r.css({ left: 0 }),
o.append(r),
p && (p.css({ position: "absolute", left: 0, bottom: 0 }), p.align ? p.css({ bottom: 0 }) : p.css({ top: 0 }), o.append(p)))
: ((f.isfixed = "fixed" == f.win.css("position")),
(o = f.isfixed ? "fixed" : "absolute"),
f.isfixed || (f.viewport = f.getViewport(f.win[0])),
f.viewport && (f.body = f.viewport),
r.css({ position: o }),
f.zoom && f.zoom.css({ position: o }),
f.updateScrollBar(),
f.body.append(r),
f.zoom && f.body.append(f.zoom),
f.railh && (p.css({ position: o }), f.body.append(p))),
g.isios && f.css(f.win, { "-webkit-tap-highlight-color": "rgba(0,0,0,0)", "-webkit-touch-callout": "none" }),
g.isie && f.opt.disableoutline && f.win.attr("hideFocus", "true"),
g.iswebkit && f.opt.disableoutline && f.win.css({ outline: "none" })),
f.opt.autohidemode === !1
? ((f.autohidedom = !1), f.rail.css({ opacity: f.opt.cursoropacitymax }), f.railh && f.railh.css({ opacity: f.opt.cursoropacitymax }))
: f.opt.autohidemode === !0
? ((f.autohidedom = e().add(f.rail)), f.railh && (f.autohidedom = f.autohidedom.add(f.railh)))
: "scroll" == f.opt.autohidemode
? ((f.autohidedom = e().add(f.rail)), f.railh && (f.autohidedom = f.autohidedom.add(f.railh)))
: "cursor" == f.opt.autohidemode
? ((f.autohidedom = e().add(f.cursor)), f.railh && (f.autohidedom = f.autohidedom.add(f.railh.cursor)))
: "hidden" == f.opt.autohidemode && ((f.autohidedom = !1), f.hide(), (f.locked = !1)),
g.isie9mobile)
)
(f.scrollmom = new u(f)),
(f.onmangotouch = function () {
var e = f.getScrollTop(),
t = f.getScrollLeft();
if (e == f.scrollmom.lastscrolly && t == f.scrollmom.lastscrollx) return !0;
var i = e - f.mangotouch.sy,
n = t - f.mangotouch.sx;
if (0 != Math.round(Math.sqrt(Math.pow(n, 2) + Math.pow(i, 2)))) {
var o = 0 > i ? -1 : 1,
s = 0 > n ? -1 : 1,
a = +new Date();
f.mangotouch.lazy && clearTimeout(f.mangotouch.lazy),
a - f.mangotouch.tm > 80 || f.mangotouch.dry != o || f.mangotouch.drx != s
? (f.scrollmom.stop(),
f.scrollmom.reset(t, e),
(f.mangotouch.sy = e),
(f.mangotouch.ly = e),
(f.mangotouch.sx = t),
(f.mangotouch.lx = t),
(f.mangotouch.dry = o),
(f.mangotouch.drx = s),
(f.mangotouch.tm = a))
: (f.scrollmom.stop(),
f.scrollmom.update(f.mangotouch.sx - n, f.mangotouch.sy - i),
(f.mangotouch.tm = a),
(i = Math.max(Math.abs(f.mangotouch.ly - e), Math.abs(f.mangotouch.lx - t))),
(f.mangotouch.ly = e),
(f.mangotouch.lx = t),
i > 2 &&
(f.mangotouch.lazy = setTimeout(function () {
(f.mangotouch.lazy = !1), (f.mangotouch.dry = 0), (f.mangotouch.drx = 0), (f.mangotouch.tm = 0), f.scrollmom.doMomentum(30);
}, 100)));
}
}),
(r = f.getScrollTop()),
(p = f.getScrollLeft()),
(f.mangotouch = { sy: r, ly: r, dry: 0, sx: p, lx: p, drx: 0, lazy: !1, tm: 0 }),
f.bind(f.docscroll, "scroll", f.onmangotouch);
else {
if (g.cantouch || f.istouchcapable || f.opt.touchbehavior || g.hasmstouch) {
(f.scrollmom = new u(f)),
(f.ontouchstart = function (t) {
if (t.pointerType && 2 != t.pointerType) return !1;
if (!f.locked) {
if (g.hasmstouch)
for (var i = t.target ? t.target : !1; i; ) {
var n = e(i).getNiceScroll();
if (n.length > 0 && n[0].me == f.me) break;
if (n.length > 0) return !1;
if ("DIV" == i.nodeName && i.id == f.id) break;
i = i.parentNode ? i.parentNode : !1;
}
if ((f.cancelScroll(), (i = f.getTarget(t)) && /INPUT/i.test(i.nodeName) && /range/i.test(i.type))) return f.stopPropagation(t);
if (
(!("clientX" in t) && "changedTouches" in t && ((t.clientX = t.changedTouches[0].clientX), (t.clientY = t.changedTouches[0].clientY)),
f.forcescreen && ((n = t), (t = { original: t.original ? t.original : t }), (t.clientX = n.screenX), (t.clientY = n.screenY)),
(f.rail.drag = { x: t.clientX, y: t.clientY, sx: f.scroll.x, sy: f.scroll.y, st: f.getScrollTop(), sl: f.getScrollLeft(), pt: 2 }),
f.opt.touchbehavior && f.isiframe && g.isie && ((n = f.win.position()), (f.rail.drag.x += n.left), (f.rail.drag.y += n.top)),
(f.hasmoving = !1),
(f.lastmouseup = !1),
f.scrollmom.reset(t.clientX, t.clientY),
!g.cantouch && !this.istouchcapable && !g.hasmstouch)
) {
if (!i || !/INPUT|SELECT|TEXTAREA/i.test(i.nodeName)) return !f.ispage && g.hasmousecapture && i.setCapture(), f.cancelEvent(t);
/SUBMIT|CANCEL|BUTTON/i.test(e(i).attr("type")) && ((pc = { tg: i, click: !1 }), (f.preventclick = pc));
}
}
}),
(f.ontouchend = function (e) {
return e.pointerType && 2 != e.pointerType
? !1
: f.rail.drag &&
2 == f.rail.drag.pt &&
(f.scrollmom.doMomentum(), (f.rail.drag = !1), f.hasmoving && ((f.hasmoving = !1), (f.lastmouseup = !0), f.hideCursor(), g.hasmousecapture && document.releaseCapture(), !g.cantouch))
? f.cancelEvent(e)
: void 0;
});
var m = f.opt.touchbehavior && f.isiframe && !g.hasmousecapture;
f.ontouchmove = function (t, i) {
if (t.pointerType && 2 != t.pointerType) return !1;
if (f.rail.drag && 2 == f.rail.drag.pt) {
if (g.cantouch && "undefined" == typeof t.original) return !0;
if (
((f.hasmoving = !0),
f.preventclick && !f.preventclick.click && ((f.preventclick.click = f.preventclick.tg.onclick || !1), (f.preventclick.tg.onclick = f.onpreventclick)),
(t = e.extend({ original: t }, t)),
"changedTouches" in t && ((t.clientX = t.changedTouches[0].clientX), (t.clientY = t.changedTouches[0].clientY)),
f.forcescreen)
) {
var n = t,
t = { original: t.original ? t.original : t };
(t.clientX = n.screenX), (t.clientY = n.screenY);
}
if (((n = ofy = 0), m && !i)) {
var o = f.win.position(),
n = -o.left;
ofy = -o.top;
}
var s = t.clientY + ofy,
a = f.rail.drag.st - (s - f.rail.drag.y);
f.ishwscroll && f.opt.bouncescroll
? 0 > a
? (a = Math.round(a / 2))
: a > f.page.maxh && (a = f.page.maxh + Math.round((a - f.page.maxh) / 2))
: (0 > a && (s = a = 0), a > f.page.maxh && ((a = f.page.maxh), (s = 0)));
var r = t.clientX + n;
if (f.railh && f.railh.scrollable) {
var l = f.rail.drag.sl - (r - f.rail.drag.x);
f.ishwscroll && f.opt.bouncescroll
? 0 > l
? (l = Math.round(l / 2))
: l > f.page.maxw && (l = f.page.maxw + Math.round((l - f.page.maxw) / 2))
: (0 > l && (r = l = 0), l > f.page.maxw && ((l = f.page.maxw), (r = 0)));
}
if (
(f.synched("touchmove", function () {
f.rail.drag &&
2 == f.rail.drag.pt &&
(f.prepareTransition && f.prepareTransition(0),
f.rail.scrollable && f.setScrollTop(a),
f.scrollmom.update(r, s),
f.railh && f.railh.scrollable ? (f.setScrollLeft(l), f.showCursor(a, l)) : f.showCursor(a),
g.isie10 && document.selection.clear());
}),
!g.ischrome && !f.istouchcapable)
)
return f.cancelEvent(t);
}
};
}
g.cantouch || f.opt.touchbehavior
? ((f.onpreventclick = function (e) {
return f.preventclick ? ((f.preventclick.tg.onclick = f.preventclick.click), (f.preventclick = !1), f.cancelEvent(e)) : void 0;
}),
(f.onmousedown = f.ontouchstart),
(f.onmouseup = f.ontouchend),
(f.onclick = g.isios
? !1
: function (e) {
return f.lastmouseup ? ((f.lastmouseup = !1), f.cancelEvent(e)) : !0;
}),
(f.onmousemove = f.ontouchmove),
g.cursorgrabvalue && (f.css(f.ispage ? f.doc : f.win, { cursor: g.cursorgrabvalue }), f.css(f.rail, { cursor: g.cursorgrabvalue })))
: ((f.onmousedown = function (e, t) {
if (!f.rail.drag || 1 == f.rail.drag.pt) {
if (f.locked) return f.cancelEvent(e);
f.cancelScroll(), (f.rail.drag = { x: e.clientX, y: e.clientY, sx: f.scroll.x, sy: f.scroll.y, pt: 1, hr: !!t });
var i = f.getTarget(e);
return (
!f.ispage && g.hasmousecapture && i.setCapture(),
f.isiframe && !g.hasmousecapture && ((f.saved.csspointerevents = f.doc.css("pointer-events")), f.css(f.doc, { "pointer-events": "none" })),
f.cancelEvent(e)
);
}
}),
(f.onmouseup = function (e) {
return f.rail.drag && (g.hasmousecapture && document.releaseCapture(), f.isiframe && !g.hasmousecapture && f.doc.css("pointer-events", f.saved.csspointerevents), 1 == f.rail.drag.pt)
? ((f.rail.drag = !1), f.cancelEvent(e))
: void 0;
}),
(f.onmousemove = function (e) {
if (f.rail.drag) {
if (1 == f.rail.drag.pt) {
if (g.ischrome && 0 == e.which) return f.onmouseup(e);
if (((f.cursorfreezed = !0), f.rail.drag.hr)) {
(f.scroll.x = f.rail.drag.sx + (e.clientX - f.rail.drag.x)), f.scroll.x < 0 && (f.scroll.x = 0);
var t = f.scrollvaluemaxw;
f.scroll.x > t && (f.scroll.x = t);
} else (f.scroll.y = f.rail.drag.sy + (e.clientY - f.rail.drag.y)), f.scroll.y < 0 && (f.scroll.y = 0), (t = f.scrollvaluemax), f.scroll.y > t && (f.scroll.y = t);
return (
f.synched("mousemove", function () {
f.rail.drag &&
1 == f.rail.drag.pt &&
(f.showCursor(), f.rail.drag.hr ? f.doScrollLeft(Math.round(f.scroll.x * f.scrollratio.x)) : f.doScrollTop(Math.round(f.scroll.y * f.scrollratio.y)));
}),
f.cancelEvent(e)
);
}
} else f.checkarea = !0;
})),
(g.cantouch || f.opt.touchbehavior) && f.bind(f.win, "mousedown", f.onmousedown),
g.hasmstouch &&
(f.css(f.rail, { "-ms-touch-action": "none" }),
f.css(f.cursor, { "-ms-touch-action": "none" }),
f.bind(f.win, "MSPointerDown", f.ontouchstart),
f.bind(document, "MSPointerUp", f.ontouchend),
f.bind(document, "MSPointerMove", f.ontouchmove),
f.bind(f.cursor, "MSGestureHold", function (e) {
e.preventDefault();
}),
f.bind(f.cursor, "contextmenu", function (e) {
e.preventDefault();
})),
this.istouchcapable &&
(f.bind(f.win, "touchstart", f.ontouchstart), f.bind(document, "touchend", f.ontouchend), f.bind(document, "touchcancel", f.ontouchend), f.bind(document, "touchmove", f.ontouchmove)),
f.bind(f.cursor, "mousedown", f.onmousedown),
f.bind(f.cursor, "mouseup", f.onmouseup),
f.railh &&
(f.bind(f.cursorh, "mousedown", function (e) {
f.onmousedown(e, !0);
}),
f.bind(f.cursorh, "mouseup", function (e) {
return f.rail.drag && 2 == f.rail.drag.pt ? void 0 : ((f.rail.drag = !1), (f.hasmoving = !1), f.hideCursor(), g.hasmousecapture && document.releaseCapture(), f.cancelEvent(e));
})),
f.bind(document, "mouseup", f.onmouseup),
g.hasmousecapture && f.bind(f.win, "mouseup", f.onmouseup),
f.bind(document, "mousemove", f.onmousemove),
f.onclick && f.bind(document, "click", f.onclick),
!g.cantouch &&
!f.opt.touchbehavior &&
(f.jqbind(f.rail, "mouseenter", function () {
f.canshowonmouseevent && f.showCursor(), (f.rail.active = !0);
}),
f.jqbind(f.rail, "mouseleave", function () {
(f.rail.active = !1), f.rail.drag || f.hideCursor();
}),
f.opt.sensitiverail &&
(f.bind(f.rail, "click", function (e) {
f.doRailClick(e, !1, !1);
}),
f.bind(f.rail, "dblclick", function (e) {
f.doRailClick(e, !0, !1);
}),
f.bind(f.cursor, "click", function (e) {
f.cancelEvent(e);
}),
f.bind(f.cursor, "dblclick", function (e) {
f.cancelEvent(e);
})),
f.railh &&
(f.jqbind(f.railh, "mouseenter", function () {
f.canshowonmouseevent && f.showCursor(), (f.rail.active = !0);
}),
f.jqbind(f.railh, "mouseleave", function () {
(f.rail.active = !1), f.rail.drag || f.hideCursor();
}),
f.opt.sensitiverail &&
(f.bind(f.railh, "click", function (e) {
f.doRailClick(e, !1, !0);
}),
f.bind(f.railh, "dblclick", function (e) {
f.doRailClick(e, !0, !0);
}),
f.bind(f.cursorh, "click", function (e) {
f.cancelEvent(e);
}),
f.bind(f.cursorh, "dblclick", function (e) {
f.cancelEvent(e);
}))),
f.zoom &&
(f.jqbind(f.zoom, "mouseenter", function () {
f.canshowonmouseevent && f.showCursor(), (f.rail.active = !0);
}),
f.jqbind(f.zoom, "mouseleave", function () {
(f.rail.active = !1), f.rail.drag || f.hideCursor();
}))),
f.opt.enablemousewheel &&
(f.isiframe || f.bind(g.isie && f.ispage ? document : f.docscroll, "mousewheel", f.onmousewheel),
f.bind(f.rail, "mousewheel", f.onmousewheel),
f.railh && f.bind(f.railh, "mousewheel", f.onmousewheelhr)),
!f.ispage &&
!g.cantouch &&
!/HTML|BODY/.test(f.win[0].nodeName) &&
(f.win.attr("tabindex") || f.win.attr({ tabindex: n++ }),
f.jqbind(f.win, "focus", function (e) {
(t = f.getTarget(e).id || !0), (f.hasfocus = !0), f.canshowonmouseevent && f.noticeCursor();
}),
f.jqbind(f.win, "blur", function () {
(t = !1), (f.hasfocus = !1);
}),
f.jqbind(f.win, "mouseenter", function (e) {
(i = f.getTarget(e).id || !0), (f.hasmousefocus = !0), f.canshowonmouseevent && f.noticeCursor();
}),
f.jqbind(f.win, "mouseleave", function () {
(i = !1), (f.hasmousefocus = !1);
}));
}
if (
((f.onkeypress = function (e) {
if (f.locked && 0 == f.page.maxh) return !0;
var e = e ? e : window.e,
n = f.getTarget(e);
if (n && /INPUT|TEXTAREA|SELECT|OPTION/.test(n.nodeName) && ((!n.getAttribute("type") && !n.type) || !/submit|button|cancel/i.tp)) return !0;
if (f.hasfocus || (f.hasmousefocus && !t) || (f.ispage && !t && !i)) {
if (((n = e.keyCode), f.locked && 27 != n)) return f.cancelEvent(e);
var o = e.ctrlKey || !1,
s = e.shiftKey || !1,
a = !1;
switch (n) {
case 38:
case 63233:
f.doScrollBy(72), (a = !0);
break;
case 40:
case 63235:
f.doScrollBy(-72), (a = !0);
break;
case 37:
case 63232:
f.railh && (o ? f.doScrollLeft(0) : f.doScrollLeftBy(72), (a = !0));
break;
case 39:
case 63234:
f.railh && (o ? f.doScrollLeft(f.page.maxw) : f.doScrollLeftBy(-72), (a = !0));
break;
case 33:
case 63276:
f.doScrollBy(f.view.h), (a = !0);
break;
case 34:
case 63277:
f.doScrollBy(-f.view.h), (a = !0);
break;
case 36:
case 63273:
f.railh && o ? f.doScrollPos(0, 0) : f.doScrollTo(0), (a = !0);
break;
case 35:
case 63275:
f.railh && o ? f.doScrollPos(f.page.maxw, f.page.maxh) : f.doScrollTo(f.page.maxh), (a = !0);
break;
case 32:
f.opt.spacebarenabled && (s ? f.doScrollBy(f.view.h) : f.doScrollBy(-f.view.h), (a = !0));
break;
case 27:
f.zoomactive && (f.doZoom(), (a = !0));
}
if (a) return f.cancelEvent(e);
}
}),
f.opt.enablekeyboard && f.bind(document, g.isopera && !g.isopera12 ? "keypress" : "keydown", f.onkeypress),
f.bind(window, "resize", f.resize),
f.bind(window, "orientationchange", f.resize),
f.bind(window, "load", f.resize),
g.ischrome && !f.ispage && !f.haswrapper)
) {
var v = f.win.attr("style"),
r = parseFloat(f.win.css("width")) + 1;
f.win.css("width", r),
f.synched("chromefix", function () {
f.win.attr("style", v);
});
}
(f.onAttributeChange = function () {
f.lazyResize();
}),
f.ispage ||
f.haswrapper ||
("WebKitMutationObserver" in window
? ((f.observer = new WebKitMutationObserver(function (e) {
e.forEach(f.onAttributeChange);
})),
f.observer.observe(f.win[0], { attributes: !0, subtree: !1 }))
: (f.bind(f.win, g.isie && !g.isie9 ? "propertychange" : "DOMAttrModified", f.onAttributeChange), g.isie9 && f.win[0].attachEvent("onpropertychange", f.onAttributeChange))),
!f.ispage && f.opt.boxzoom && f.bind(window, "resize", f.resizeZoom),
f.istextarea && f.bind(f.win, "mouseup", f.resize),
f.resize();
}
if ("IFRAME" == this.doc[0].nodeName) {
var w = function () {
f.iframexd = !1;
try {
var t = "contentDocument" in this ? this.contentDocument : this.contentWindow.document;
} catch (i) {
(f.iframexd = !0), (t = !1);
}
if (f.iframexd) return "console" in window && console.log("NiceScroll error: policy restriced iframe"), !0;
if (
((f.forcescreen = !0),
f.isiframe &&
((f.iframe = { doc: e(t), html: f.doc.contents().find("html")[0], body: f.doc.contents().find("body")[0] }),
(f.getContentSize = function () {
return { w: Math.max(f.iframe.html.scrollWidth, f.iframe.body.scrollWidth), h: Math.max(f.iframe.html.scrollHeight, f.iframe.body.scrollHeight) };
}),
(f.docscroll = e(f.iframe.body))),
!g.isios && f.opt.iframeautoresize && !f.isiframe)
) {
f.win.scrollTop(0), f.doc.height("");
var n = Math.max(t.getElementsByTagName("html")[0].scrollHeight, t.body.scrollHeight);
f.doc.height(n);
}
f.resize(),
g.isie7 && f.css(e(f.iframe.html), { "overflow-y": "hidden" }),
f.css(e(f.iframe.body), { "overflow-y": "hidden" }),
"contentWindow" in this ? f.bind(this.contentWindow, "scroll", f.onscroll) : f.bind(t, "scroll", f.onscroll),
f.opt.enablemousewheel && f.bind(t, "mousewheel", f.onmousewheel),
f.opt.enablekeyboard && f.bind(t, g.isopera ? "keypress" : "keydown", f.onkeypress),
(g.cantouch || f.opt.touchbehavior) &&
(f.bind(t, "mousedown", f.onmousedown),
f.bind(t, "mousemove", function (e) {
f.onmousemove(e, !0);
}),
g.cursorgrabvalue && f.css(e(t.body), { cursor: g.cursorgrabvalue })),
f.bind(t, "mouseup", f.onmouseup),
f.zoom && (f.opt.dblclickzoom && f.bind(t, "dblclick", f.doZoom), f.ongesturezoom && f.bind(t, "gestureend", f.ongesturezoom));
};
this.doc[0].readyState &&
"complete" == this.doc[0].readyState &&
setTimeout(function () {
w.call(f.doc[0], !1);
}, 500),
f.bind(this.doc, "load", w);
}
}),
(this.showCursor = function (e, t) {
f.cursortimeout && (clearTimeout(f.cursortimeout), (f.cursortimeout = 0)),
f.rail &&
(f.autohidedom && (f.autohidedom.stop().css({ opacity: f.opt.cursoropacitymax }), (f.cursoractive = !0)),
"undefined" != typeof e && e !== !1 && (f.scroll.y = Math.round((1 * e) / f.scrollratio.y)),
"undefined" != typeof t && (f.scroll.x = Math.round((1 * t) / f.scrollratio.x)),
f.cursor.css({ height: f.cursorheight, top: f.scroll.y }),
f.cursorh && (!f.rail.align && f.rail.visibility ? f.cursorh.css({ width: f.cursorwidth, left: f.scroll.x + f.rail.width }) : f.cursorh.css({ width: f.cursorwidth, left: f.scroll.x }), (f.cursoractive = !0)),
f.zoom && f.zoom.stop().css({ opacity: f.opt.cursoropacitymax }));
}),
(this.hideCursor = function (e) {
!f.cursortimeout &&
f.rail &&
f.autohidedom &&
(f.cursortimeout = setTimeout(function () {
(f.rail.active && f.showonmouseevent) || (f.autohidedom.stop().animate({ opacity: f.opt.cursoropacitymin }), f.zoom && f.zoom.stop().animate({ opacity: f.opt.cursoropacitymin }), (f.cursoractive = !1)),
(f.cursortimeout = 0);
}, e || 400));
}),
(this.noticeCursor = function (e, t, i) {
f.showCursor(t, i), f.rail.active || f.hideCursor(e);
}),
(this.getContentSize = f.ispage
? function () {
return { w: Math.max(document.body.scrollWidth, document.documentElement.scrollWidth), h: Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) };
}
: f.haswrapper
? function () {
return { w: f.doc.outerWidth() + parseInt(f.win.css("paddingLeft")) + parseInt(f.win.css("paddingRight")), h: f.doc.outerHeight() + parseInt(f.win.css("paddingTop")) + parseInt(f.win.css("paddingBottom")) };
}
: function () {
return { w: f.docscroll[0].scrollWidth, h: f.docscroll[0].scrollHeight };
}),
(this.onResize = function (e, t) {
if (!f.win) return !1;
if (!f.haswrapper && !f.ispage) {
if ("none" == f.win.css("display")) return f.visibility && f.hideRail().hideRailHr(), !1;
!f.hidden && !f.visibility && f.showRail().showRailHr();
}
var i = f.page.maxh,
n = f.page.maxw,
o = f.view.w;
if (
((f.view = { w: f.ispage ? f.win.width() : parseInt(f.win[0].clientWidth), h: f.ispage ? f.win.height() : parseInt(f.win[0].clientHeight) }),
(f.page = t ? t : f.getContentSize()),
(f.page.maxh = Math.max(0, f.page.h - f.view.h)),
(f.page.maxw = Math.max(0, f.page.w - f.view.w)),
f.page.maxh == i && f.page.maxw == n && f.view.w == o)
) {
if (f.ispage) return f;
if (((i = f.win.offset()), f.lastposition && ((n = f.lastposition), n.top == i.top && n.left == i.left))) return f;
f.lastposition = i;
}
return (
0 == f.page.maxh ? (f.hideRail(), (f.scrollvaluemax = 0), (f.scroll.y = 0), (f.scrollratio.y = 0), (f.cursorheight = 0), f.setScrollTop(0), (f.rail.scrollable = !1)) : (f.rail.scrollable = !0),
0 == f.page.maxw ? (f.hideRailHr(), (f.scrollvaluemaxw = 0), (f.scroll.x = 0), (f.scrollratio.x = 0), (f.cursorwidth = 0), f.setScrollLeft(0), (f.railh.scrollable = !1)) : (f.railh.scrollable = !0),
(f.locked = 0 == f.page.maxh && 0 == f.page.maxw),
f.locked
? (f.ispage || f.updateScrollBar(f.view), !1)
: (f.hidden || f.visibility ? !f.hidden && !f.railh.visibility && f.showRailHr() : f.showRail().showRailHr(),
f.istextarea && f.win.css("resize") && "none" != f.win.css("resize") && (f.view.h -= 20),
f.ispage || f.updateScrollBar(f.view),
(f.cursorheight = Math.min(f.view.h, Math.round(f.view.h * (f.view.h / f.page.h)))),
(f.cursorheight = f.opt.cursorfixedheight ? f.opt.cursorfixedheight : Math.max(f.opt.cursorminheight, f.cursorheight)),
(f.cursorwidth = Math.min(f.view.w, Math.round(f.view.w * (f.view.w / f.page.w)))),
(f.cursorwidth = f.opt.cursorfixedheight ? f.opt.cursorfixedheight : Math.max(f.opt.cursorminheight, f.cursorwidth)),
(f.scrollvaluemax = f.view.h - f.cursorheight - f.cursor.hborder),
f.railh && ((f.railh.width = f.page.maxh > 0 ? f.view.w - f.rail.width : f.view.w), (f.scrollvaluemaxw = f.railh.width - f.cursorwidth - f.cursorh.wborder)),
(f.scrollratio = { x: f.page.maxw / f.scrollvaluemaxw, y: f.page.maxh / f.scrollvaluemax }),
f.getScrollTop() > f.page.maxh
? f.doScrollTop(f.page.maxh)
: ((f.scroll.y = Math.round(f.getScrollTop() * (1 / f.scrollratio.y))), (f.scroll.x = Math.round(f.getScrollLeft() * (1 / f.scrollratio.x))), f.cursoractive && f.noticeCursor()),
f.scroll.y && 0 == f.getScrollTop() && f.doScrollTo(Math.floor(f.scroll.y * f.scrollratio.y)),
f)
);
}),
(this.resize = function () {
return f.delayed("resize", f.onResize, 30), f;
}),
(this.lazyResize = function () {
f.delayed("resize", f.resize, 250);
}),
(this._bind = function (e, t, i, n) {
f.events.push({ e: e, n: t, f: i, b: n, q: !1 }), e.addEventListener ? e.addEventListener(t, i, n || !1) : e.attachEvent ? e.attachEvent("on" + t, i) : (e["on" + t] = i);
}),
(this.jqbind = function (t, i, n) {
f.events.push({ e: t, n: i, f: n, q: !0 }), e(t).bind(i, n);
}),
(this.bind = function (e, t, i, n) {
var o = "jquery" in e ? e[0] : e;
o.addEventListener
? (g.cantouch &&
/mouseup|mousedown|mousemove/.test(t) &&
f._bind(
o,
"mousedown" == t ? "touchstart" : "mouseup" == t ? "touchend" : "touchmove",
function (e) {
if (e.touches) {
if (e.touches.length < 2) {
var t = e.touches.length ? e.touches[0] : e;
(t.original = e), i.call(this, t);
}
} else e.changedTouches && ((t = e.changedTouches[0]), (t.original = e), i.call(this, t));
},
n || !1
),
f._bind(o, t, i, n || !1),
"mousewheel" == t && f._bind(o, "DOMMouseScroll", i, n || !1),
g.cantouch && "mouseup" == t && f._bind(o, "touchcancel", i, n || !1))
: f._bind(o, t, function (e) {
return (e = e || window.event || !1) && e.srcElement && (e.target = e.srcElement), i.call(o, e) === !1 || n === !1 ? f.cancelEvent(e) : !0;
});
}),
(this._unbind = function (e, t, i, n) {
e.removeEventListener ? e.removeEventListener(t, i, n) : e.detachEvent ? e.detachEvent("on" + t, i) : (e["on" + t] = !1);
}),
(this.unbindAll = function () {
for (var e = 0; e < f.events.length; e++) {
var t = f.events[e];
t.q ? t.e.unbind(t.n, t.f) : f._unbind(t.e, t.n, t.f, t.b);
}
}),
(this.cancelEvent = function (e) {
return (e = e.original ? e.original : e ? e : window.event || !1)
? (e.preventDefault && e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.preventManipulation && e.preventManipulation(), (e.cancelBubble = !0), (e.cancel = !0), (e.returnValue = !1))
: !1;
}),
(this.stopPropagation = function (e) {
return (e = e.original ? e.original : e ? e : window.event || !1) ? (e.stopPropagation ? e.stopPropagation() : (e.cancelBubble && (e.cancelBubble = !0), !1)) : !1;
}),
(this.showRail = function () {
return 0 == f.page.maxh || (!f.ispage && "none" == f.win.css("display")) || ((f.visibility = !0), (f.rail.visibility = !0), f.rail.css("display", "block")), f;
}),
(this.showRailHr = function () {
return f.railh ? (0 == f.page.maxw || (!f.ispage && "none" == f.win.css("display")) || ((f.railh.visibility = !0), f.railh.css("display", "block")), f) : f;
}),
(this.hideRail = function () {
return (f.visibility = !1), (f.rail.visibility = !1), f.rail.css("display", "none"), f;
}),
(this.hideRailHr = function () {
return f.railh ? ((f.railh.visibility = !1), f.railh.css("display", "none"), f) : f;
}),
(this.show = function () {
return (f.hidden = !1), (f.locked = !1), f.showRail().showRailHr();
}),
(this.hide = function () {
return (f.hidden = !0), (f.locked = !0), f.hideRail().hideRailHr();
}),
(this.toggle = function () {
return f.hidden ? f.show() : f.hide();
}),
(this.remove = function () {
f.stop(),
f.cursortimeout && clearTimeout(f.cursortimeout),
f.doZoomOut(),
f.unbindAll(),
f.observer !== !1 && f.observer.disconnect(),
(f.events = []),
f.cursor && (f.cursor.remove(), (f.cursor = null)),
f.cursorh && (f.cursorh.remove(), (f.cursorh = null)),
f.rail && (f.rail.remove(), (f.rail = null)),
f.railh && (f.railh.remove(), (f.railh = null)),
f.zoom && (f.zoom.remove(), (f.zoom = null));
for (var e = 0; e < f.saved.css.length; e++) {
var t = f.saved.css[e];
t[0].css(t[1], "undefined" == typeof t[2] ? "" : t[2]);
}
return (f.saved = !1), f.me.data("__nicescroll", ""), (f.me = null), (f.doc = null), (f.docscroll = null), (f.win = null), f;
}),
(this.scrollstart = function (e) {
return (this.onscrollstart = e), f;
}),
(this.scrollend = function (e) {
return (this.onscrollend = e), f;
}),
(this.scrollcancel = function (e) {
return (this.onscrollcancel = e), f;
}),
(this.zoomin = function (e) {
return (this.onzoomin = e), f;
}),
(this.zoomout = function (e) {
return (this.onzoomout = e), f;
}),
(this.isScrollable = function (t) {
for (t = t.target ? t.target : t; t && 1 == t.nodeType && !/BODY|HTML/.test(t.nodeName); ) {
var i = e(t);
if (/scroll|auto/.test(i.css("overflowY") || i.css("overflowX") || i.css("overflow") || "")) return t.clientHeight != t.scrollHeight;
t = t.parentNode ? t.parentNode : !1;
}
return !1;
}),
(this.getViewport = function (t) {
for (t = t && t.parentNode ? t.parentNode : !1; t && 1 == t.nodeType && !/BODY|HTML/.test(t.nodeName); ) {
var i = e(t);
if (/scroll|auto/.test(i.css("overflowY") || i.css("overflowX") || i.css("overflow") || "") && t.clientHeight != t.scrollHeight) return i;
if (i.getNiceScroll().length > 0) return i;
t = t.parentNode ? t.parentNode : !1;
}
return !1;
}),
(this.onmousewheel = function (e) {
return f.locked
? !0
: f.rail.scrollable
? (f.opt.preservenativescrolling && f.checkarea && ((f.checkarea = !1), (f.nativescrollingarea = f.isScrollable(e))),
f.nativescrollingarea ? !0 : f.locked ? f.cancelEvent(e) : f.rail.drag ? f.cancelEvent(e) : (p(e, !1), f.cancelEvent(e)))
: f.railh && f.railh.scrollable
? f.onmousewheelhr(e)
: !0;
}),
(this.onmousewheelhr = function (e) {
return f.locked || !f.railh.scrollable
? !0
: (f.opt.preservenativescrolling && f.checkarea && ((f.checkarea = !1), (f.nativescrollingarea = f.isScrollable(e))),
f.nativescrollingarea ? !0 : f.locked ? f.cancelEvent(e) : f.rail.drag ? f.cancelEvent(e) : (p(e, !0), f.cancelEvent(e)));
}),
(this.stop = function () {
return f.cancelScroll(), f.scrollmon && f.scrollmon.stop(), (f.cursorfreezed = !1), (f.scroll.y = Math.round(f.getScrollTop() * (1 / f.scrollratio.y))), f.noticeCursor(), f;
}),
(this.getTransitionSpeed = function (e) {
var t = Math.round(10 * f.opt.scrollspeed),
e = Math.min(t, Math.round((e / 20) * f.opt.scrollspeed));
return e > 20 ? e : 0;
}),
f.opt.smoothscroll
? f.ishwscroll && g.hastransition && f.opt.usetransition
? ((this.prepareTransition = function (e, t) {
var i = t ? (e > 20 ? e : 0) : f.getTransitionSpeed(e),
n = i ? g.prefixstyle + "transform " + i + "ms ease-out" : "";
return (f.lasttransitionstyle && f.lasttransitionstyle == n) || ((f.lasttransitionstyle = n), f.doc.css(g.transitionstyle, n)), i;
}),
(this.doScrollLeft = function (e, t) {
var i = f.scrollrunning ? f.newscrolly : f.getScrollTop();
f.doScrollPos(e, i, t);
}),
(this.doScrollTop = function (e, t) {
var i = f.scrollrunning ? f.newscrollx : f.getScrollLeft();
f.doScrollPos(i, e, t);
}),
(this.doScrollPos = function (e, t, i) {
var n = f.getScrollTop(),
o = f.getScrollLeft();
return (
((f.newscrolly - n) * (t - n) < 0 || (f.newscrollx - o) * (e - o) < 0) && f.cancelScroll(),
0 == f.opt.bouncescroll && (0 > t ? (t = 0) : t > f.page.maxh && (t = f.page.maxh), 0 > e ? (e = 0) : e > f.page.maxw && (e = f.page.maxw)),
e == f.newscrollx && t == f.newscrolly
? !1
: ((f.newscrolly = t),
(f.newscrollx = e),
(f.newscrollspeed = i || !1),
f.timer
? !1
: void (f.timer = setTimeout(function () {
var i,
n,
o = f.getScrollTop(),
s = f.getScrollLeft();
(i = e - s),
(n = t - o),
(i = Math.round(Math.sqrt(Math.pow(i, 2) + Math.pow(n, 2)))),
(i = f.prepareTransition(f.newscrollspeed ? f.newscrollspeed : i)),
f.timerscroll && f.timerscroll.tm && clearInterval(f.timerscroll.tm),
i > 0 &&
(!f.scrollrunning &&
f.onscrollstart &&
f.onscrollstart.call(f, { type: "scrollstart", current: { x: s, y: o }, request: { x: e, y: t }, end: { x: f.newscrollx, y: f.newscrolly }, speed: i }),
g.transitionend
? f.scrollendtrapped || ((f.scrollendtrapped = !0), f.bind(f.doc, g.transitionend, f.onScrollEnd, !1))
: (f.scrollendtrapped && clearTimeout(f.scrollendtrapped), (f.scrollendtrapped = setTimeout(f.onScrollEnd, i))),
(f.timerscroll = { bz: new BezierClass(o, f.newscrolly, i, 0, 0, 0.58, 1), bh: new BezierClass(s, f.newscrollx, i, 0, 0, 0.58, 1) }),
f.cursorfreezed ||
(f.timerscroll.tm = setInterval(function () {
f.showCursor(f.getScrollTop(), f.getScrollLeft());
}, 60))),
f.synched("doScroll-set", function () {
(f.timer = 0), f.scrollendtrapped && (f.scrollrunning = !0), f.setScrollTop(f.newscrolly), f.setScrollLeft(f.newscrollx), f.scrollendtrapped || f.onScrollEnd();
});
}, 50)))
);
}),
(this.cancelScroll = function () {
if (!f.scrollendtrapped) return !0;
var e = f.getScrollTop(),
t = f.getScrollLeft();
return (
(f.scrollrunning = !1),
g.transitionend || clearTimeout(g.transitionend),
(f.scrollendtrapped = !1),
f._unbind(f.doc, g.transitionend, f.onScrollEnd),
f.prepareTransition(0),
f.setScrollTop(e),
f.railh && f.setScrollLeft(t),
f.timerscroll && f.timerscroll.tm && clearInterval(f.timerscroll.tm),
(f.timerscroll = !1),
(f.cursorfreezed = !1),
f.showCursor(e, t),
f
);
}),
(this.onScrollEnd = function () {
f.scrollendtrapped && f._unbind(f.doc, g.transitionend, f.onScrollEnd),
(f.scrollendtrapped = !1),
f.prepareTransition(0),
f.timerscroll && f.timerscroll.tm && clearInterval(f.timerscroll.tm),
(f.timerscroll = !1);
var e = f.getScrollTop(),
t = f.getScrollLeft();
return (
f.setScrollTop(e),
f.railh && f.setScrollLeft(t),
f.noticeCursor(!1, e, t),
(f.cursorfreezed = !1),
0 > e ? (e = 0) : e > f.page.maxh && (e = f.page.maxh),
0 > t ? (t = 0) : t > f.page.maxw && (t = f.page.maxw),
e != f.newscrolly || t != f.newscrollx
? f.doScrollPos(t, e, f.opt.snapbackspeed)
: (f.onscrollend && f.scrollrunning && f.onscrollend.call(f, { type: "scrollend", current: { x: t, y: e }, end: { x: f.newscrollx, y: f.newscrolly } }), void (f.scrollrunning = !1))
);
}))
: ((this.doScrollLeft = function (e) {
var t = f.scrollrunning ? f.newscrolly : f.getScrollTop();
f.doScrollPos(e, t);
}),
(this.doScrollTop = function (e) {
var t = f.scrollrunning ? f.newscrollx : f.getScrollLeft();
f.doScrollPos(t, e);
}),
(this.doScrollPos = function (e, t) {
function i() {
if (f.cancelAnimationFrame) return !0;
if (((f.scrollrunning = !0), (d = 1 - d))) return (f.timer = r(i) || 1);
var e = 0,
t = (sy = f.getScrollTop());
if (f.dst.ay) {
var t = f.bzscroll ? f.dst.py + f.bzscroll.getNow() * f.dst.ay : f.newscrolly,
n = t - sy;
((0 > n && t < f.newscrolly) || (n > 0 && t > f.newscrolly)) && (t = f.newscrolly), f.setScrollTop(t), t == f.newscrolly && (e = 1);
} else e = 1;
var o = (sx = f.getScrollLeft());
f.dst.ax
? ((o = f.bzscroll ? f.dst.px + f.bzscroll.getNow() * f.dst.ax : f.newscrollx),
(n = o - sx),
((0 > n && o < f.newscrollx) || (n > 0 && o > f.newscrollx)) && (o = f.newscrollx),
f.setScrollLeft(o),
o == f.newscrollx && (e += 1))
: (e += 1),
2 == e
? ((f.timer = 0),
(f.cursorfreezed = !1),
(f.bzscroll = !1),
(f.scrollrunning = !1),
0 > t ? (t = 0) : t > f.page.maxh && (t = f.page.maxh),
0 > o ? (o = 0) : o > f.page.maxw && (o = f.page.maxw),
o != f.newscrollx || t != f.newscrolly
? f.doScrollPos(o, t)
: f.onscrollend && f.onscrollend.call(f, { type: "scrollend", current: { x: sx, y: sy }, end: { x: f.newscrollx, y: f.newscrolly } }))
: (f.timer = r(i) || 1);
}
if (((t = "undefined" == typeof t || t === !1 ? f.getScrollTop(!0) : t), f.timer && f.newscrolly == t && f.newscrollx == e)) return !0;
f.timer && l(f.timer), (f.timer = 0);
var n = f.getScrollTop(),
o = f.getScrollLeft();
((f.newscrolly - n) * (t - n) < 0 || (f.newscrollx - o) * (e - o) < 0) && f.cancelScroll(),
(f.newscrolly = t),
(f.newscrollx = e),
(f.bouncescroll && f.rail.visibility) || (f.newscrolly < 0 ? (f.newscrolly = 0) : f.newscrolly > f.page.maxh && (f.newscrolly = f.page.maxh)),
(f.bouncescroll && f.railh.visibility) || (f.newscrollx < 0 ? (f.newscrollx = 0) : f.newscrollx > f.page.maxw && (f.newscrollx = f.page.maxw)),
(f.dst = {}),
(f.dst.x = e - o),
(f.dst.y = t - n),
(f.dst.px = o),
(f.dst.py = n);
var s = Math.round(Math.sqrt(Math.pow(f.dst.x, 2) + Math.pow(f.dst.y, 2)));
(f.dst.ax = f.dst.x / s), (f.dst.ay = f.dst.y / s);
var a = 0,
c = s;
if (
(0 == f.dst.x ? ((a = n), (c = t), (f.dst.ay = 1), (f.dst.py = 0)) : 0 == f.dst.y && ((a = o), (c = e), (f.dst.ax = 1), (f.dst.px = 0)),
(s = f.getTransitionSpeed(s)),
(f.bzscroll = s > 0 ? (f.bzscroll ? f.bzscroll.update(c, s) : new BezierClass(a, c, s, 0, 1, 0, 1)) : !1),
!f.timer)
) {
((n == f.page.maxh && t >= f.page.maxh) || (o == f.page.maxw && e >= f.page.maxw)) && f.checkContentSize();
var d = 1;
(f.cancelAnimationFrame = !1),
(f.timer = 1),
f.onscrollstart && !f.scrollrunning && f.onscrollstart.call(f, { type: "scrollstart", current: { x: o, y: n }, request: { x: e, y: t }, end: { x: f.newscrollx, y: f.newscrolly }, speed: s }),
i(),
((n == f.page.maxh && t >= n) || (o == f.page.maxw && e >= o)) && f.checkContentSize(),
f.noticeCursor();
}
}),
(this.cancelScroll = function () {
return f.timer && l(f.timer), (f.timer = 0), (f.bzscroll = !1), (f.scrollrunning = !1), f;
}))
: ((this.doScrollLeft = function (e, t) {
var i = f.getScrollTop();
f.doScrollPos(e, i, t);
}),
(this.doScrollTop = function (e, t) {
var i = f.getScrollLeft();
f.doScrollPos(i, e, t);
}),
(this.doScrollPos = function (e, t) {
var i = e > f.page.maxw ? f.page.maxw : e;
0 > i && (i = 0);
var n = t > f.page.maxh ? f.page.maxh : t;
0 > n && (n = 0),
f.synched("scroll", function () {
f.setScrollTop(n), f.setScrollLeft(i);
});
}),
(this.cancelScroll = function () {})),
(this.doScrollBy = function (e, t) {
var i = 0,
i = t ? Math.floor((f.scroll.y - e) * f.scrollratio.y) : (f.timer ? f.newscrolly : f.getScrollTop(!0)) - e;
if (f.bouncescroll) {
var n = Math.round(f.view.h / 2);
-n > i ? (i = -n) : i > f.page.maxh + n && (i = f.page.maxh + n);
}
return (f.cursorfreezed = !1), (py = f.getScrollTop(!0)), 0 > i && py <= 0 ? f.noticeCursor() : i > f.page.maxh && py >= f.page.maxh ? (f.checkContentSize(), f.noticeCursor()) : void f.doScrollTop(i);
}),
(this.doScrollLeftBy = function (e, t) {
var i = 0,
i = t ? Math.floor((f.scroll.x - e) * f.scrollratio.x) : (f.timer ? f.newscrollx : f.getScrollLeft(!0)) - e;
if (f.bouncescroll) {
var n = Math.round(f.view.w / 2);
-n > i ? (i = -n) : i > f.page.maxw + n && (i = f.page.maxw + n);
}
return (f.cursorfreezed = !1), (px = f.getScrollLeft(!0)), 0 > i && px <= 0 ? f.noticeCursor() : i > f.page.maxw && px >= f.page.maxw ? f.noticeCursor() : void f.doScrollLeft(i);
}),
(this.doScrollTo = function (e, t) {
t && Math.round(e * f.scrollratio.y), (f.cursorfreezed = !1), f.doScrollTop(e);
}),
(this.checkContentSize = function () {
var e = f.getContentSize();
(e.h != f.page.h || e.w != f.page.w) && f.resize(!1, e);
}),
(f.onscroll = function () {
f.rail.drag ||
f.cursorfreezed ||
f.synched("scroll", function () {
(f.scroll.y = Math.round(f.getScrollTop() * (1 / f.scrollratio.y))), f.railh && (f.scroll.x = Math.round(f.getScrollLeft() * (1 / f.scrollratio.x))), f.noticeCursor();
});
}),
f.bind(f.docscroll, "scroll", f.onscroll),
(this.doZoomIn = function (t) {
if (!f.zoomactive) {
(f.zoomactive = !0), (f.zoomrestore = { style: {} });
var i,
n = "position,top,left,zIndex,backgroundColor,marginTop,marginBottom,marginLeft,marginRight".split(","),
o = f.win[0].style;
for (i in n) {
var s = n[i];
f.zoomrestore.style[s] = "undefined" != typeof o[s] ? o[s] : "";
}
return (
(f.zoomrestore.style.width = f.win.css("width")),
(f.zoomrestore.style.height = f.win.css("height")),
(f.zoomrestore.padding = { w: f.win.outerWidth() - f.win.width(), h: f.win.outerHeight() - f.win.height() }),
g.isios4 && ((f.zoomrestore.scrollTop = e(window).scrollTop()), e(window).scrollTop(0)),
f.win.css({ position: g.isios4 ? "absolute" : "fixed", top: 0, left: 0, "z-index": f.opt.zindex + 100, margin: "0px" }),
(n = f.win.css("backgroundColor")),
("" == n || /transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n)) && f.win.css("backgroundColor", "#fff"),
f.rail.css({ "z-index": f.opt.zindex + 110 }),
f.zoom.css({ "z-index": f.opt.zindex + 112 }),
f.zoom.css("backgroundPosition", "0px -18px"),
f.resizeZoom(),
f.onzoomin && f.onzoomin.call(f),
f.cancelEvent(t)
);
}
}),
(this.doZoomOut = function (t) {
return f.zoomactive
? ((f.zoomactive = !1),
f.win.css("margin", ""),
f.win.css(f.zoomrestore.style),
g.isios4 && e(window).scrollTop(f.zoomrestore.scrollTop),
f.rail.css({ "z-index": f.ispage ? f.opt.zindex : f.opt.zindex + 2 }),
f.zoom.css({ "z-index": f.opt.zindex }),
(f.zoomrestore = !1),
f.zoom.css("backgroundPosition", "0px 0px"),
f.onResize(),
f.onzoomout && f.onzoomout.call(f),
f.cancelEvent(t))
: void 0;
}),
(this.doZoom = function (e) {
return f.zoomactive ? f.doZoomOut(e) : f.doZoomIn(e);
}),
(this.resizeZoom = function () {
if (f.zoomactive) {
var t = f.getScrollTop();
f.win.css({ width: e(window).width() - f.zoomrestore.padding.w + "px", height: e(window).height() - f.zoomrestore.padding.h + "px" }), f.onResize(), console.log(t), f.setScrollTop(Math.min(f.page.maxh, t));
}
}),
this.init(),
e.nicescroll.push(this);
},
u = function (e) {
var t = this;
(this.nc = e),
(this.steptime = this.lasttime = this.speedy = this.speedx = this.lasty = this.lastx = 0),
(this.snapy = this.snapx = !1),
(this.demuly = this.demulx = 0),
(this.lastscrolly = this.lastscrollx = -1),
(this.timer = this.chky = this.chkx = 0),
(this.time = function () {
return +new Date();
}),
(this.reset = function (e, i) {
t.stop();
var n = t.time();
(t.steptime = 0), (t.lasttime = n), (t.speedx = 0), (t.speedy = 0), (t.lastx = e), (t.lasty = i), (t.lastscrollx = -1), (t.lastscrolly = -1);
}),
(this.update = function (e, i) {
var n = t.time();
(t.steptime = n - t.lasttime), (t.lasttime = n);
var n = i - t.lasty,
o = e - t.lastx,
s = t.nc.getScrollTop(),
a = t.nc.getScrollLeft();
(s += n), (a += o), (t.snapx = 0 > a || a > t.nc.page.maxw), (t.snapy = 0 > s || s > t.nc.page.maxh), (t.speedx = o), (t.speedy = n), (t.lastx = e), (t.lasty = i);
}),
(this.stop = function () {
t.nc.unsynched("domomentum2d"), t.timer && clearTimeout(t.timer), (t.timer = 0), (t.lastscrollx = -1), (t.lastscrolly = -1);
}),
(this.doSnapy = function (e, i) {
var n = !1;
0 > i ? ((i = 0), (n = !0)) : i > t.nc.page.maxh && ((i = t.nc.page.maxh), (n = !0)),
0 > e ? ((e = 0), (n = !0)) : e > t.nc.page.maxw && ((e = t.nc.page.maxw), (n = !0)),
n && t.nc.doScrollPos(e, i, t.nc.opt.snapbackspeed);
}),
(this.doMomentum = function (e) {
var i = t.time(),
n = e ? i + e : t.lasttime,
e = t.nc.getScrollLeft(),
o = t.nc.getScrollTop(),
s = t.nc.page.maxh,
a = t.nc.page.maxw;
if (
((t.speedx = a > 0 ? Math.min(60, t.speedx) : 0),
(t.speedy = s > 0 ? Math.min(60, t.speedy) : 0),
(n = n && 50 >= i - n),
(0 > o || o > s || 0 > e || e > a) && (n = !1),
(e = t.speedx && n ? t.speedx : !1),
(t.speedy && n && t.speedy) || e)
) {
var r = Math.max(16, t.steptime);
r > 50 && ((e = r / 50), (t.speedx *= e), (t.speedy *= e), (r = 50)),
(t.demulxy = 0),
(t.lastscrollx = t.nc.getScrollLeft()),
(t.chkx = t.lastscrollx),
(t.lastscrolly = t.nc.getScrollTop()),
(t.chky = t.lastscrolly);
var l = t.lastscrollx,
c = t.lastscrolly,
d = function () {
var e = t.time() - i > 600 ? 0.04 : 0.02;
t.speedx && ((l = Math.floor(t.lastscrollx - t.speedx * (1 - t.demulxy))), (t.lastscrollx = l), 0 > l || l > a) && (e = 0.1),
t.speedy && ((c = Math.floor(t.lastscrolly - t.speedy * (1 - t.demulxy))), (t.lastscrolly = c), 0 > c || c > s) && (e = 0.1),
(t.demulxy = Math.min(1, t.demulxy + e)),
t.nc.synched("domomentum2d", function () {
t.speedx && (t.nc.getScrollLeft() != t.chkx && t.stop(), (t.chkx = l), t.nc.setScrollLeft(l)),
t.speedy && (t.nc.getScrollTop() != t.chky && t.stop(), (t.chky = c), t.nc.setScrollTop(c)),
t.timer || (t.nc.hideCursor(), t.doSnapy(l, c));
}),
t.demulxy < 1 ? (t.timer = setTimeout(d, r)) : (t.stop(), t.nc.hideCursor(), t.doSnapy(l, c));
};
d();
} else t.doSnapy(t.nc.getScrollLeft(), t.nc.getScrollTop());
});
},
p = e.fn.scrollTop;
(e.cssHooks.pageYOffset = {
get: function (t) {
var i = e.data(t, "__nicescroll") || !1;
return i && i.ishwscroll ? i.getScrollTop() : p.call(t);
},
set: function (t, i) {
var n = e.data(t, "__nicescroll") || !1;
return n && n.ishwscroll ? n.setScrollTop(parseInt(i)) : p.call(t, i), this;
},
}),
(e.fn.scrollTop = function (t) {
if ("undefined" == typeof t) {
var i = this[0] ? e.data(this[0], "__nicescroll") || !1 : !1;
return i && i.ishwscroll ? i.getScrollTop() : p.call(this);
}
return this.each(function () {
var i = e.data(this, "__nicescroll") || !1;
i && i.ishwscroll ? i.setScrollTop(parseInt(t)) : p.call(e(this), t);
});
});
var f = e.fn.scrollLeft;
(e.cssHooks.pageXOffset = {
get: function (t) {
var i = e.data(t, "__nicescroll") || !1;
return i && i.ishwscroll ? i.getScrollLeft() : f.call(t);
},
set: function (t, i) {
var n = e.data(t, "__nicescroll") || !1;
return n && n.ishwscroll ? n.setScrollLeft(parseInt(i)) : f.call(t, i), this;
},
}),
(e.fn.scrollLeft = function (t) {
if ("undefined" == typeof t) {
var i = this[0] ? e.data(this[0], "__nicescroll") || !1 : !1;
return i && i.ishwscroll ? i.getScrollLeft() : f.call(this);
}
return this.each(function () {
var i = e.data(this, "__nicescroll") || !1;
i && i.ishwscroll ? i.setScrollLeft(parseInt(t)) : f.call(e(this), t);
});
});
var m = function (t) {
var i = this;
if (
((this.length = 0),
(this.name = "nicescrollarray"),
(this.each = function (e) {
for (var t = 0; t < i.length; t++) e.call(i[t]);
return i;
}),
(this.push = function (e) {
(i[i.length] = e), i.length++;
}),
(this.eq = function (e) {
return i[e];
}),
t)
)
for (a = 0; a < t.length; a++) {
var n = e.data(t[a], "__nicescroll") || !1;
n && ((this[this.length] = n), this.length++);
}
return this;
};
!(function (e, t, i) {
for (var n = 0; n < t.length; n++) i(e, t[n]);
})(m.prototype, "show,hide,toggle,onResize,resize,remove,stop,doScrollPos".split(","), function (e, t) {
e[t] = function () {
var e = arguments;
return this.each(function () {
this[t].apply(this, e);
});
};
}),
(e.fn.getNiceScroll = function (t) {
return "undefined" == typeof t ? new m(this) : e.data(this[t], "__nicescroll") || !1;
}),
e.extend(e.expr[":"], {
nicescroll: function (t) {
return e.data(t, "__nicescroll") ? !0 : !1;
},
}),
(e.fn.niceScroll = function (t, i) {
"undefined" == typeof i && "object" == typeof t && !("jquery" in t) && ((i = t), (t = !1));
var n = new m();
"undefined" == typeof i && (i = {}), t && ((i.doc = e(t)), (i.win = e(this)));
var o = !("doc" in i);
return (
o || "win" in i || (i.win = e(this)),
this.each(function () {
var t = e(this).data("__nicescroll") || !1;
t || ((i.doc = o ? e(this) : i.doc), (t = new h(i, e(this))), e(this).data("__nicescroll", t)), n.push(t);
}),
1 == n.length ? n[0] : n
);
}),
(window.NiceScroll = {
getjQuery: function () {
return e;
},
}),
e.nicescroll || (e.nicescroll = new m());
})(jQuery),
(function (e, t, i, n) {
function o(t, i) {
(this.element = t), (this.$elem = e(this.element)), (this.options = e.extend({}, a, i)), this.init();
}
var s = "slimmenu",
a = { resizeWidth: "768", collapserTitle: "Main Menu", animSpeed: "medium", easingEffect: null, indentChildren: !1, childrenIndenter: " " };
(o.prototype = {
init: function () {
var i,
n = this.options,
o = this.$elem,
s = '<div class="menu-collapser">' + n.collapserTitle + '<div class="collapse-button"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></div></div>';
o.before(s),
(i = o.prev(".menu-collapser")),
o.on("click", ".sub-collapser", function (t) {
t.preventDefault(), t.stopPropagation();
var i = e(this).closest("li");
e(this).hasClass("expanded")
? (e(this).removeClass("expanded"), e(this).find("i").html("▼"), i.find(">ul").slideUp(n.animSpeed, n.easingEffect))
: (e(this).addClass("expanded"), e(this).find("i").html("▲"), i.find(">ul").slideDown(n.animSpeed, n.easingEffect));
}),
i.on("click", ".collapse-button", function (e) {
e.preventDefault(), o.slideToggle(n.animSpeed, n.easingEffect);
}),
this.resizeMenu({ data: { el: this.element, options: this.options } }),
e(t).on("resize", { el: this.element, options: this.options }, this.resizeMenu);
},
resizeMenu: function (i) {
var n = e(t),
s = i.data.options,
a = e(i.data.el),
r = e("body").find(".menu-collapser");
a.find("li").each(function () {
e(this).has("ul").length && (e(this).has(".sub-collapser").length ? e(this).children(".sub-collapser i").html("▼") : e(this).append('<span class="sub-collapser"><i>▼</i></span>')),
e(this).children("ul").hide(),
e(this).find(".sub-collapser").removeClass("expanded").children("i").html("▼");
}),
s.resizeWidth >= n.width()
? (s.indentChildren &&
a.find("ul").each(function () {
var t = e(this).parents("ul").length;
e(this).children("li").children("a").has("i").length || e(this).children("li").children("a").prepend(o.prototype.indent(t, s));
}),
a.find("li").has("ul").off("mouseenter mouseleave"),
a.addClass("collapsed").hide(),
r.show())
: (a
.find("li")
.has("ul")
.on("mouseenter", function () {
e(this).find(">ul").stop().slideDown(s.animSpeed, s.easingEffect);
})
.on("mouseleave", function () {
e(this).find(">ul").stop().slideUp(s.animSpeed, s.easingEffect);
}),
a.find("li > a > i").remove(),
a.removeClass("collapsed").show(),
r.hide());
},
indent: function (e, t) {
for (var i = "", n = 0; e > n; n++) i += t.childrenIndenter;
return "<i>" + i + "</i>";
},
}),
(e.fn[s] = function (t) {
return this.each(function () {
e.data(this, "plugin_" + s) || e.data(this, "plugin_" + s, new o(this, t));
});
});
})(jQuery, window, document),
(function (e, t, i) {
"use strict";
var n,
o = e.document,
s = e.Modernizr,
a = function (e) {
return e.charAt(0).toUpperCase() + e.slice(1);
},
r = "Moz Webkit O Ms".split(" "),
l = function (e) {
var t,
i = o.documentElement.style;
if ("string" == typeof i[e]) return e;
e = a(e);
for (var n = 0, s = r.length; s > n; n++) if (((t = r[n] + e), "string" == typeof i[t])) return t;
},
c = l("transform"),
d = l("transitionProperty"),
h = {
csstransforms: function () {
return !!c;
},
csstransforms3d: function () {
var e = !!l("perspective");
if (e) {
var i = " -o- -moz- -ms- -webkit- -khtml- ".split(" "),
n = "@media (" + i.join("transform-3d),(") + "modernizr)",
o = t("<style>" + n + "{#modernizr{height:3px}}</style>").appendTo("head"),
s = t('<div id="modernizr" />').appendTo("html");
(e = 3 === s.height()), s.remove(), o.remove();
}
return e;
},
csstransitions: function () {
return !!d;
},
};
if (s) for (n in h) s.hasOwnProperty(n) || s.addTest(n, h[n]);
else {
s = e.Modernizr = { _version: "1.6ish: miniModernizr for Isotope" };
var u,
p = " ";
for (n in h) (u = h[n]()), (s[n] = u), (p += " " + (u ? "" : "no-") + n);
t("html").addClass(p);
}
if (s.csstransforms) {
var f = s.csstransforms3d
? {
translate: function (e) {
return "translate3d(" + e[0] + "px, " + e[1] + "px, 0) ";
},
scale: function (e) {
return "scale3d(" + e + ", " + e + ", 1) ";
},
}
: {
translate: function (e) {
return "translate(" + e[0] + "px, " + e[1] + "px) ";
},
scale: function (e) {
return "scale(" + e + ") ";
},
},
m = function (e, i, n) {
var o,
s,
a = t.data(e, "isoTransform") || {},
r = {},
l = {};
(r[i] = n), t.extend(a, r);
for (o in a) (s = a[o]), (l[o] = f[o](s));
var d = l.translate || "",
h = l.scale || "",
u = d + h;
t.data(e, "isoTransform", a), (e.style[c] = u);
};
(t.cssNumber.scale = !0),
(t.cssHooks.scale = {
set: function (e, t) {
m(e, "scale", t);
},
get: function (e, i) {
var n = t.data(e, "isoTransform");
return n && n.scale ? n.scale : 1;
},
}),
(t.fx.step.scale = function (e) {
t.cssHooks.scale.set(e.elem, e.now + e.unit);
}),
(t.cssNumber.translate = !0),
(t.cssHooks.translate = {
set: function (e, t) {
m(e, "translate", t);
},
get: function (e, i) {
var n = t.data(e, "isoTransform");
return n && n.translate ? n.translate : [0, 0];
},
});
}
var g, v;
s.csstransitions &&
((g = { WebkitTransitionProperty: "webkitTransitionEnd", MozTransitionProperty: "transitionend", OTransitionProperty: "oTransitionEnd otransitionend", transitionProperty: "transitionend" }[d]), (v = l("transitionDuration")));
var w,
y = t.event,
x = t.event.handle ? "handle" : "dispatch";
(y.special.smartresize = {
setup: function () {
t(this).bind("resize", y.special.smartresize.handler);
},
teardown: function () {
t(this).unbind("resize", y.special.smartresize.handler);
},
handler: function (e, t) {
var i = this,
n = arguments;
(e.type = "smartresize"),
w && clearTimeout(w),
(w = setTimeout(
function () {
y[x].apply(i, n);
},
"execAsap" === t ? 0 : 100
));
},
}),
(t.fn.smartresize = function (e) {
return e ? this.bind("smartresize", e) : this.trigger("smartresize", ["execAsap"]);
}),
(t.Isotope = function (e, i, n) {
(this.element = t(i)), this._create(e), this._init(n);
});
var b = ["width", "height"],
S = t(e);
(t.Isotope.settings = {
resizable: !0,
layoutMode: "masonry",
containerClass: "isotope",
itemClass: "isotope-item",
hiddenClass: "isotope-hidden",
hiddenStyle: { opacity: 0, scale: 0.001 },
visibleStyle: { opacity: 1, scale: 1 },
containerStyle: { position: "relative", overflow: "hidden" },
animationEngine: "best-available",
animationOptions: { queue: !1, duration: 800 },
sortBy: "original-order",
sortAscending: !0,
resizesContainer: !0,
transformsEnabled: !0,
itemPositionDataEnabled: !1,
}),
(t.Isotope.prototype = {
_create: function (e) {
(this.options = t.extend({}, t.Isotope.settings, e)), (this.styleQueue = []), (this.elemCount = 0);
var i = this.element[0].style;
this.originalStyle = {};
var n = b.slice(0);
for (var o in this.options.containerStyle) n.push(o);
for (var s = 0, a = n.length; a > s; s++) (o = n[s]), (this.originalStyle[o] = i[o] || "");
this.element.css(this.options.containerStyle), this._updateAnimationEngine(), this._updateUsingTransforms();
var r = {
"original-order": function (e, t) {
return t.elemCount++, t.elemCount;
},
random: function () {
return Math.random();
},
};
(this.options.getSortData = t.extend(this.options.getSortData, r)),
this.reloadItems(),
(this.offset = { left: parseInt(this.element.css("padding-left") || 0, 10), top: parseInt(this.element.css("padding-top") || 0, 10) });
var l = this;
setTimeout(function () {
l.element.addClass(l.options.containerClass);
}, 0),
this.options.resizable &&
S.bind("smartresize.isotope", function () {
l.resize();
}),
this.element.delegate("." + this.options.hiddenClass, "click", function () {
return !1;
});
},
_getAtoms: function (e) {
var t = this.options.itemSelector,
i = t ? e.filter(t).add(e.find(t)) : e,
n = { position: "absolute" };
return (
(i = i.filter(function (e, t) {
return 1 === t.nodeType;
})),
this.usingTransforms && ((n.left = 0), (n.top = 0)),
i.css(n).addClass(this.options.itemClass),
this.updateSortData(i, !0),
i
);
},
_init: function (e) {
(this.$filteredAtoms = this._filter(this.$allAtoms)), this._sort(), this.reLayout(e);
},
option: function (e) {
if (t.isPlainObject(e)) {
this.options = t.extend(!0, this.options, e);
var i;
for (var n in e) (i = "_update" + a(n)), this[i] && this[i]();
}
},
_updateAnimationEngine: function () {
var e,
t = this.options.animationEngine.toLowerCase().replace(/[ _\-]/g, "");
switch (t) {
case "css":
case "none":
e = !1;
break;
case "jquery":
e = !0;
break;
default:
e = !s.csstransitions;
}
(this.isUsingJQueryAnimation = e), this._updateUsingTransforms();
},
_updateTransformsEnabled: function () {
this._updateUsingTransforms();
},
_updateUsingTransforms: function () {
var e = (this.usingTransforms = this.options.transformsEnabled && s.csstransforms && s.csstransitions && !this.isUsingJQueryAnimation);
e || (delete this.options.hiddenStyle.scale, delete this.options.visibleStyle.scale), (this.getPositionStyles = e ? this._translate : this._positionAbs);
},
_filter: function (e) {
var t = "" === this.options.filter ? "*" : this.options.filter;
if (!t) return e;
var i = this.options.hiddenClass,
n = "." + i,
o = e.filter(n),
s = o;
if ("*" !== t) {
s = o.filter(t);
var a = e.not(n).not(t).addClass(i);
this.styleQueue.push({ $el: a, style: this.options.hiddenStyle });
}
return this.styleQueue.push({ $el: s, style: this.options.visibleStyle }), s.removeClass(i), e.filter(t);
},
updateSortData: function (e, i) {
var n,
o,
s = this,
a = this.options.getSortData;
e.each(function () {
(n = t(this)), (o = {});
for (var e in a) i || "original-order" !== e ? (o[e] = a[e](n, s)) : (o[e] = t.data(this, "isotope-sort-data")[e]);
t.data(this, "isotope-sort-data", o);
});
},
_sort: function () {
var e = this.options.sortBy,
t = this._getSorter,
i = this.options.sortAscending ? 1 : -1,
n = function (n, o) {
var s = t(n, e),
a = t(o, e);
return s === a && "original-order" !== e && ((s = t(n, "original-order")), (a = t(o, "original-order"))), (s > a ? 1 : a > s ? -1 : 0) * i;
};
this.$filteredAtoms.sort(n);
},
_getSorter: function (e, i) {
return t.data(e, "isotope-sort-data")[i];
},
_translate: function (e, t) {
return { translate: [e, t] };
},
_positionAbs: function (e, t) {
return { left: e, top: t };
},
_pushPosition: function (e, t, i) {
(t = Math.round(t + this.offset.left)), (i = Math.round(i + this.offset.top));
var n = this.getPositionStyles(t, i);
this.styleQueue.push({ $el: e, style: n }), this.options.itemPositionDataEnabled && e.data("isotope-item-position", { x: t, y: i });
},
layout: function (e, t) {
var i = this.options.layoutMode;
if ((this["_" + i + "Layout"](e), this.options.resizesContainer)) {
var n = this["_" + i + "GetContainerSize"]();
this.styleQueue.push({ $el: this.element, style: n });
}
this._processStyleQueue(e, t), (this.isLaidOut = !0);
},
_processStyleQueue: function (e, i) {
var n,
o,
a,
r,
l = this.isLaidOut && this.isUsingJQueryAnimation ? "animate" : "css",
c = this.options.animationOptions,
d = this.options.onLayout;
if (
((o = function (e, t) {
t.$el[l](t.style, c);
}),
this._isInserting && this.isUsingJQueryAnimation)
)
o = function (e, t) {
(n = t.$el.hasClass("no-transition") ? "css" : l), t.$el[n](t.style, c);
};
else if (i || d || c.complete) {
var h = !1,
u = [i, d, c.complete],
p = this;
if (
((a = !0),
(r = function () {
if (!h) {
for (var t, i = 0, n = u.length; n > i; i++) (t = u[i]), "function" == typeof t && t.call(p.element, e, p);
h = !0;
}
}),
this.isUsingJQueryAnimation && "animate" === l)
)
(c.complete = r), (a = !1);
else if (s.csstransitions) {
for (var f, m = 0, w = this.styleQueue[0], y = w && w.$el; !y || !y.length; ) {
if (((f = this.styleQueue[m++]), !f)) return;
y = f.$el;
}
var x = parseFloat(getComputedStyle(y[0])[v]);
x > 0 &&
((o = function (e, t) {
t.$el[l](t.style, c).one(g, r);
}),
(a = !1));
}
}
t.each(this.styleQueue, o), a && r(), (this.styleQueue = []);
},
resize: function () {
this["_" + this.options.layoutMode + "ResizeChanged"]() && this.reLayout();
},
reLayout: function (e) {
this["_" + this.options.layoutMode + "Reset"](), this.layout(this.$filteredAtoms, e);
},
addItems: function (e, t) {
var i = this._getAtoms(e);
(this.$allAtoms = this.$allAtoms.add(i)), t && t(i);
},
insert: function (e, t) {
this.element.append(e);
var i = this;
this.addItems(e, function (e) {
var n = i._filter(e);
i._addHideAppended(n), i._sort(), i.reLayout(), i._revealAppended(n, t);
});
},
appended: function (e, t) {
var i = this;
this.addItems(e, function (e) {
i._addHideAppended(e), i.layout(e), i._revealAppended(e, t);
});
},
_addHideAppended: function (e) {
(this.$filteredAtoms = this.$filteredAtoms.add(e)), e.addClass("no-transition"), (this._isInserting = !0), this.styleQueue.push({ $el: e, style: this.options.hiddenStyle });
},
_revealAppended: function (e, t) {
var i = this;
setTimeout(function () {
e.removeClass("no-transition"), i.styleQueue.push({ $el: e, style: i.options.visibleStyle }), (i._isInserting = !1), i._processStyleQueue(e, t);
}, 10);
},
reloadItems: function () {
this.$allAtoms = this._getAtoms(this.element.children());
},
remove: function (e, t) {
(this.$allAtoms = this.$allAtoms.not(e)), (this.$filteredAtoms = this.$filteredAtoms.not(e));
var i = this,
n = function () {
e.remove(), t && t.call(i.element);
};
e.filter(":not(." + this.options.hiddenClass + ")").length ? (this.styleQueue.push({ $el: e, style: this.options.hiddenStyle }), this._sort(), this.reLayout(n)) : n();
},
shuffle: function (e) {
this.updateSortData(this.$allAtoms), (this.options.sortBy = "random"), this._sort(), this.reLayout(e);
},
destroy: function () {
var e = this.usingTransforms,
t = this.options;
this.$allAtoms.removeClass(t.hiddenClass + " " + t.itemClass).each(function () {
var t = this.style;
(t.position = ""), (t.top = ""), (t.left = ""), (t.opacity = ""), e && (t[c] = "");
});
var i = this.element[0].style;
for (var n in this.originalStyle) i[n] = this.originalStyle[n];
this.element
.unbind(".isotope")
.undelegate("." + t.hiddenClass, "click")
.removeClass(t.containerClass)
.removeData("isotope"),
S.unbind(".isotope");
},
_getSegments: function (e) {
var t,
i = this.options.layoutMode,
n = e ? "rowHeight" : "columnWidth",
o = e ? "height" : "width",
s = e ? "rows" : "cols",
r = this.element[o](),
l = (this.options[i] && this.options[i][n]) || this.$filteredAtoms["outer" + a(o)](!0) || r;
(t = Math.floor(r / l)), (t = Math.max(t, 1)), (this[i][s] = t), (this[i][n] = l);
},
_checkIfSegmentsChanged: function (e) {
var t = this.options.layoutMode,
i = e ? "rows" : "cols",
n = this[t][i];
return this._getSegments(e), this[t][i] !== n;
},
_masonryReset: function () {
(this.masonry = {}), this._getSegments();
var e = this.masonry.cols;
for (this.masonry.colYs = []; e--; ) this.masonry.colYs.push(0);
},
_masonryLayout: function (e) {
var i = this,
n = i.masonry;
e.each(function () {
var e = t(this),
o = Math.ceil(e.outerWidth(!0) / n.columnWidth);
if (((o = Math.min(o, n.cols)), 1 === o)) i._masonryPlaceBrick(e, n.colYs);
else {
var s,
a,
r = n.cols + 1 - o,
l = [];
for (a = 0; r > a; a++) (s = n.colYs.slice(a, a + o)), (l[a] = Math.max.apply(Math, s));
i._masonryPlaceBrick(e, l);
}
});
},
_masonryPlaceBrick: function (e, t) {
for (var i = Math.min.apply(Math, t), n = 0, o = 0, s = t.length; s > o; o++)
if (t[o] === i) {
n = o;
break;
}
var a = this.masonry.columnWidth * n,
r = i;
this._pushPosition(e, a, r);
var l = i + e.outerHeight(!0),
c = this.masonry.cols + 1 - s;
for (o = 0; c > o; o++) this.masonry.colYs[n + o] = l;
},
_masonryGetContainerSize: function () {
var e = Math.max.apply(Math, this.masonry.colYs);
return { height: e };
},
_masonryResizeChanged: function () {
return this._checkIfSegmentsChanged();
},
_fitRowsReset: function () {
this.fitRows = { x: 0, y: 0, height: 0 };
},
_fitRowsLayout: function (e) {
var i = this,
n = this.element.width(),
o = this.fitRows;
e.each(function () {
var e = t(this),
s = e.outerWidth(!0),
a = e.outerHeight(!0);
0 !== o.x && s + o.x > n && ((o.x = 0), (o.y = o.height)), i._pushPosition(e, o.x, o.y), (o.height = Math.max(o.y + a, o.height)), (o.x += s);
});
},
_fitRowsGetContainerSize: function () {
return { height: this.fitRows.height };
},
_fitRowsResizeChanged: function () {
return !0;
},
_cellsByRowReset: function () {
(this.cellsByRow = { index: 0 }), this._getSegments(), this._getSegments(!0);
},
_cellsByRowLayout: function (e) {
var i = this,
n = this.cellsByRow;
e.each(function () {
var e = t(this),
o = n.index % n.cols,
s = Math.floor(n.index / n.cols),
a = (o + 0.5) * n.columnWidth - e.outerWidth(!0) / 2,
r = (s + 0.5) * n.rowHeight - e.outerHeight(!0) / 2;
i._pushPosition(e, a, r), n.index++;
});
},
_cellsByRowGetContainerSize: function () {
return { height: Math.ceil(this.$filteredAtoms.length / this.cellsByRow.cols) * this.cellsByRow.rowHeight + this.offset.top };
},
_cellsByRowResizeChanged: function () {
return this._checkIfSegmentsChanged();
},
_straightDownReset: function () {
this.straightDown = { y: 0 };
},
_straightDownLayout: function (e) {
var i = this;
e.each(function (e) {
var n = t(this);
i._pushPosition(n, 0, i.straightDown.y), (i.straightDown.y += n.outerHeight(!0));
});
},
_straightDownGetContainerSize: function () {
return { height: this.straightDown.y };
},
_straightDownResizeChanged: function () {
return !0;
},
_masonryHorizontalReset: function () {
(this.masonryHorizontal = {}), this._getSegments(!0);
var e = this.masonryHorizontal.rows;
for (this.masonryHorizontal.rowXs = []; e--; ) this.masonryHorizontal.rowXs.push(0);
},
_masonryHorizontalLayout: function (e) {
var i = this,
n = i.masonryHorizontal;
e.each(function () {
var e = t(this),
o = Math.ceil(e.outerHeight(!0) / n.rowHeight);
if (((o = Math.min(o, n.rows)), 1 === o)) i._masonryHorizontalPlaceBrick(e, n.rowXs);
else {
var s,
a,
r = n.rows + 1 - o,
l = [];
for (a = 0; r > a; a++) (s = n.rowXs.slice(a, a + o)), (l[a] = Math.max.apply(Math, s));
i._masonryHorizontalPlaceBrick(e, l);
}
});
},
_masonryHorizontalPlaceBrick: function (e, t) {
for (var i = Math.min.apply(Math, t), n = 0, o = 0, s = t.length; s > o; o++)
if (t[o] === i) {
n = o;
break;
}
var a = i,
r = this.masonryHorizontal.rowHeight * n;
this._pushPosition(e, a, r);
var l = i + e.outerWidth(!0),
c = this.masonryHorizontal.rows + 1 - s;
for (o = 0; c > o; o++) this.masonryHorizontal.rowXs[n + o] = l;
},
_masonryHorizontalGetContainerSize: function () {
var e = Math.max.apply(Math, this.masonryHorizontal.rowXs);
return { width: e };
},
_masonryHorizontalResizeChanged: function () {
return this._checkIfSegmentsChanged(!0);
},
_fitColumnsReset: function () {
this.fitColumns = { x: 0, y: 0, width: 0 };
},
_fitColumnsLayout: function (e) {
var i = this,
n = this.element.height(),
o = this.fitColumns;
e.each(function () {
var e = t(this),
s = e.outerWidth(!0),
a = e.outerHeight(!0);
0 !== o.y && a + o.y > n && ((o.x = o.width), (o.y = 0)), i._pushPosition(e, o.x, o.y), (o.width = Math.max(o.x + s, o.width)), (o.y += a);
});
},
_fitColumnsGetContainerSize: function () {
return { width: this.fitColumns.width };
},
_fitColumnsResizeChanged: function () {
return !0;
},
_cellsByColumnReset: function () {
(this.cellsByColumn = { index: 0 }), this._getSegments(), this._getSegments(!0);
},
_cellsByColumnLayout: function (e) {
var i = this,
n = this.cellsByColumn;
e.each(function () {
var e = t(this),
o = Math.floor(n.index / n.rows),
s = n.index % n.rows,
a = (o + 0.5) * n.columnWidth - e.outerWidth(!0) / 2,
r = (s + 0.5) * n.rowHeight - e.outerHeight(!0) / 2;
i._pushPosition(e, a, r), n.index++;
});
},
_cellsByColumnGetContainerSize: function () {
return { width: Math.ceil(this.$filteredAtoms.length / this.cellsByColumn.rows) * this.cellsByColumn.columnWidth };
},
_cellsByColumnResizeChanged: function () {
return this._checkIfSegmentsChanged(!0);
},
_straightAcrossReset: function () {
this.straightAcross = { x: 0 };
},
_straightAcrossLayout: function (e) {
var i = this;
e.each(function (e) {
var n = t(this);
i._pushPosition(n, i.straightAcross.x, 0), (i.straightAcross.x += n.outerWidth(!0));
});
},
_straightAcrossGetContainerSize: function () {
return { width: this.straightAcross.x };
},
_straightAcrossResizeChanged: function () {
return !0;
},
}),
(t.fn.imagesLoaded = function (e) {
function i() {
e.call(o, s);
}
function n(e) {
var o = e.target;
o.src !== r && -1 === t.inArray(o, l) && (l.push(o), --a <= 0 && (setTimeout(i), s.unbind(".imagesLoaded", n)));
}
var o = this,
s = o.find("img").add(o.filter("img")),
a = s.length,
r = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",
l = [];
return (
a || i(),
s.bind("load.imagesLoaded error.imagesLoaded", n).each(function () {
var e = this.src;
(this.src = r), (this.src = e);
}),
o
);
});
var C = function (t) {
e.console && e.console.error(t);
};
t.fn.isotope = function (e, i) {
if ("string" == typeof e) {
var n = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var i = t.data(this, "isotope");
return i
? t.isFunction(i[e]) && "_" !== e.charAt(0)
? void i[e].apply(i, n)
: void C("no such method '" + e + "' for isotope instance")
: void C("cannot call methods on isotope prior to initialization; attempted to call method '" + e + "'");
});
} else
this.each(function () {
var n = t.data(this, "isotope");
n ? (n.option(e), n._init(i)) : t.data(this, "isotope", new t.Isotope(e, this, i));
});
return this;
};
})(window, jQuery),
(function (e) {
"use strict";
e.fn.counterUp = function (t) {
var i = e.extend({ time: 400, delay: 10 }, t);
return this.each(function () {
var t = e(this),
n = i,
o = function () {
var e = [],
i = n.time / n.delay,
o = t.text(),
s = /[0-9]+,[0-9]+/.test(o);
o = o.replace(/,/g, "");
for (var a = (/^[0-9]+$/.test(o), /^[0-9]+\.[0-9]+$/.test(o)), r = a ? (o.split(".")[1] || []).length : 0, l = i; l >= 1; l--) {
var c = parseInt((o / i) * l);
if ((a && (c = parseFloat((o / i) * l).toFixed(r)), s)) for (; /(\d+)(\d{3})/.test(c.toString()); ) c = c.toString().replace(/(\d+)(\d{3})/, "$1,$2");
e.unshift(c);
}
t.data("counterup-nums", e), t.text("0");
var d = function () {
t.text(t.data("counterup-nums").shift()),
t.data("counterup-nums").length ? setTimeout(t.data("counterup-func"), n.delay) : (delete t.data("counterup-nums"), t.data("counterup-nums", null), t.data("counterup-func", null));
};
t.data("counterup-func", d), setTimeout(t.data("counterup-func"), n.delay);
};
t.waypoint(o, { offset: "100%", triggerOnce: !0 });
});
};
})(jQuery),
function () {
var e =
[].indexOf ||
function (e) {
for (var t = 0, i = this.length; i > t; t++) if (t in this && this[t] === e) return t;
return -1;
},
t = [].slice;
!(function (e, t) {
return "function" == typeof define && define.amd
? define("waypoints", ["jquery"], function (i) {
return t(i, e);
})
: t(e.jQuery, e);
})(this, function (i, n) {
var o, s, a, r, l, c, d, h, u, p, f, m, g, v, w, y;
return (
(o = i(n)),
(h = e.call(n, "ontouchstart") >= 0),
(r = { horizontal: {}, vertical: {} }),
(l = 1),
(d = {}),
(c = "waypoints-context-id"),
(f = "resize.waypoints"),
(m = "scroll.waypoints"),
(g = 1),
(v = "waypoints-waypoint-ids"),
(w = "waypoint"),
(y = "waypoints"),
(s = (function () {
function e(e) {
var t = this;
(this.$element = e),
(this.element = e[0]),
(this.didResize = !1),
(this.didScroll = !1),
(this.id = "context" + l++),
(this.oldScroll = { x: e.scrollLeft(), y: e.scrollTop() }),
(this.waypoints = { horizontal: {}, vertical: {} }),
e.data(c, this.id),
(d[this.id] = this),
e.bind(m, function () {
var e;
return t.didScroll || h
? void 0
: ((t.didScroll = !0),
(e = function () {
return t.doScroll(), (t.didScroll = !1);
}),
n.setTimeout(e, i[y].settings.scrollThrottle));
}),
e.bind(f, function () {
var e;
return t.didResize
? void 0
: ((t.didResize = !0),
(e = function () {
return i[y]("refresh"), (t.didResize = !1);
}),
n.setTimeout(e, i[y].settings.resizeThrottle));
});
}
return (
(e.prototype.doScroll = function () {
var e,
t = this;
return (
(e = {
horizontal: { newScroll: this.$element.scrollLeft(), oldScroll: this.oldScroll.x, forward: "right", backward: "left" },
vertical: { newScroll: this.$element.scrollTop(), oldScroll: this.oldScroll.y, forward: "down", backward: "up" },
}),
!h || (e.vertical.oldScroll && e.vertical.newScroll) || i[y]("refresh"),
i.each(e, function (e, n) {
var o, s, a;
return (
(a = []),
(s = n.newScroll > n.oldScroll),
(o = s ? n.forward : n.backward),
i.each(t.waypoints[e], function (e, t) {
var i, o;
return n.oldScroll < (i = t.offset) && i <= n.newScroll ? a.push(t) : n.newScroll < (o = t.offset) && o <= n.oldScroll ? a.push(t) : void 0;
}),
a.sort(function (e, t) {
return e.offset - t.offset;
}),
s || a.reverse(),
i.each(a, function (e, t) {
return t.options.continuous || e === a.length - 1 ? t.trigger([o]) : void 0;
})
);
}),
(this.oldScroll = { x: e.horizontal.newScroll, y: e.vertical.newScroll })
);
}),
(e.prototype.refresh = function () {
var e,
t,
n,
o = this;
return (
(n = i.isWindow(this.element)),
(t = this.$element.offset()),
this.doScroll(),
(e = {
horizontal: {
contextOffset: n ? 0 : t.left,
contextScroll: n ? 0 : this.oldScroll.x,
contextDimension: this.$element.width(),
oldScroll: this.oldScroll.x,
forward: "right",
backward: "left",
offsetProp: "left",
},
vertical: {
contextOffset: n ? 0 : t.top,
contextScroll: n ? 0 : this.oldScroll.y,
contextDimension: n ? i[y]("viewportHeight") : this.$element.height(),
oldScroll: this.oldScroll.y,
forward: "down",
backward: "up",
offsetProp: "top",
},
}),
i.each(e, function (e, t) {
return i.each(o.waypoints[e], function (e, n) {
var o, s, a, r, l;
return (
(o = n.options.offset),
(a = n.offset),
(s = i.isWindow(n.element) ? 0 : n.$element.offset()[t.offsetProp]),
i.isFunction(o) ? (o = o.apply(n.element)) : "string" == typeof o && ((o = parseFloat(o)), n.options.offset.indexOf("%") > -1 && (o = Math.ceil((t.contextDimension * o) / 100))),
(n.offset = s - t.contextOffset + t.contextScroll - o),
(n.options.onlyOnScroll && null != a) || !n.enabled
? void 0
: null !== a && a < (r = t.oldScroll) && r <= n.offset
? n.trigger([t.backward])
: null !== a && a > (l = t.oldScroll) && l >= n.offset
? n.trigger([t.forward])
: null === a && t.oldScroll >= n.offset
? n.trigger([t.forward])
: void 0
);
});
})
);
}),
(e.prototype.checkEmpty = function () {
return i.isEmptyObject(this.waypoints.horizontal) && i.isEmptyObject(this.waypoints.vertical) ? (this.$element.unbind([f, m].join(" ")), delete d[this.id]) : void 0;
}),
e
);
})()),
(a = (function () {
function e(e, t, n) {
var o, s;
(n = i.extend({}, i.fn[w].defaults, n)),
"bottom-in-view" === n.offset &&
(n.offset = function () {
var e;
return (e = i[y]("viewportHeight")), i.isWindow(t.element) || (e = t.$element.height()), e - i(this).outerHeight();
}),
(this.$element = e),
(this.element = e[0]),
(this.axis = n.horizontal ? "horizontal" : "vertical"),
(this.callback = n.handler),
(this.context = t),
(this.enabled = n.enabled),
(this.id = "waypoints" + g++),
(this.offset = null),
(this.options = n),
(t.waypoints[this.axis][this.id] = this),
(r[this.axis][this.id] = this),
(o = null != (s = e.data(v)) ? s : []),
o.push(this.id),
e.data(v, o);
}
return (
(e.prototype.trigger = function (e) {
return this.enabled ? (null != this.callback && this.callback.apply(this.element, e), this.options.triggerOnce ? this.destroy() : void 0) : void 0;
}),
(e.prototype.disable = function () {
return (this.enabled = !1);
}),
(e.prototype.enable = function () {
return this.context.refresh(), (this.enabled = !0);
}),
(e.prototype.destroy = function () {
return delete r[this.axis][this.id], delete this.context.waypoints[this.axis][this.id], this.context.checkEmpty();
}),
(e.getWaypointsByElement = function (e) {
var t, n;
return (n = i(e).data(v))
? ((t = i.extend({}, r.horizontal, r.vertical)),
i.map(n, function (e) {
return t[e];
}))
: [];
}),
e
);
})()),
(p = {
init: function (e, t) {
var n;
return (
null == t && (t = {}),
null == (n = t.handler) && (t.handler = e),
this.each(function () {
var e, n, o, r;
return (e = i(this)), (o = null != (r = t.context) ? r : i.fn[w].defaults.context), i.isWindow(o) || (o = e.closest(o)), (o = i(o)), (n = d[o.data(c)]), n || (n = new s(o)), new a(e, n, t);
}),
i[y]("refresh"),
this
);
},
disable: function () {
return p._invoke(this, "disable");
},
enable: function () {
return p._invoke(this, "enable");
},
destroy: function () {
return p._invoke(this, "destroy");
},
prev: function (e, t) {
return p._traverse.call(this, e, t, function (e, t, i) {
return t > 0 ? e.push(i[t - 1]) : void 0;
});
},
next: function (e, t) {
return p._traverse.call(this, e, t, function (e, t, i) {
return t < i.length - 1 ? e.push(i[t + 1]) : void 0;
});
},
_traverse: function (e, t, o) {
var s, a;
return (
null == e && (e = "vertical"),
null == t && (t = n),
(a = u.aggregate(t)),
(s = []),
this.each(function () {
var t;
return (t = i.inArray(this, a[e])), o(s, t, a[e]);
}),
this.pushStack(s)
);
},
_invoke: function (e, t) {
return (
e.each(function () {
var e;
return (
(e = a.getWaypointsByElement(this)),
i.each(e, function (e, i) {
return i[t](), !0;
})
);
}),
this
);
},
}),
(i.fn[w] = function () {
var e, n;
return (
(n = arguments[0]),
(e = 2 <= arguments.length ? t.call(arguments, 1) : []),
p[n]
? p[n].apply(this, e)
: i.isFunction(n)
? p.init.apply(this, arguments)
: i.isPlainObject(n)
? p.init.apply(this, [null, n])
: n
? i.error("The " + n + " method does not exist in jQuery Waypoints.")
: i.error("jQuery Waypoints needs a callback function or handler option.")
);
}),
(i.fn[w].defaults = { context: n, continuous: !0, enabled: !0, horizontal: !1, offset: 0, triggerOnce: !1 }),
(u = {
refresh: function () {
return i.each(d, function (e, t) {
return t.refresh();
});
},
viewportHeight: function () {
var e;
return null != (e = n.innerHeight) ? e : o.height();
},
aggregate: function (e) {
var t, n, o;
return (
(t = r),
e && (t = null != (o = d[i(e).data(c)]) ? o.waypoints : void 0),
t
? ((n = { horizontal: [], vertical: [] }),
i.each(n, function (e, o) {
return (
i.each(t[e], function (e, t) {
return o.push(t);
}),
o.sort(function (e, t) {
return e.offset - t.offset;
}),
(n[e] = i.map(o, function (e) {
return e.element;
})),
(n[e] = i.unique(n[e]))
);
}),
n)
: []
);
},
above: function (e) {
return (
null == e && (e = n),
u._filter(e, "vertical", function (e, t) {
return t.offset <= e.oldScroll.y;
})
);
},
below: function (e) {
return (
null == e && (e = n),
u._filter(e, "vertical", function (e, t) {
return t.offset > e.oldScroll.y;
})
);
},
left: function (e) {
return (
null == e && (e = n),
u._filter(e, "horizontal", function (e, t) {
return t.offset <= e.oldScroll.x;
})
);
},
right: function (e) {
return (
null == e && (e = n),
u._filter(e, "horizontal", function (e, t) {
return t.offset > e.oldScroll.x;
})
);
},
enable: function () {
return u._invoke("enable");
},
disable: function () {
return u._invoke("disable");
},
destroy: function () {
return u._invoke("destroy");
},
extendFn: function (e, t) {
return (p[e] = t);
},
_invoke: function (e) {
var t;
return (
(t = i.extend({}, r.vertical, r.horizontal)),
i.each(t, function (t, i) {
return i[e](), !0;
})
);
},
_filter: function (e, t, n) {
var o, s;
return (o = d[i(e).data(c)])
? ((s = []),
i.each(o.waypoints[t], function (e, t) {
return n(o, t) ? s.push(t) : void 0;
}),
s.sort(function (e, t) {
return e.offset - t.offset;
}),
i.map(s, function (e) {
return e.element;
}))
: [];
},
}),
(i[y] = function () {
var e, i;
return (i = arguments[0]), (e = 2 <= arguments.length ? t.call(arguments, 1) : []), u[i] ? u[i].apply(null, e) : u.aggregate.call(null, i);
}),
(i[y].settings = { resizeThrottle: 100, scrollThrottle: 30 }),
o.load(function () {
return i[y]("refresh");
})
);
});
}.call(this),
(function (e) {
"use strict";
e.fn.fitVids = function (t) {
var i = { customSelector: null };
if (!document.getElementById("fit-vids-style")) {
var n = document.createElement("div"),
o = document.getElementsByTagName("base")[0] || document.getElementsByTagName("script")[0],
s =
"­<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>";
(n.className = "fit-vids-style"), (n.id = "fit-vids-style"), (n.style.display = "none"), (n.innerHTML = s), o.parentNode.insertBefore(n, o);
}
return (
t && e.extend(i, t),
this.each(function () {
var t = ["iframe[src*='player.vimeo.com']", "iframe[src*='youtube.com']", "iframe[src*='youtube-nocookie.com']", "iframe[src*='kickstarter.com'][src*='video.html']", "object", "embed"];
i.customSelector && t.push(i.customSelector);
var n = e(this).find(t.join(","));
(n = n.not("object object")),
n.each(function () {
var t = e(this);
if (!(("embed" === this.tagName.toLowerCase() && t.parent("object").length) || t.parent(".fluid-width-video-wrapper").length)) {
var i = "object" === this.tagName.toLowerCase() || (t.attr("height") && !isNaN(parseInt(t.attr("height"), 10))) ? parseInt(t.attr("height"), 10) : t.height(),
n = isNaN(parseInt(t.attr("width"), 10)) ? t.width() : parseInt(t.attr("width"), 10),
o = i / n;
if (!t.attr("id")) {
var s = "fitvid" + Math.floor(999999 * Math.random());
t.attr("id", s);
}
t
.wrap('<div class="fluid-width-video-wrapper"></div>')
.parent(".fluid-width-video-wrapper")
.css("padding-top", 100 * o + "%"),
t.removeAttr("height").removeAttr("width");
}
});
})
);
};
})(window.jQuery || window.Zepto),
/*
== Page scroll to id ==
Version: 1.6.8
Plugin URI: http://manos.malihu.gr/page-scroll-to-id/
Author: malihu
Author URI: http://manos.malihu.gr
License: MIT License (MIT)
*/
/*
Copyright 2013 malihu (email: manos@malihu.gr)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
(function($,window,document,undefined){
/* plugin namespace, prefix, default selector(s) */
var pluginNS="mPageScroll2id",
pluginPfx="mPS2id",
defaultSelector=".m_PageScroll2id,a[rel~='m_PageScroll2id'],.page-scroll-to-id,a[rel~='page-scroll-to-id'],._ps2id",
/* default options */
defaults={
/* scroll animation speed in milliseconds: Integer */
scrollSpeed:1000,
/* auto-adjust animation speed (according to target element position and window scroll): Boolean */
autoScrollSpeed:true,
/* scroll animation easing when page is idle: String */
scrollEasing:"easeInOutQuint",
/* scroll animation easing while page is scrolling: String */
scrollingEasing:"easeOutQuint",
/* end of page "smooth scrolling" (auto-adjust the scroll-to position when bottom elements are too short): Boolean */
pageEndSmoothScroll:true,
/*
page layout defines scrolling direction: String
values: "vertical", "horizontal", "auto"
*/
layout:"vertical",
/* extra space in pixels for the target element position: Integer */
offset:0,
/* highlight the main/default selectors or insert a different set: Boolean, String */
highlightSelector:false,
/* class of the clicked element: String */
clickedClass:pluginPfx+"-clicked",
/* class of the current target element: String */
targetClass:pluginPfx+"-target",
/* class of the highlighted element: String */
highlightClass:pluginPfx+"-highlight",
/* force a single highlighted element each time: Boolean */
forceSingleHighlight:false,
/* keep element highlighted until next (one element always stays highlighted): boolean */
keepHighlightUntilNext:false,
/* highlight elements according to their target and next target position (useful when targets have zero dimensions). Non "auto" layouts only: boolean */
highlightByNextTarget:false,
/* disable plugin below [x,y] screen size: boolean, integer, array ([x,y]) */
disablePluginBelow:false,
/* enable/disable click events for all selectors */
clickEvents:true,
/* append hash to URL/address bar */
appendHash:false,
/* user callback functions: fn */
onStart:function(){},
onComplete:function(){},
/* enable/disable the default selector: Boolean */
defaultSelector:false,
/* highlight elements now and in the future */
live:true,
/* set specific live selector(s): String */
liveSelector:false,
/* set specific selector(s) that will be excluded from being handled by the plugin: String */
excludeSelectors:false,
/* enable encodeURI for links (enable if your links have href values with UTF-8 encoding): boolean */
encodeLinks:false,
/* enable to run the script inside iframe */
inIframe:false
},
/* vars, constants */
selector,opt,_init,_trigger,_clicked,_target,_to,_axis,_offset,_dataOffset,_totalInstances=0,_liveTimer,_speed,
specialChars=/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/,
/*
---------------
methods
---------------
*/
methods={
/* plugin initialization method */
init:function(options){
/* extend options, store each option in jquery data */
var options=$.extend(true,{},defaults,options);
$(document).data(pluginPfx,options);
opt=$(document).data(pluginPfx);
/* check/set jquery (deprecated) selector property if not defined */
if(!this.selector){
var selectorClass="__"+pluginPfx;
this.each(function(){
var el=$(this);
if(!el.hasClass(selectorClass)){
el.addClass(selectorClass);
}
});
this.selector="."+selectorClass;
}
/* live selector */
if(opt.liveSelector) this.selector+=","+opt.liveSelector;
/* set selector */
selector=(!selector) ? this.selector : selector+","+this.selector;
if(opt.defaultSelector){
if(typeof $(selector)!=="object" || $(selector).length===0){
selector=defaultSelector;
}
}
/* plugin events */
if(opt.clickEvents){
$(document)
.off("."+pluginPfx)
.on("click."+pluginPfx,selector,function(e){
if(functions._isDisabled.call(null)){
functions._removeClasses.call(null);
return;
}
var $this=$(this),
href=$this.attr("href"),
hrefProp=$this.prop("href").baseVal || $this.prop("href");
if(opt.excludeSelectors && $this.is(opt.excludeSelectors)){ //excluded selectors
return;
}
if(href && href.indexOf("#/")!==-1){
return;
}
functions._reset.call(null);
_dataOffset=$this.data("ps2id-offset") || 0;
if(functions._isValid.call(null,href,hrefProp) && functions._findTarget.call(null,href)){
e.preventDefault();
_trigger="selector";
_clicked=$this;
functions._setClasses.call(null,true);
functions._scrollTo.call(null);
}
});
}
$(window)
.off("."+pluginPfx)
.on("scroll."+pluginPfx+" resize."+pluginPfx,function(){
if(functions._isDisabled.call(null)){
functions._removeClasses.call(null);
return;
}
var targets=$("._"+pluginPfx+"-t");
targets.each(function(i){
var t=$(this),id=t.attr("id"),
h=functions._findHighlight.call(null,id);
functions._setClasses.call(null,false,t,h);
if(i==targets.length-1){functions._extendClasses.call(null);}
});
});
/* plugin has initialized */
_init=true;
/* setup selectors, target elements, basic plugin classes etc. */
functions._setup.call(null);
/*
monitor for elements matching the current highlight selector and call plugin setup when found (now and in the future)
to manually enable/disable: $(document).data("mPS2id").live=boolean
*/
functions._live.call(null);
},
/* scrollTo method */
scrollTo:function(id,options){
if(functions._isDisabled.call(null)){
functions._removeClasses.call(null);
return;
}
if(id && typeof id!=="undefined"){
functions._isInit.call(null);
var defaults={
layout:opt.layout,
offset:opt.offset,
clicked:false
},
options=$.extend(true,{},defaults,options);
functions._reset.call(null);
_axis=options.layout;
_offset=options.offset;
id=(id.indexOf("#")!==-1) ? id : "#"+id;
if(functions._isValid.call(null,id) && functions._findTarget.call(null,id)){
_trigger="scrollTo";
_clicked=options.clicked;
if(_clicked){
functions._setClasses.call(null,true);
}
functions._scrollTo.call(null);
}
}
},
/* destroy method */
destroy:function(){
$(window).off("."+pluginPfx);
$(document).off("."+pluginPfx).removeData(pluginPfx);
$("._"+pluginPfx+"-t").removeData(pluginPfx);
functions._removeClasses.call(null,true);
}
},
/*
---------------
functions
---------------
*/
functions={
/* checks if screen size ([x,y]) is below the value(s) set in disablePluginBelow option */
_isDisabled:function(){
var e=window,a="inner",
val=opt.disablePluginBelow instanceof Array ? [opt.disablePluginBelow[0] || 0,opt.disablePluginBelow[1] || 0] : [opt.disablePluginBelow || 0,0];
if(!("innerWidth" in window )){
a="client";
e=document.documentElement || document.body;
}
return e[a+"Width"]<=val[0] || e[a+"Height"]<=val[1];
},
/* checks if href attribute is valid */
_isValid:function(href,hrefProp){
if(!href){
return;
}
hrefProp=(!hrefProp) ? href : hrefProp;
var str=(hrefProp.indexOf("#/")!==-1) ? hrefProp.split("#/")[0] : hrefProp.split("#")[0],
wloc=!opt.inIframe && window.location !== window.parent.location ? window.parent.location : window.location,
loc=wloc.toString().split("#")[0];
return href!=="#" && href.indexOf("#")!==-1 && (str==="" || decodeURIComponent(str)===decodeURIComponent(loc));
},
/* setup selectors, target elements, basic plugin classes etc. */
_setup:function(){
var el=functions._highlightSelector(),i=1,tp=0;
return $(el).each(function(){
var $this=$(this),href=$this.attr("href"),hrefProp=$this.prop("href").baseVal || $this.prop("href");
if(functions._isValid.call(null,href,hrefProp)){
if(opt.excludeSelectors && $this.is(opt.excludeSelectors)){ //excluded selectors
return;
}
var id=(href.indexOf("#/")!==-1) ? href.split("#/")[1] : href.substring(href.indexOf('#')+1), //we're not using str.split("#")[1] because we want only the first occurrence of # in case the id has # in its actual name
t=specialChars.test(id) ? $(document.getElementById(id)) : $("#"+id); //fix bug with special characters like %, ?, & etc. in selector
if(t.length>0){
if(opt.highlightByNextTarget){
if(t!==tp){
if(!tp){t.data(pluginPfx,{tn:"0"});}else{tp.data(pluginPfx,{tn:t});}
tp=t;
}
}
if(!t.hasClass("_"+pluginPfx+"-t")){
t.addClass("_"+pluginPfx+"-t");
}
t.data(pluginPfx,{i:i});
if(!$this.hasClass("_"+pluginPfx+"-h")){
$this.addClass("_"+pluginPfx+"-h");
}
var h=functions._findHighlight.call(null,id);
functions._setClasses.call(null,false,t,h);
_totalInstances=i;
i++
if(i==$(el).length){functions._extendClasses.call(null);}
}
}
});
},
/* returns the highlight selector */
_highlightSelector:function(){
return (opt.highlightSelector && opt.highlightSelector!=="") ? opt.highlightSelector : selector;
},
/* finds the target element */
_findTarget:function(str){
var val=(str.indexOf("#/")!==-1) ? str.split("#/")[1] : str.substring(str.indexOf('#')+1), //we're not using str.split("#")[1] because we want only the first occurrence of # in case the id has # in its actual name
el=specialChars.test(val) ? $(document.getElementById(val)) : $("#"+val); //fix bug with special characters like %, ?, & etc. in selector
if(el.length<1 || el.css("position")==="fixed"){
if(val==="top"){
el=$("body");
}else{
return;
}
}
_target=el;
if(!_axis){
_axis=opt.layout;
}
_offset=functions._setOffset.call(null);
_to=[(el.offset().top-_offset[0]).toString(),(el.offset().left-_offset[1]).toString()];
_to[0]=(_to[0]<0) ? 0 : _to[0];
_to[1]=(_to[1]<0) ? 0 : _to[1];
return _to;
},
/* sets the offset value (pixels, objects etc.) */
_setOffset:function(){
if(!_offset){
_offset=(opt.offset) ? opt.offset : 0;
}
if(_dataOffset){
_offset=_dataOffset;
}
var val,obj,y,x;
switch(typeof _offset){
case "object":
case "string":
val=[(_offset["y"]) ? _offset["y"] : _offset,(_offset["x"]) ? _offset["x"] : _offset];
obj=[(val[0] instanceof jQuery) ? val[0] : $(val[0]),(val[1] instanceof jQuery) ? val[1] : $(val[1])];
if(obj[0].length>0){ // js/jquery object
y=obj[0].height();
if(obj[0].css("position")==="fixed"){ // include position for fixed elements
y+=obj[0][0].offsetTop;
}
}else if(!isNaN(parseFloat(val[0])) && isFinite(val[0])){ // numeric string
y=parseInt(val[0]);
}else{
y=0; // non-existing value
}
if(obj[1].length>0){ // js/jquery object
x=obj[1].width();
if(obj[1].css("position")==="fixed"){ // include position for fixed elements
x+=obj[1][0].offsetLeft;
}
}else if(!isNaN(parseFloat(val[1])) && isFinite(val[1])){ // numeric string
x=parseInt(val[1]);
}else{
x=0; // non-existing value
}
break;
case "function":
val=_offset.call(null); // function (single value or array)
if(val instanceof Array){
y=val[0];
x=val[1];
}else{
y=x=val;
}
break;
default:
y=x=parseInt(_offset); // number
}
return [y,x];
},
/* finds the element that should be highlighted */
_findHighlight:function(id){
var wLoc=!opt.inIframe && window.location !== window.parent.location ? window.parent.location : window.location,
loc=wLoc.toString().split("#")[0],
locPath=wLoc.pathname;
if(loc.indexOf("'")!==-1) loc=loc.replace("'","\\'");
if(locPath.indexOf("'")!==-1) locPath=locPath.replace("'","\\'");
loc=decodeURIComponent(loc);
locPath=decodeURIComponent(locPath);
if(opt.encodeLinks){
var locEnc=encodeURI(loc).toLowerCase(),locPathEnc=encodeURI(locPath).toLowerCase();
return $("._"+pluginPfx+"-h[href='#"+id+"'],._"+pluginPfx+"-h[href='"+loc+"#"+id+"'],._"+pluginPfx+"-h[href='"+locPath+"#"+id+"'],._"+pluginPfx+"-h[href='#/"+id+"'],._"+pluginPfx+"-h[href='"+loc+"#/"+id+"'],._"+pluginPfx+"-h[href='"+locPath+"#/"+id+"'],._"+pluginPfx+"-h[href='"+locEnc+"#/"+id+"'],._"+pluginPfx+"-h[href='"+locEnc+"#"+id+"'],._"+pluginPfx+"-h[href='"+locPathEnc+"#/"+id+"'],._"+pluginPfx+"-h[href='"+locPathEnc+"#"+id+"']");
}else{
return $("._"+pluginPfx+"-h[href='#"+id+"'],._"+pluginPfx+"-h[href='"+loc+"#"+id+"'],._"+pluginPfx+"-h[href='"+locPath+"#"+id+"'],._"+pluginPfx+"-h[href='#/"+id+"'],._"+pluginPfx+"-h[href='"+loc+"#/"+id+"'],._"+pluginPfx+"-h[href='"+locPath+"#/"+id+"']");
}
},
/* sets plugin classes */
_setClasses:function(c,t,h){
var cc=opt.clickedClass,tc=opt.targetClass,hc=opt.highlightClass;
if(c && cc && cc!==""){
$("."+cc).removeClass(cc);
_clicked.addClass(cc);
}else if(t && tc && tc!=="" && h && hc && hc!==""){
if(functions._currentTarget.call(null,t)){
t.addClass(tc);
h.addClass(hc);
}else{
if(!opt.keepHighlightUntilNext || $("."+hc).length>1){
t.removeClass(tc);
h.removeClass(hc);
}
}
}
},
/* extends plugin classes */
_extendClasses:function(){
var tc=opt.targetClass,hc=opt.highlightClass,
$tc=$("."+tc),$hc=$("."+hc),ftc=tc+"-first",ltc=tc+"-last",fhc=hc+"-first",lhc=hc+"-last";
$("._"+pluginPfx+"-t").removeClass(ftc+" "+ltc);
$("._"+pluginPfx+"-h").removeClass(fhc+" "+lhc);
if(!opt.forceSingleHighlight){
$tc.slice(0,1).addClass(ftc).end().slice(-1).addClass(ltc);
$hc.slice(0,1).addClass(fhc).end().slice(-1).addClass(lhc);
}else{
if(opt.keepHighlightUntilNext && $tc.length>1){
$tc.slice(0,1).removeClass(tc); $hc.slice(0,1).removeClass(hc);
}else{
$tc.slice(1).removeClass(tc); $hc.slice(1).removeClass(hc);
}
}
},
/* removes plugin classes */
_removeClasses:function(destroy){
$("."+opt.clickedClass).removeClass(opt.clickedClass);
$("."+opt.targetClass).removeClass(opt.targetClass+" "+opt.targetClass+"-first "+opt.targetClass+"-last");
$("."+opt.highlightClass).removeClass(opt.highlightClass+" "+opt.highlightClass+"-first "+opt.highlightClass+"-last");
if(destroy){
$("._"+pluginPfx+"-t").removeClass("_"+pluginPfx+"-t");
$("._"+pluginPfx+"-h").removeClass("_"+pluginPfx+"-h");
}
},
/* checks if target element is in viewport */
_currentTarget:function(t){
if(!t.data(pluginPfx)) return; //handle Uncaught TypeError (undefined data)
var o=opt["target_"+t.data(pluginPfx).i],
dataTarget=t.data("ps2id-target"),
rect=dataTarget && $(dataTarget)[0] ? $(dataTarget)[0].getBoundingClientRect() : t[0].getBoundingClientRect();
if(typeof o!=="undefined"){
var y=t.offset().top,x=t.offset().left,
from=(o.from) ? o.from+y : y,to=(o.to) ? o.to+y : y,
fromX=(o.fromX) ? o.fromX+x : x,toX=(o.toX) ? o.toX+x : x;
return(
rect.top >= to && rect.top <= from &&
rect.left >= toX && rect.left <= fromX
);
}else{
var wh=$(window).height(),ww=$(window).width(),
th=dataTarget ? $(dataTarget).height() : t.height(),tw=dataTarget ? $(dataTarget).width() : t.width(),
base=1+(th/wh),
top=base,bottom=(th<wh) ? base*(wh/th) : base,
baseX=1+(tw/ww),
left=baseX,right=(tw<ww) ? baseX*(ww/tw) : baseX,
val=[rect.top <= wh/top,rect.bottom >= wh/bottom,rect.left <= ww/left,rect.right >= ww/right];
if(opt.highlightByNextTarget){
var tn=t.data(pluginPfx).tn;
if(tn){
var rectn=tn[0].getBoundingClientRect();
if(opt.layout==="vertical"){
val=[rect.top <= wh/2,rectn.top > wh/2,1,1];
}else if(opt.layout==="horizontal"){
val=[1,1,rect.left <= ww/2,rectn.left > ww/2];
}
}
}
return(val[0] && val[1] && val[2] && val[3]);
}
},
/* scrolls the page */
_scrollTo:function(){
_speed=functions._scrollSpeed.call(null);
_to=(opt.pageEndSmoothScroll) ? functions._pageEndSmoothScroll.call(null) : _to;
var _scrollable=$("html,body"),
speed=(opt.autoScrollSpeed) ? functions._autoScrollSpeed.call(null) : _speed,
easing=(_scrollable.is(":animated")) ? opt.scrollingEasing : opt.scrollEasing,
_t=$(window).scrollTop(),_l=$(window).scrollLeft();
switch(_axis){
case "horizontal":
if(_l!=_to[1]){
functions._callbacks.call(null,"onStart");
_scrollable.stop().animate({scrollLeft:_to[1]},speed,easing).promise().then(function(){
functions._callbacks.call(null,"onComplete");
});
}
break;
case "auto":
if(_t!=_to[0] || _l!=_to[1]){
functions._callbacks.call(null,"onStart");
if(navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/)){ // mobile fix
var left;
_scrollable.stop().animate({pageYOffset:_to[0],pageXOffset:_to[1]},{
duration:speed,
easing:easing,
step:function(now,fx){
if(fx.prop=='pageXOffset'){
left=now;
}else if(fx.prop=='pageYOffset'){
window.scrollTo(left,now);
}
}
}).promise().then(function(){
functions._callbacks.call(null,"onComplete");
});
}else{
_scrollable.stop().animate({scrollTop:_to[0],scrollLeft:_to[1]},speed,easing).promise().then(function(){
functions._callbacks.call(null,"onComplete");
});
}
}
break;
default:
if(_t!=_to[0]){
functions._callbacks.call(null,"onStart");
_scrollable.stop().animate({scrollTop:_to[0]},speed,easing).promise().then(function(){
functions._callbacks.call(null,"onComplete");
});
}
}
},
/* sets end of page "smooth scrolling" position */
_pageEndSmoothScroll:function(){
var _dh=$(document).height(),_dw=$(document).width(),
_wh=$(window).height(),_ww=$(window).width();
return [((_dh-_to[0])<_wh) ? _dh-_wh : _to[0],((_dw-_to[1])<_ww) ? _dw-_ww : _to[1]];
},
/* sets animation speed (link-specific speed via ps2id-speed-VALUE class on link or link's parent) */
_scrollSpeed:function(){
var speed=opt.scrollSpeed;
if(_clicked && _clicked.length){
_clicked.add(_clicked.parent()).each(function(){
var $this=$(this);
if($this.attr("class")){
var clickedClasses=$this.attr("class").split(" ");
for(var index in clickedClasses){
if(String(clickedClasses[index]).match(/^ps2id-speed-\d+$/)){
speed=clickedClasses[index].split("ps2id-speed-")[1];
break;
}
}
}
});
}
return parseInt(speed);
},
/* sets the auto-adjusted animation speed */
_autoScrollSpeed:function(){
var _t=$(window).scrollTop(),_l=$(window).scrollLeft(),
_h=$(document).height(),_w=$(document).width(),
val=[
_speed+((_speed*(Math.floor((Math.abs(_to[0]-_t)/_h)*100)))/100),
_speed+((_speed*(Math.floor((Math.abs(_to[1]-_l)/_w)*100)))/100)
];
return Math.max.apply(Math,val);
},
/* user callback functions */
_callbacks:function(c){
if(!opt){
return;
}
this[pluginPfx]={
trigger:_trigger,clicked:_clicked,target:_target,scrollTo:{y:_to[0],x:_to[1]}
};
switch(c){
case "onStart":
//append hash to URL/address bar
if(opt.appendHash && window.history && window.history.pushState && _clicked && _clicked.length){
var hval=_clicked.attr("href"),h="#"+(hval.substring(hval.indexOf('#')+1)); //we're not using hval.split("#")[1] because we want only the first occurrence of # in case the id has # in its actual name
if(h!==window.location.hash) history.pushState("","",h);
}
opt.onStart.call(null,this[pluginPfx]);
break;
case "onComplete":
opt.onComplete.call(null,this[pluginPfx]);
break;
}
},
/* resets/clears vars and constants */
_reset:function(){
_axis=_offset=_dataOffset=false;
},
/* checks if plugin has initialized */
_isInit:function(){
if(!_init){
methods.init.apply(this);
}
},
/* live fn */
_live:function(){
_liveTimer=setTimeout(function(){
if(opt.live){
if($(functions._highlightSelector()).length!==_totalInstances){
functions._setup.call(null);
}
}else{
if(_liveTimer){clearTimeout(_liveTimer);}
}
functions._live.call(null);
},1000);
},
/* extends jquery with custom easings (as jquery ui) */
_easing:function(){
$.easing.easeInQuad=$.easing.easeInQuad || function(x){
return x*x;
};
$.easing.easeOutQuad=$.easing.easeOutQuad || function(x){
return 1-(1-x)*(1-x);
};
$.easing.easeInOutQuad=$.easing.easeInOutQuad || function(x){
return x<0.5 ? 2*x*x : 1-Math.pow(-2*x+2,2)/2;
};
$.easing.easeInCubic=$.easing.easeInCubic || function(x){
return x*x*x;
};
$.easing.easeOutCubic=$.easing.easeOutCubic || function(x){
return 1-Math.pow(1-x,3);
};
$.easing.easeInOutCubic=$.easing.easeInOutCubic || function(x){
return x<0.5 ? 4*x*x*x : 1-Math.pow(-2*x+2,3)/2;
};
$.easing.easeInQuart=$.easing.easeInQuart || function(x){
return x*x*x*x;
};
$.easing.easeOutQuart=$.easing.easeOutQuart || function(x){
return 1-Math.pow(1-x,4);
};
$.easing.easeInOutQuart=$.easing.easeInOutQuart || function(x){
return x<0.5 ? 8*x*x*x*x : 1-Math.pow(-2*x+2,4)/2;
};
$.easing.easeInQuint=$.easing.easeInQuint || function(x){
return x*x*x*x*x;
};
$.easing.easeOutQuint=$.easing.easeOutQuint || function(x){
return 1-Math.pow(1-x,5);
};
$.easing.easeInOutQuint=$.easing.easeInOutQuint || function(x){
return x<0.5 ? 16*x*x*x*x*x : 1-Math.pow(-2*x+2,5)/2;
};
$.easing.easeInExpo=$.easing.easeInExpo || function(x){
return x===0 ? 0 : Math.pow(2,10*x-10);
};
$.easing.easeOutExpo=$.easing.easeOutExpo || function(x){
return x===1 ? 1 : 1-Math.pow(2,-10*x);
};
$.easing.easeInOutExpo=$.easing.easeInOutExpo || function(x){
return x===0 ? 0 : x===1 ? 1 : x<0.5 ? Math.pow(2,20*x-10)/2 : (2-Math.pow(2,-20*x+10))/2;
};
$.easing.easeInSine=$.easing.easeInSine || function(x){
return 1-Math.cos(x*Math.PI/2);
};
$.easing.easeOutSine=$.easing.easeOutSine || function(x){
return Math.sin(x*Math.PI/2);
};
$.easing.easeInOutSine=$.easing.easeInOutSine || function(x){
return -(Math.cos(Math.PI*x)-1)/2;
};
$.easing.easeInCirc=$.easing.easeInCirc || function(x){
return 1-Math.sqrt(1-Math.pow(x,2));
};
$.easing.easeOutCirc=$.easing.easeOutCirc || function(x){
return Math.sqrt(1-Math.pow(x-1,2));
};
$.easing.easeInOutCirc=$.easing.easeInOutCirc || function(x){
return x<0.5 ? (1-Math.sqrt(1-Math.pow(2*x,2)))/2 : (Math.sqrt(1-Math.pow(-2*x+2,2))+1)/2;
};
$.easing.easeInElastic=$.easing.easeInElastic || function(x){
return x===0 ? 0 : x===1 ? 1 : -Math.pow(2,10*x-10)*Math.sin((x*10-10.75)*((2*Math.PI)/3));
};
$.easing.easeOutElastic=$.easing.easeOutElastic || function(x){
return x===0 ? 0 : x===1 ? 1 : Math.pow(2,-10*x)*Math.sin((x*10-0.75)*((2*Math.PI)/3))+1;
};
$.easing.easeInOutElastic=$.easing.easeInOutElastic || function(x){
return x===0 ? 0 : x===1 ? 1 : x<0.5 ? -(Math.pow(2,20*x-10)*Math.sin((20*x-11.125)*((2*Math.PI)/4.5)))/2 : Math.pow(2,-20*x+10)*Math.sin((20*x-11.125)*((2*Math.PI)/4.5))/2+1;
};
$.easing.easeInBack=$.easing.easeInBack || function(x){
return (1.70158+1)*x*x*x-1.70158*x*x;
};
$.easing.easeOutBack=$.easing.easeOutBack || function(x){
return 1+(1.70158+1)*Math.pow(x-1,3)+1.70158*Math.pow(x-1,2);
};
$.easing.easeInOutBack=$.easing.easeInOutBack || function(x){
return x<0.5 ? (Math.pow(2*x,2)*(((1.70158*1.525)+1)*2*x-(1.70158*1.525)))/2 : (Math.pow(2*x-2,2)*(((1.70158*1.525)+1)*(x*2-2)+(1.70158*1.525))+2)/2;
};
$.easing.easeInBounce=$.easing.easeInBounce || function(x){
return 1-__bounceOut(1-x);
};
$.easing.easeOutBounce=$.easing.easeOutBounce || __bounceOut;
$.easing.easeInOutBounce=$.easing.easeInOutBounce || function(x){
return x<0.5 ? (1-__bounceOut(1-2*x))/2 : (1+__bounceOut(2*x-1))/2;
};
function __bounceOut(x){
var n1=7.5625,d1=2.75;
if(x<1/d1){
return n1*x*x;
}else if(x<2/d1){
return n1*(x-=(1.5/d1))*x+.75;
}else if(x<2.5/d1){
return n1*(x-=(2.25/d1))*x+.9375;
}else{
return n1*(x-=(2.625/d1))*x+.984375;
}
}
}
}
/*
---------------
plugin setup
---------------
*/
/* extend jquery with custom easings */
functions._easing.call();
/* plugin constructor functions */
$.fn[pluginNS]=function(method){
if(methods[method]){
return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
}else if(typeof method==="object" || !method){
return methods.init.apply(this,arguments);
}else{
$.error("Method "+method+" does not exist");
}
};
$[pluginNS]=function(method){
if(methods[method]){
return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
}else if(typeof method==="object" || !method){
return methods.init.apply(this,arguments);
}else{
$.error("Method "+method+" does not exist");
}
};
/*
allow setting plugin default options.
example: $.plugin_name.defaults.option_name="option_value";
*/
$[pluginNS].defaults=defaults;
})(jQuery,window,document);