").addClass("scroll-wrapper").addClass(s.attr("class")).css("position", "absolute" === s.css("position") ? "absolute" : "relative").insertBefore(s).append(s), l.isRtl && u.addClass("scroll--rtl"), s.is("textarea") && (this.containerWrapper = r = t("
").insertBefore(s).append(s), u.addClass("scroll-textarea")), (h = {
height: "auto",
"margin-bottom": -1 * n.scroll.height + "px",
"max-height": ""
})[l.isRtl ? "margin-left" : "margin-right"] = -1 * n.scroll.width + "px", r.addClass("scroll-content").css(h), s.on("scroll" + a, function(e) {
var i = s.scrollLeft(),
r = s.scrollTop();
if (l.isRtl) switch (!0) {
case n.firefox:
i = Math.abs(i);
case n.msedge || n.msie:
i = s[0].scrollWidth - s[0].clientWidth - i
}
t.isFunction(l.onScroll) && l.onScroll.call(o, {
maxScroll: c.y.maxScrollOffset,
scroll: r,
size: c.y.size,
visible: c.y.visible
}, {
maxScroll: c.x.maxScrollOffset,
scroll: i,
size: c.x.size,
visible: c.x.visible
}), c.x.isVisible && c.x.scroll.bar.css("left", i * c.x.kx + "px"), c.y.isVisible && c.y.scroll.bar.css("top", r * c.y.kx + "px")
}), u.on("scroll" + a, function() {
u.scrollTop(0).scrollLeft(0)
}), l.disableBodyScroll) {
var d = function(t) {
i(t) ? c.y.isVisible && c.y.mousewheel(t) : c.x.isVisible && c.x.mousewheel(t)
};
u.on("MozMousePixelScroll" + a, d), u.on("mousewheel" + a, d), n.mobile && u.on("touchstart" + a, function(e) {
var i = e.originalEvent.touches && e.originalEvent.touches[0] || e,
n = i.pageX,
o = i.pageY,
r = s.scrollLeft(),
l = s.scrollTop();
t(document).on("touchmove" + a, function(t) {
var e = t.originalEvent.targetTouches && t.originalEvent.targetTouches[0] || t;
s.scrollLeft(r + n - e.pageX), s.scrollTop(l + o - e.pageY), t.preventDefault()
}), t(document).on("touchend" + a, function() {
t(document).off(a)
})
})
}
t.isFunction(l.onInit) && l.onInit.apply(this, [s])
}
t.each(c, function(e, r) {
var u = null,
h = 1,
p = "x" === e ? "scrollLeft" : "scrollTop",
d = l.scrollStep,
f = function() {
var t = s[p]();
s[p](t + d), 1 == h && t + d >= m && (t = s[p]()), -1 == h && t + d <= m && (t = s[p]()), s[p]() == t && u && u()
},
m = 0;
r.scroll || (r.scroll = o._getScroll(l["scroll" + e]).addClass("scroll-" + e), l.showArrows && r.scroll.addClass("scroll-element_arrows_visible"), r.mousewheel = function(t) {
if (!r.isVisible || "x" === e && i(t)) return !0;
if ("y" === e && !i(t)) return c.x.mousewheel(t), !0;
var n = -1 * t.originalEvent.wheelDelta || t.originalEvent.detail,
a = r.size - r.visible - r.offset;
return n || ("x" === e && t.originalEvent.deltaX ? n = 40 * t.originalEvent.deltaX : "y" === e && t.originalEvent.deltaY && (n = 40 * t.originalEvent.deltaY)), (n > 0 && m < a || n < 0 && m > 0) && ((m += n) < 0 && (m = 0), m > a && (m = a), o.scrollTo = o.scrollTo || {}, o.scrollTo[p] = m, setTimeout(function() {
o.scrollTo && (s.stop().animate(o.scrollTo, 240, "linear", function() {
m = s[p]()
}), o.scrollTo = null)
}, 1)), t.preventDefault(), !1
}, r.scroll.on("MozMousePixelScroll" + a, r.mousewheel).on("mousewheel" + a, r.mousewheel).on("mouseenter" + a, function() {
m = s[p]()
}), r.scroll.find(".scroll-arrow, .scroll-element_track").on("mousedown" + a, function(i) {
if (1 != i.which) return !0;
h = 1;
var a = {
eventOffset: i["x" === e ? "pageX" : "pageY"],
maxScrollValue: r.size - r.visible - r.offset,
scrollbarOffset: r.scroll.bar.offset()["x" === e ? "left" : "top"],
scrollbarSize: r.scroll.bar["x" === e ? "outerWidth" : "outerHeight"]()
},
c = 0,
g = 0;
if (t(this).hasClass("scroll-arrow")) {
if (h = t(this).hasClass("scroll-arrow_more") ? 1 : -1, d = l.scrollStep * h, m = h > 0 ? a.maxScrollValue : 0, l.isRtl) switch (!0) {
case n.firefox:
m = h > 0 ? 0 : -1 * a.maxScrollValue;
break;
case n.msie || n.msedge:
}
} else h = a.eventOffset > a.scrollbarOffset + a.scrollbarSize ? 1 : a.eventOffset < a.scrollbarOffset ? -1 : 0, "x" === e && l.isRtl && (n.msie || n.msedge) && (h *= -1), d = Math.round(.75 * r.visible) * h, m = a.eventOffset - a.scrollbarOffset - (l.stepScrolling ? 1 == h ? a.scrollbarSize : 0 : Math.round(a.scrollbarSize / 2)), m = s[p]() + m / r.kx;
return o.scrollTo = o.scrollTo || {}, o.scrollTo[p] = l.stepScrolling ? s[p]() + d : m, l.stepScrolling && (u = function() {
m = s[p](), clearInterval(g), clearTimeout(c), c = 0, g = 0
}, c = setTimeout(function() {
g = setInterval(f, 40)
}, l.duration + 100)), setTimeout(function() {
o.scrollTo && (s.animate(o.scrollTo, l.duration), o.scrollTo = null)
}, 1), o._handleMouseDown(u, i)
}), r.scroll.bar.on("mousedown" + a, function(i) {
if (1 != i.which) return !0;
var c = i["x" === e ? "pageX" : "pageY"],
u = s[p]();
return r.scroll.addClass("scroll-draggable"), t(document).on("mousemove" + a, function(t) {
var i = parseInt((t["x" === e ? "pageX" : "pageY"] - c) / r.kx, 10);
"x" === e && l.isRtl && (n.msie || n.msedge) && (i *= -1), s[p](u + i)
}), o._handleMouseDown(function() {
r.scroll.removeClass("scroll-draggable"), m = s[p]()
}, i)
}))
}), t.each(c, function(t, e) {
var i = "scroll-scroll" + t + "_visible",
n = "x" == t ? c.y : c.x;
e.scroll.removeClass(i), n.scroll.removeClass(i), r.removeClass(i)
}), t.each(c, function(e, i) {
t.extend(i, "x" == e ? {
offset: parseInt(s.css("left"), 10) || 0,
size: s.prop("scrollWidth"),
visible: u.width()
} : {
offset: parseInt(s.css("top"), 10) || 0,
size: s.prop("scrollHeight"),
visible: u.height()
})
}), this._updateScroll("x", this.scrollx), this._updateScroll("y", this.scrolly), t.isFunction(l.onUpdate) && l.onUpdate.apply(this, [s]), t.each(c, function(t, e) {
var i = "x" === t ? "left" : "top",
n = "x" === t ? "outerWidth" : "outerHeight",
o = "x" === t ? "width" : "height",
r = parseInt(s.css(i), 10) || 0,
a = e.size,
c = e.visible + r,
u = e.scroll.size[n]() + (parseInt(e.scroll.size.css(i), 10) || 0);
l.autoScrollSize && (e.scrollbarSize = parseInt(u * c / a, 10), e.scroll.bar.css(o, e.scrollbarSize + "px")), e.scrollbarSize = e.scroll.bar[n](), e.kx = (u - e.scrollbarSize) / (a - c) || 1, e.maxScrollOffset = a - c
}), s.scrollLeft(p.scrollLeft).scrollTop(p.scrollTop).trigger("scroll")
},
_getScroll: function(e) {
var i = {
advanced: ['
"].join(""),
simple: ['
"].join("")
};
return i[e] && (e = i[e]), e || (e = i.simple), e = "string" == typeof e ? t(e).appendTo(this.wrapper) : t(e), t.extend(e, {
bar: e.find(".scroll-bar"),
size: e.find(".scroll-element_size"),
track: e.find(".scroll-element_track")
}), e
},
_handleMouseDown: function(e, i) {
var n = this.namespace;
return t(document).on("blur" + n, function() {
t(document).add("body").off(n), e && e()
}), t(document).on("dragstart" + n, function(t) {
return t.preventDefault(), !1
}), t(document).on("mouseup" + n, function() {
t(document).add("body").off(n), e && e()
}), t("body").on("selectstart" + n, function(t) {
return t.preventDefault(), !1
}), i && i.preventDefault(), !1
},
_updateScroll: function(e, i) {
var o = this.container,
s = this.containerWrapper || o,
r = "scroll-scroll" + e + "_visible",
a = "x" === e ? this.scrolly : this.scrollx,
l = parseInt(this.container.css("x" === e ? "left" : "top"), 10) || 0,
c = this.wrapper,
u = i.size,
h = i.visible + l;
i.isVisible = u - h > 1, i.isVisible ? (i.scroll.addClass(r), a.scroll.addClass(r), s.addClass(r)) : (i.scroll.removeClass(r), a.scroll.removeClass(r), s.removeClass(r)), "y" === e && (o.is("textarea") || u < h ? s.css({
height: h + n.scroll.height + "px",
"max-height": "none"
}) : s.css({
"max-height": h + n.scroll.height + "px"
})), i.size == o.prop("scrollWidth") && a.size == o.prop("scrollHeight") && i.visible == c.width() && a.visible == c.height() && i.offset == (parseInt(o.css("left"), 10) || 0) && a.offset == (parseInt(o.css("top"), 10) || 0) || (t.extend(this.scrollx, {
offset: parseInt(o.css("left"), 10) || 0,
size: o.prop("scrollWidth"),
visible: c.width()
}), t.extend(this.scrolly, {
offset: parseInt(o.css("top"), 10) || 0,
size: this.container.prop("scrollHeight"),
visible: c.height()
}), this._updateScroll("x" === e ? "y" : "x", a))
}
};
var r = s;
t.fn.scrollbar = function(e, i) {
return "string" != typeof e && (i = e, e = "init"), void 0 === i && (i = []), t.isArray(i) || (i = [i]), this.not("body, .scroll-wrapper").each(function() {
var o = t(this),
s = o.data(n.data.name);
(s || "init" === e) && (s || (s = new r(o)), s[e] && s[e].apply(s, i))
}), this
}, t.fn.scrollbar.options = o;
var a, l, c = (a = 0, function(t) {
var e, i, o, s, r, l, u;
for (e = 0; e < n.scrolls.length; e++) s = n.scrolls[e], i = s.container, o = s.options, r = s.wrapper, l = s.scrollx, u = s.scrolly, (t || o.autoUpdate && r && r.is(":visible") && (i.prop("scrollWidth") != l.size || i.prop("scrollHeight") != u.size || r.width() != l.visible || r.height() != u.visible)) && (s.init(), o.debug && window.console && console.log({
scrollHeight: i.prop("scrollHeight") + ":" + s.scrolly.size,
scrollWidth: i.prop("scrollWidth") + ":" + s.scrollx.size,
visibleHeight: r.height() + ":" + s.scrolly.visible,
visibleWidth: r.width() + ":" + s.scrollx.visible
}, !0));
clearTimeout(a), a = setTimeout(c, 300)
});
window.angular && (l = window.angular).module("jQueryScrollbar", []).provider("jQueryScrollbar", function() {
var t = o;
return {
setOptions: function(e) {
l.extend(t, e)
},
$get: function() {
return {
options: l.copy(t)
}
}
}
}).directive("jqueryScrollbar", ["jQueryScrollbar", "$parse", function(t, e) {
return {
restrict: "AC",
link: function(i, n, o) {
var s = e(o.jqueryScrollbar)(i);
n.scrollbar(s || t.options).on("$destroy", function() {
n.scrollbar("destroy")
})
}
}
}])
}),
function(t) {
var e = t(window),
i = e.height();
e.resize(function() {
i = e.height()
}), t.fn.parallax = function(n, o, s) {
function r() {
var s = e.scrollTop();
c.each(function() {
var e = t(this),
r = e.offset().top;
r + a(e) < s || r > s + i || c.css("backgroundPosition", n + " " + Math.round((l - s) * o) + "px")
})
}
var a, l, c = t(this);
c.each(function() {
l = c.offset().top
}), a = s ? function(t) {
return t.outerHeight(!0)
} : function(t) {
return t.height()
}, (arguments.length < 1 || null === n) && (n = "50%"), (arguments.length < 2 || null === o) && (o = .1), (arguments.length < 3 || null === s) && (s = !0), e.bind("scroll", r).resize(r), r()
}
}(jQuery),
function(t, e) {
"object" == typeof exports ? module.exports = e(require("jquery")) : "function" == typeof define && define.amd ? define(["jquery"], e) : e(t.jQuery)
}(this, function(t) {
var e = function(t, e) {
var i, n = document.createElement("canvas");
t.appendChild(n), "undefined" != typeof G_vmlCanvasManager && G_vmlCanvasManager.initElement(n);
var o = n.getContext("2d");
n.width = n.height = e.size;
var s = 1;
window.devicePixelRatio > 1 && (s = window.devicePixelRatio, n.style.width = n.style.height = [e.size, "px"].join(""), n.width = n.height = e.size * s, o.scale(s, s)), o.translate(e.size / 2, e.size / 2), o.rotate((e.rotate / 180 - .5) * Math.PI);
var r = (e.size - e.lineWidth) / 2;
e.scaleColor && e.scaleLength && (r -= e.scaleLength + 2), Date.now = Date.now || function() {
return +new Date
};
var a = function(t, e, i) {
var n = 0 >= (i = Math.min(Math.max(-1, i || 0), 1));
o.beginPath(), o.arc(0, 0, r, 0, 2 * Math.PI * i, n), o.strokeStyle = t, o.lineWidth = e, o.stroke()
},
l = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(t) {
window.setTimeout(t, 1e3 / 60)
},
c = function() {
e.scaleColor && function() {
var t, i;
o.lineWidth = 1, o.fillStyle = e.scaleColor, o.save();
for (var n = 24; n > 0; --n) n % 6 == 0 ? (i = e.scaleLength, t = 0) : (i = .6 * e.scaleLength, t = e.scaleLength - i), o.fillRect(-e.size / 2 + t, 0, i, 1), o.rotate(Math.PI / 12);
o.restore()
}(), e.trackColor && a(e.trackColor, e.lineWidth, 1)
};
this.getCanvas = function() {
return n
}, this.getCtx = function() {
return o
}, this.clear = function() {
o.clearRect(e.size / -2, e.size / -2, e.size, e.size)
}, this.draw = function(t) {
var n;
e.scaleColor || e.trackColor ? o.getImageData && o.putImageData ? i ? o.putImageData(i, 0, 0) : (c(), i = o.getImageData(0, 0, e.size * s, e.size * s)) : (this.clear(), c()) : this.clear(), o.lineCap = e.lineCap, n = "function" == typeof e.barColor ? e.barColor(t) : e.barColor, a(n, e.lineWidth, t / 100)
}.bind(this), this.animate = function(t, i) {
var n = Date.now();
e.onStart(t, i);
var o = function() {
var s = Math.min(Date.now() - n, e.animate.duration),
r = e.easing(this, s, t, i - t, e.animate.duration);
this.draw(r), e.onStep(t, i, r), s >= e.animate.duration ? e.onStop(t, i) : l(o)
}.bind(this);
l(o)
}.bind(this)
};
t.fn.easyPieChart = function(i) {
return this.each(function() {
var n;
t.data(this, "easyPieChart") || (n = t.extend({}, i, t(this).data()), t.data(this, "easyPieChart", new function(t, i) {
var n = {
barColor: "#ef1e25",
trackColor: "#f9f9f9",
scaleColor: "#dfe0e0",
scaleLength: 5,
lineCap: "round",
lineWidth: 3,
size: 110,
rotate: 0,
animate: {
duration: 1e3,
enabled: !0
},
easing: function(t, e, i, n, o) {
return 1 > (e /= o / 2) ? n / 2 * e * e + i : -n / 2 * (--e * (e - 2) - 1) + i
},
onStart: function() {},
onStep: function() {},
onStop: function() {}
};
if (void 0 !== e) n.renderer = e;
else {
if ("undefined" == typeof SVGRenderer) throw new Error("Please load either the SVG- or the CanvasRenderer");
n.renderer = SVGRenderer
}
var o = {},
s = 0,
r = function() {
this.el = t, this.options = o;
for (var e in n) n.hasOwnProperty(e) && (o[e] = i && void 0 !== i[e] ? i[e] : n[e], "function" == typeof o[e] && (o[e] = o[e].bind(this)));
o.easing = "string" == typeof o.easing && "undefined" != typeof jQuery && jQuery.isFunction(jQuery.easing[o.easing]) ? jQuery.easing[o.easing] : n.easing, "number" == typeof o.animate && (o.animate = {
duration: o.animate,
enabled: !0
}), "boolean" != typeof o.animate || o.animate || (o.animate = {
duration: 1e3,
enabled: o.animate
}), this.renderer = new o.renderer(t, o), this.renderer.draw(s), t.dataset && t.dataset.percent ? this.update(parseFloat(t.dataset.percent)) : t.getAttribute && t.getAttribute("data-percent") && this.update(parseFloat(t.getAttribute("data-percent")))
}.bind(this);
this.update = function(t) {
return t = parseFloat(t), o.animate.enabled ? this.renderer.animate(s, t) : this.renderer.draw(t), s = t, this
}.bind(this), this.disableAnimation = function() {
return o.animate.enabled = !1, this
}, this.enableAnimation = function() {
return o.animate.enabled = !0, this
}, r()
}(this, n)))
})
}
}),
function(t) {
"use strict";
var e = function(i, n) {
this.$element = t(i), this.options = t.extend({}, e.defaults, n)
};
e.defaults = {
transition_delay: 300,
refresh_speed: 50,
display_text: "none",
use_percentage: !0,
percent_format: function(t) {
return t + "%"
},
amount_format: function(t, e) {
return t + " / " + e
},
update: t.noop,
done: t.noop,
fail: t.noop
}, e.prototype.transition = function() {
var i = this.$element,
n = i.parent(),
o = this.$back_text,
s = this.$front_text,
r = this.options,
a = parseInt(i.attr("data-transitiongoal")),
l = parseInt(i.attr("aria-valuemin")) || 0,
c = parseInt(i.attr("aria-valuemax")) || 100,
u = n.hasClass("vertical"),
h = r.update && "function" == typeof r.update ? r.update : e.defaults.update,
p = r.done && "function" == typeof r.done ? r.done : e.defaults.done,
d = r.fail && "function" == typeof r.fail ? r.fail : e.defaults.fail;
if (isNaN(a)) d("data-transitiongoal not set");
else {
var f, m = Math.round(100 * (a - l) / (c - l));
if ("center" === r.display_text && !o && !s) this.$back_text = o = t("
").addClass("progressbar-back-text").prependTo(n), this.$front_text = s = t("").addClass("progressbar-front-text").prependTo(i), u ? (f = n.css("height"), o.css({
height: f,
"line-height": f
}), s.css({
height: f,
"line-height": f
}), t(window).resize(function() {
f = n.css("height"), o.css({
height: f,
"line-height": f
}), s.css({
height: f,
"line-height": f
})
})) : (f = n.css("width"), s.css({
width: f
}), t(window).resize(function() {
f = n.css("width"), s.css({
width: f
})
}));
setTimeout(function() {
var t, e, d, f, g;
u ? i.css("height", m + "%") : i.css("width", m + "%");
var v = setInterval(function() {
u ? (d = i.height(), f = n.height()) : (d = i.width(), f = n.width()), t = Math.round(100 * d / f), e = Math.round(l + d / f * (c - l)), t >= m && (t = m, e = a, p(i), clearInterval(v)), "none" !== r.display_text && (g = r.use_percentage ? r.percent_format(t) : r.amount_format(e, c, l), "fill" === r.display_text ? i.text(g) : "center" === r.display_text && (o.text(g), s.text(g))), i.attr("aria-valuenow", e), h(t, i)
}, r.refresh_speed)
}, r.transition_delay)
}
};
var i = t.fn.progressbar;
t.fn.progressbar = function(i) {
return this.each(function() {
var n = t(this),
o = n.data("bs.progressbar"),
s = "object" == typeof i && i;
o && s && t.extend(o.options, s), o || n.data("bs.progressbar", o = new e(this, s)), o.transition()
})
}, t.fn.progressbar.Constructor = e, t.fn.progressbar.noConflict = function() {
return t.fn.progressbar = i, this
}
}(window.jQuery),
function(t) {
t.fn.countTo = function(e) {
return e = e || {}, t(this).each(function() {
function i(t) {
var e = n.formatter.call(r, t, n);
a.text(e)
}
var n = t.extend({}, t.fn.countTo.defaults, {
from: t(this).data("from"),
to: t(this).data("to"),
speed: t(this).data("speed"),
refreshInterval: t(this).data("refresh-interval"),
decimals: t(this).data("decimals")
}, e),
o = Math.ceil(n.speed / n.refreshInterval),
s = (n.to - n.from) / o,
r = this,
a = t(this),
l = 0,
c = n.from,
u = a.data("countTo") || {};
a.data("countTo", u), u.interval && clearInterval(u.interval), u.interval = setInterval(function() {
l++, i(c += s), "function" == typeof n.onUpdate && n.onUpdate.call(r, c), l >= o && (a.removeData("countTo"), clearInterval(u.interval), c = n.to, "function" == typeof n.onComplete && n.onComplete.call(r, c))
}, n.refreshInterval), i(c)
})
}, t.fn.countTo.defaults = {
from: 0,
to: 0,
speed: 1e3,
refreshInterval: 100,
decimals: 0,
formatter: function(t, e) {
return t.toFixed(e.decimals)
},
onUpdate: null,
onComplete: null
}
}(jQuery),
function(t) {
function e() {
var t = location.href;
return hashtag = -1 !== t.indexOf("#prettyPhoto") && decodeURI(t.substring(t.indexOf("#prettyPhoto") + 1, t.length)), hashtag && (hashtag = hashtag.replace(/<|>/g, "")), hashtag
}
function i(t, e) {
t = t.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var i = new RegExp("[\\?&]" + t + "=([^]*)").exec(e);
return null == i ? "" : i[1]
}
t.prettyPhoto = {
version: "3.1.6"
}, t.fn.prettyPhoto = function(n) {
function o() {
t(".pp_loaderIcon").hide(), projectedTop = scroll_pos.scrollTop + (b / 2 - p.containerHeight / 2), projectedTop < 0 && (projectedTop = 0), $ppt.fadeTo(settings.animation_speed, 1), $pp_pic_holder.find(".pp_content").animate({
height: p.contentHeight,
width: p.contentWidth
}, settings.animation_speed), $pp_pic_holder.animate({
top: projectedTop,
left: x / 2 - p.containerWidth / 2 < 0 ? 0 : x / 2 - p.containerWidth / 2,
width: p.containerWidth
}, settings.animation_speed, function() {
$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(p.height).width(p.width), $pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed), isSet && "image" == l(pp_images[set_position]) ? $pp_pic_holder.find(".pp_hoverContainer").show() : $pp_pic_holder.find(".pp_hoverContainer").hide(), settings.allow_expand && (p.resized ? t("a.pp_expand,a.pp_contract").show() : t("a.pp_expand").hide()), !settings.autoplay_slideshow || y || d || t.prettyPhoto.startSlideshow(), settings.changepicturecallback(), d = !0
}), isSet && settings.overlay_gallery && "image" == l(pp_images[set_position]) ? (itemWidth = 57, navWidth = "facebook" == settings.theme || "pp_default" == settings.theme ? 50 : 30, itemsPerPage = Math.floor((p.containerWidth - 100 - navWidth) / itemWidth), itemsPerPage = itemsPerPage < pp_images.length ? itemsPerPage : pp_images.length, totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1, 0 == totalPage ? (navWidth = 0, $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()) : $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(), galleryWidth = itemsPerPage * itemWidth, fullGalleryWidth = pp_images.length * itemWidth, $pp_gallery.css("margin-left", -(galleryWidth / 2 + navWidth / 2)).find("div:first").width(galleryWidth + 5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"), goToPage = Math.floor(set_position / itemsPerPage) < totalPage ? Math.floor(set_position / itemsPerPage) : totalPage, t.prettyPhoto.changeGalleryPage(goToPage), $pp_gallery_li.filter(":eq(" + set_position + ")").addClass("selected")) : $pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave"), n.ajaxcallback()
}
function s(e) {
$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility", "hidden"), $pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed, function() {
t(".pp_loaderIcon").show(), e()
})
}
function r(t, e) {
if (resized = !1, a(t, e), imageWidth = t, imageHeight = e, (v > x || g > b) && doresize && settings.allow_resize && !w) {
for (resized = !0, fitting = !1; !fitting;) v > x ? (imageWidth = x - 200, imageHeight = e / t * imageWidth) : g > b ? (imageHeight = b - 200, imageWidth = t / e * imageHeight) : fitting = !0, g = imageHeight, v = imageWidth;
(v > x || g > b) && r(v, g), a(imageWidth, imageHeight)
}
return {
width: Math.floor(imageWidth),
height: Math.floor(imageHeight),
containerHeight: Math.floor(g),
containerWidth: Math.floor(v) + 2 * settings.horizontal_padding,
contentHeight: Math.floor(f),
contentWidth: Math.floor(m),
resized: resized
}
}
function a(e, i) {
e = parseFloat(e), i = parseFloat(i), $pp_details = $pp_pic_holder.find(".pp_details"), $pp_details.width(e), detailsHeight = parseFloat($pp_details.css("marginTop")) + parseFloat($pp_details.css("marginBottom")), $pp_details = $pp_details.clone().addClass(settings.theme).width(e).appendTo(t("body")).css({
position: "absolute",
top: -1e4
}), detailsHeight += $pp_details.height(), detailsHeight = detailsHeight <= 34 ? 36 : detailsHeight, $pp_details.remove(), $pp_title = $pp_pic_holder.find(".ppt"), $pp_title.width(e), titleHeight = parseFloat($pp_title.css("marginTop")) + parseFloat($pp_title.css("marginBottom")), $pp_title = $pp_title.clone().appendTo(t("body")).css({
position: "absolute",
top: -1e4
}), titleHeight += $pp_title.height(), $pp_title.remove(), f = i + detailsHeight, m = e, g = f + titleHeight + $pp_pic_holder.find(".pp_top").height() + $pp_pic_holder.find(".pp_bottom").height(), v = e
}
function l(t) {
return t.match(/youtube\.com\/watch/i) || t.match(/youtu\.be/i) ? "youtube" : t.match(/vimeo\.com/i) ? "vimeo" : t.match(/\b.mov\b/i) ? "quicktime" : t.match(/\b.swf\b/i) ? "flash" : t.match(/\biframe=true\b/i) ? "iframe" : t.match(/\bajax=true\b/i) ? "ajax" : t.match(/\bcustom=true\b/i) ? "custom" : "#" == t.substr(0, 1) ? "inline" : "image"
}
function c() {
if (doresize && "undefined" != typeof $pp_pic_holder) {
if (scroll_pos = u(), contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(), projectedTop = b / 2 + scroll_pos.scrollTop - contentHeight / 2, projectedTop < 0 && (projectedTop = 0), contentHeight > b) return;
$pp_pic_holder.css({
top: projectedTop,
left: x / 2 + scroll_pos.scrollLeft - contentwidth / 2
})
}
}
function u() {
return self.pageYOffset ? {
scrollTop: self.pageYOffset,
scrollLeft: self.pageXOffset
} : document.documentElement && document.documentElement.scrollTop ? {
scrollTop: document.documentElement.scrollTop,
scrollLeft: document.documentElement.scrollLeft
} : document.body ? {
scrollTop: document.body.scrollTop,
scrollLeft: document.body.scrollLeft
} : void 0
}
function h() {
if (settings.social_tools && (facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href))), settings.markup = settings.markup.replace("{pp_social}", ""), t("body").append(settings.markup), $pp_pic_holder = t(".pp_pic_holder"), $ppt = t(".ppt"), $pp_overlay = t("div.pp_overlay"), isSet && settings.overlay_gallery) {
currentGalleryPage = 0, toInject = "";
for (var e = 0; e < pp_images.length; e++) pp_images[e].match(/\b(jpg|jpeg|png|gif)\b/gi) ? (classname = "", img_src = pp_images[e]) : (classname = "default", img_src = ""), toInject += "
";
toInject = settings.gallery_markup.replace(/{gallery}/g, toInject), $pp_pic_holder.find("#pp_full_res").after(toInject), $pp_gallery = t(".pp_pic_holder .pp_gallery"), $pp_gallery_li = $pp_gallery.find("li"), $pp_gallery.find(".pp_arrow_next").click(function() {
return t.prettyPhoto.changeGalleryPage("next"), t.prettyPhoto.stopSlideshow(), !1
}), $pp_gallery.find(".pp_arrow_previous").click(function() {
return t.prettyPhoto.changeGalleryPage("previous"), t.prettyPhoto.stopSlideshow(), !1
}), $pp_pic_holder.find(".pp_content").hover(function() {
$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()
}, function() {
$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()
}), itemWidth = 57, $pp_gallery_li.each(function(e) {
t(this).find("a").click(function() {
return t.prettyPhoto.changePage(e), t.prettyPhoto.stopSlideshow(), !1
})
})
}
settings.slideshow && ($pp_pic_holder.find(".pp_nav").prepend('Play'), $pp_pic_holder.find(".pp_nav .pp_play").click(function() {
return t.prettyPhoto.startSlideshow(), !1
})), $pp_pic_holder.attr("class", "pp_pic_holder " + settings.theme), $pp_overlay.css({
opacity: 0,
height: t(document).height(),
width: t(window).width()
}).bind("click", function() {
settings.modal || t.prettyPhoto.close()
}), t("a.pp_close").bind("click", function() {
return t.prettyPhoto.close(), !1
}), settings.allow_expand && t("a.pp_expand").bind("click", function() {
return t(this).hasClass("pp_expand") ? (t(this).removeClass("pp_expand").addClass("pp_contract"), doresize = !1) : (t(this).removeClass("pp_contract").addClass("pp_expand"), doresize = !0), s(function() {
t.prettyPhoto.open()
}), !1
}), $pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click", function() {
return t.prettyPhoto.changePage("previous"), t.prettyPhoto.stopSlideshow(), !1
}), $pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click", function() {
return t.prettyPhoto.changePage("next"), t.prettyPhoto.stopSlideshow(), !1
}), c()
}
n = jQuery.extend({
hook: "rel",
animation_speed: "fast",
ajaxcallback: function() {},
slideshow: 5e3,
autoplay_slideshow: !1,
opacity: .8,
show_title: !0,
allow_resize: !0,
allow_expand: !0,
default_width: 500,
default_height: 344,
counter_separator_label: "/",
theme: "pp_default",
horizontal_padding: 20,
hideflash: !1,
wmode: "opaque",
autoplay: !0,
modal: !1,
deeplinking: !0,
overlay_gallery: !0,
overlay_gallery_max: 30,
keyboard_shortcuts: !0,
changepicturecallback: function() {},
callback: function() {},
ie6_fallback: !0,
markup: ' \t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
Expand \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
next \t\t\t\t\t\t\t\t\t\t\t
previous \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t
Previous \t\t\t\t\t\t\t\t\t\t\t\t
0/0
\t\t\t\t\t\t\t\t\t\t\t\t
Next \t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
{pp_social}
\t\t\t\t\t\t\t\t\t\t\t
Close \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t
\t\t\t\t\t',
gallery_markup: ' \t\t\t\t\t\t\t\t
Previous \t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
Next \t\t\t\t\t\t\t
',
image_markup: '
',
flash_markup: '',
quicktime_markup: '',
iframe_markup: '',
inline_markup: '{content}
',
custom_markup: "",
social_tools: '