JavaScript
Executed Scripts (62)
Executed Evals (5)
#1 JavaScript::Eval (size: 23195) - SHA256: 59aa3ae598b17aad234055c06a23899da5a901c89740c74d07226771dc9b0a3b
/**
* 2016 Revolution Slider
*
* @author SmatDataSoft <support@smartdatasoft.com>
* @copyright 2016 SmatDataSoft
* @license private
* @version 5.1.3
* International Registered Trademark & Property of SmatDataSoft
*/
/********************************************
* REVOLUTION 5.0 EXTENSION - NAVIGATION
* @version: 1.0.4 (10.11.2015)
* @requires jquery.themepunch.revolution.js
* @author ThemePunch
*********************************************/
! function() {
var t = jQuery.fn.revolution,
e = t.is_mobile();
jQuery.extend(!0, t, {
hideUnHideNav: function(t) {
var e = t.c.width(),
i = t.navigation.arrows,
a = t.navigation.bullets,
n = t.navigation.thumbnails,
r = t.navigation.tabs;
h(i) && y(t.c.find(".tparrows"), i.hide_under, e, i.hide_over), h(a) && y(t.c.find(".tp-bullets"), a.hide_under, e, a.hide_over), h(n) && y(t.c.parent().find(".tp-thumbs"), n.hide_under, e, n.hide_over), h(r) && y(t.c.parent().find(".tp-tabs"), r.hide_under, e, r.hide_over), x(t)
},
resizeThumbsTabs: function(t) {
if (t.navigation && t.navigation.tabs.enable || t.navigation && t.navigation.thumbnails.enable) {
var e = (jQuery(window).width() - 480) / 500,
i = new punchgs.TimelineLite,
n = t.navigation.tabs,
r = t.navigation.thumbnails;
i.pause(), e = e > 1 ? 1 : 0 > e ? 0 : e, h(n) && n.width > n.min_width && a(e, i, t.c, n, t.slideamount, "tab"), h(r) && r.width > r.min_width && a(e, i, t.c, r, t.slideamount, "thumb"), i.play(), x(t)
}
return !0
},
manageNavigation: function(e) {
var a = t.getHorizontalOffset(e.c.parent(), "left"),
n = t.getHorizontalOffset(e.c.parent(), "right");
h(e.navigation.bullets) && ("fullscreen" != e.sliderLayout && "fullwidth" != e.sliderLayout && (e.navigation.bullets.h_offset_old = void 0 === e.navigation.bullets.h_offset_old ? e.navigation.bullets.h_offset : e.navigation.bullets.h_offset_old, e.navigation.bullets.h_offset = "center" === e.navigation.bullets.h_align ? e.navigation.bullets.h_offset_old + a / 2 - n / 2 : e.navigation.bullets.h_offset_old + a - n), m(e.c.find(".tp-bullets"), e.navigation.bullets)), h(e.navigation.thumbnails) && m(e.c.parent().find(".tp-thumbs"), e.navigation.thumbnails), h(e.navigation.tabs) && m(e.c.parent().find(".tp-tabs"), e.navigation.tabs), h(e.navigation.arrows) && ("fullscreen" != e.sliderLayout && "fullwidth" != e.sliderLayout && (e.navigation.arrows.left.h_offset_old = void 0 === e.navigation.arrows.left.h_offset_old ? e.navigation.arrows.left.h_offset : e.navigation.arrows.left.h_offset_old, e.navigation.arrows.left.h_offset = "right" === e.navigation.arrows.left.h_align ? e.navigation.arrows.left.h_offset_old + n : e.navigation.arrows.left.h_offset_old + a, e.navigation.arrows.right.h_offset_old = void 0 === e.navigation.arrows.right.h_offset_old ? e.navigation.arrows.right.h_offset : e.navigation.arrows.right.h_offset_old, e.navigation.arrows.right.h_offset = "right" === e.navigation.arrows.right.h_align ? e.navigation.arrows.right.h_offset_old + n : e.navigation.arrows.right.h_offset_old + a), m(e.c.find(".tp-leftarrow.tparrows"), e.navigation.arrows.left), m(e.c.find(".tp-rightarrow.tparrows"), e.navigation.arrows.right)), h(e.navigation.thumbnails) && i(e.c.parent().find(".tp-thumbs"), e.navigation.thumbnails), h(e.navigation.tabs) && i(e.c.parent().find(".tp-tabs"), e.navigation.tabs)
},
createNavigation: function(t, a) {
var n = t.parent(),
o = a.navigation.arrows,
p = a.navigation.bullets,
g = a.navigation.thumbnails,
v = a.navigation.tabs,
m = h(o),
w = h(p),
x = h(g),
y = h(v);
r(t, a), s(t, a), m && f(t, o, a), a.li.each(function() {
var e = jQuery(this);
w && b(t, p, e, a), x && _(t, g, e, "tp-thumb", a), y && _(t, v, e, "tp-tab", a)
}), t.bind("revolution.slide.onafterswap revolution.nextslide.waiting", function() {
var e = 0 == t.find(".next-revslide").length ? t.find(".active-revslide").data("index") : t.find(".next-revslide").data("index");
t.find(".tp-bullet").each(function() {
var t = jQuery(this);
t.data("liref") === e ? t.addClass("selected") : t.removeClass("selected")
}), n.find(".tp-thumb, .tp-tab").each(function() {
var t = jQuery(this);
t.data("liref") === e ? (t.addClass("selected"), t.hasClass("tp-tab") ? i(n.find(".tp-tabs"), v) : i(n.find(".tp-thumbs"), g)) : t.removeClass("selected")
});
var r = 0,
s = !1;
a.thumbs && jQuery.each(a.thumbs, function(t, i) {
r = s === !1 ? t : r, s = i.id === e || t === e ? !0 : s
});
var d = r > 0 ? r - 1 : a.slideamount - 1,
l = r + 1 == a.slideamount ? 0 : r + 1;
if (o.enable === !0) {
var h = o.tmp;
jQuery.each(a.thumbs[d].params, function(t, e) {
h = h.replace(e.from, e.to)
}), o.left.j.html(h), h = o.tmp, jQuery.each(a.thumbs[l].params, function(t, e) {
h = h.replace(e.from, e.to)
}), o.right.j.html(h), punchgs.TweenLite.set(o.left.j.find(".tp-arr-imgholder"), {
backgroundImage: "url(" + a.thumbs[d].src + ")"
}), punchgs.TweenLite.set(o.right.j.find(".tp-arr-imgholder"), {
backgroundImage: "url(" + a.thumbs[l].src + ")"
})
}
}), l(o), l(p), l(g), l(v), n.on("mouseenter mousemove", function() {
n.hasClass("tp-mouseover") || (n.addClass("tp-mouseover"), punchgs.TweenLite.killDelayedCallsTo(c), m && o.hide_onleave && c(n.find(".tparrows"), o, "show"), w && p.hide_onleave && c(n.find(".tp-bullets"), p, "show"), x && g.hide_onleave && c(n.find(".tp-thumbs"), g, "show"), y && v.hide_onleave && c(n.find(".tp-tabs"), v, "show"), e && (n.removeClass("tp-mouseover"), u(t, a)))
}), n.on("mouseleave", function() {
n.removeClass("tp-mouseover"), u(t, a)
}), m && o.hide_onleave && c(n.find(".tparrows"), o, "hide", 0), w && p.hide_onleave && c(n.find(".tp-bullets"), p, "hide", 0), x && g.hide_onleave && c(n.find(".tp-thumbs"), g, "hide", 0), y && v.hide_onleave && c(n.find(".tp-tabs"), v, "hide", 0), x && d(n.find(".tp-thumbs"), a), y && d(n.find(".tp-tabs"), a), "carousel" === a.sliderType && d(t, a, !0), "on" == a.navigation.touch.touchenabled && d(t, a, "swipebased")
}
});
var i = function(t, e) {
var i = (t.hasClass("tp-thumbs") ? ".tp-thumbs" : ".tp-tabs", t.hasClass("tp-thumbs") ? ".tp-thumb-mask" : ".tp-tab-mask"),
a = t.hasClass("tp-thumbs") ? ".tp-thumbs-inner-wrapper" : ".tp-tabs-inner-wrapper",
n = t.hasClass("tp-thumbs") ? ".tp-thumb" : ".tp-tab",
r = t.find(i),
s = r.find(a),
o = e.direction,
d = "vertical" === o ? r.find(n).first().outerHeight(!0) + e.space : r.find(n).first().outerWidth(!0) + e.space,
l = "vertical" === o ? r.height() : r.width(),
h = parseInt(r.find(n + ".selected").data("liindex"), 0),
p = l / d,
u = "vertical" === o ? r.height() : r.width(),
c = 0 - h * d,
f = "vertical" === o ? s.height() : s.width(),
g = 0 - (f - u) > c ? 0 - (f - u) : g > 0 ? 0 : c,
v = s.data("offset");
p > 2 && (g = 0 >= c - (v + d) ? 0 - d > c - (v + d) ? v : g + d : g, g = d > c - d + v + l && c + (Math.round(p) - 2) * d < v ? c + (Math.round(p) - 2) * d : g), g = 0 - (f - u) > g ? 0 - (f - u) : g > 0 ? 0 : g, "vertical" !== o && r.width() >= s.width() && (g = 0), "vertical" === o && r.height() >= s.height() && (g = 0), t.hasClass("dragged") || ("vertical" === o ? s.data("tmmove", punchgs.TweenLite.to(s, .5, {
top: g + "px",
ease: punchgs.Power3.easeInOut
})) : s.data("tmmove", punchgs.TweenLite.to(s, .5, {
left: g + "px",
ease: punchgs.Power3.easeInOut
})), s.data("offset", g))
},
a = function(t, e, i, a, n, r) {
var s = i.parent().find(".tp-" + r + "s"),
o = s.find(".tp-" + r + "s-inner-wrapper"),
d = s.find(".tp-" + r + "-mask"),
l = a.width * t < a.min_width ? a.min_width : Math.round(a.width * t),
h = Math.round(l / a.width * a.height),
p = "vertical" === a.direction ? l : l * n + a.space * (n - 1),
u = "vertical" === a.direction ? h * n + a.space * (n - 1) : h,
c = "vertical" === a.direction ? {
width: l + "px"
} : {
height: h + "px"
};
e.add(punchgs.TweenLite.set(s, c)), e.add(punchgs.TweenLite.set(o, {
width: p + "px",
height: u + "px"
})), e.add(punchgs.TweenLite.set(d, {
width: p + "px",
height: u + "px"
}));
var f = o.find(".tp-" + r);
return f && jQuery.each(f, function(t, i) {
"vertical" === a.direction ? e.add(punchgs.TweenLite.set(i, {
top: t * (h + parseInt(void 0 === a.space ? 0 : a.space, 0)),
width: l + "px",
height: h + "px"
})) : "horizontal" === a.direction && e.add(punchgs.TweenLite.set(i, {
left: t * (l + parseInt(void 0 === a.space ? 0 : a.space, 0)),
width: l + "px",
height: h + "px"
}))
}), e
},
n = function(t) {
var e = 0,
i = 0,
a = 0,
n = 0,
r = 1,
s = 1,
o = 1;
return "detail" in t && (i = t.detail), "wheelDelta" in t && (i = -t.wheelDelta / 120), "wheelDeltaY" in t && (i = -t.wheelDeltaY / 120), "wheelDeltaX" in t && (e = -t.wheelDeltaX / 120), "axis" in t && t.axis === t.HORIZONTAL_AXIS && (e = i, i = 0), a = e * r, n = i * r, "deltaY" in t && (n = t.deltaY), "deltaX" in t && (a = t.deltaX), (a || n) && t.deltaMode && (1 == t.deltaMode ? (a *= s, n *= s) : (a *= o, n *= o)), a && !e && (e = 1 > a ? -1 : 1), n && !i && (i = 1 > n ? -1 : 1), n = navigator.userAgent.match(/mozilla/i) ? 10 * n : n, (n > 300 || -300 > n) && (n /= 10), {
spinX: e,
spinY: i,
pixelX: a,
pixelY: n
}
},
r = function(e, i) {
"on" === i.navigation.keyboardNavigation && jQuery(document).keydown(function(a) {
("horizontal" == i.navigation.keyboard_direction && 39 == a.keyCode || "vertical" == i.navigation.keyboard_direction && 40 == a.keyCode) && (i.sc_indicator = "arrow", i.sc_indicator_dir = 0, t.callingNewSlide(i, e, 1)), ("horizontal" == i.navigation.keyboard_direction && 37 == a.keyCode || "vertical" == i.navigation.keyboard_direction && 38 == a.keyCode) && (i.sc_indicator = "arrow", i.sc_indicator_dir = 1, t.callingNewSlide(i, e, -1))
})
},
s = function(e, i) {
if ("on" === i.navigation.mouseScrollNavigation) {
var a = navigator.userAgent.match(/mozilla/i) ? -29 : -49,
r = navigator.userAgent.match(/mozilla/i) ? 29 : 49;
e.on("mousewheel DOMMouseScroll", function(s) {
var o = n(s.originalEvent),
d = e.find(".tp-revslider-slidesli.active-revslide").index(),
l = e.find(".tp-revslider-slidesli.processing-revslide").index(),
h = -1 != d && 0 == d || -1 != l && 0 == l ? !0 : !1,
p = -1 != d && d == i.slideamount - 1 || 1 != l && l == i.slideamount - 1 ? !0 : !1;
if (-1 == l) {
if (o.pixelY < a) {
if (!h) return i.sc_indicator = "arrow", i.sc_indicator_dir = 0, t.callingNewSlide(i, e, -1), !1
} else if (o.pixelY > r && !p) return i.sc_indicator = "arrow", i.sc_indicator_dir = 1, t.callingNewSlide(i, e, 1), !1
} else if (!p) return !1;
s.preventDefault()
})
}
},
o = function(t, i, a) {
return t = e ? jQuery(a.target).closest("." + t).length || jQuery(a.srcElement).closest("." + t).length : jQuery(a.toElement).closest("." + t).length || jQuery(a.originalTarget).closest("." + t).length, t === !0 || 1 === t ? 1 : 0
},
d = function(i, a, n) {
i.data("opt", a);
var r = a.carousel;
jQuery(".bullet, .bullets, .tp-bullets, .tparrows").addClass("noSwipe"), r.Limit = "endless";
var s = (e || "Firefox" === t.get_browser(), i),
d = "vertical" === a.navigation.thumbnails.direction || "vertical" === a.navigation.tabs.direction ? "none" : "vertical",
l = a.navigation.touch.swipe_direction || "horizontal";
d = "swipebased" == n && "vertical" == l ? "none" : n ? "vertical" : d, jQuery.fn.swipetp || (jQuery.fn.swipetp = jQuery.fn.swipe), jQuery.fn.swipetp.defaults && jQuery.fn.swipetp.defaults.excludedElements || jQuery.fn.swipetp.defaults || (jQuery.fn.swipetp.defaults = new Object), jQuery.fn.swipetp.defaults.excludedElements = "label, button, input, select, textarea, .noSwipe", s.swipetp({
allowPageScroll: d,
triggerOnTouchLeave: !0,
excludeElements: jQuery.fn.swipetp.defaults.excludedElements,
swipeStatus: function(e, n, s, d) {
var h = o("rev_slider_wrapper", i, e),
p = o("tp-thumbs", i, e),
u = o("tp-tabs", i, e),
c = jQuery(this).attr("class"),
f = c.match(/tp-tabs|tp-thumb/gi) ? !0 : !1;
if ("carousel" === a.sliderType && (("move" === n || "end" === n || "cancel" == n) && a.dragStartedOverSlider && !a.dragStartedOverThumbs && !a.dragStartedOverTabs || "start" === n && h > 0 && 0 === p && 0 === u)) switch (a.dragStartedOverSlider = !0, d = s && s.match(/left|up/g) ? Math.round(-1 * d) : d = Math.round(1 * d), n) {
case "start":
void 0 !== r.positionanim && (r.positionanim.kill(), r.slide_globaloffset = "off" === r.infinity ? r.slide_offset : t.simp(r.slide_offset, r.maxwidth)), r.overpull = "none", r.wrap.addClass("dragged");
break;
case "move":
if (r.slide_offset = "off" === r.infinity ? r.slide_globaloffset + d : t.simp(r.slide_globaloffset + d, r.maxwidth), "off" === r.infinity) {
var g = "center" === r.horizontal_align ? (r.wrapwidth / 2 - r.slide_width / 2 - r.slide_offset) / r.slide_width : (0 - r.slide_offset) / r.slide_width;
"none" !== r.overpull && 0 !== r.overpull || !(0 > g || g > a.slideamount - 1) ? g >= 0 && g <= a.slideamount - 1 && (g >= 0 && d > r.overpull || g <= a.slideamount - 1 && d < r.overpull) && (r.overpull = 0) : r.overpull = d, r.slide_offset = 0 > g ? r.slide_offset + (r.overpull - d) / 1.1 + Math.sqrt(Math.abs((r.overpull - d) / 1.1)) : g > a.slideamount - 1 ? r.slide_offset + (r.overpull - d) / 1.1 - Math.sqrt(Math.abs((r.overpull - d) / 1.1)) : r.slide_offset
}
t.organiseCarousel(a, s, !0, !0);
break;
case "end":
case "cancel":
r.slide_globaloffset = r.slide_offset, r.wrap.removeClass("dragged"), t.carouselToEvalPosition(a, s), a.dragStartedOverSlider = !1, a.dragStartedOverThumbs = !1, a.dragStartedOverTabs = !1
} else {
if (("move" !== n && "end" !== n && "cancel" != n || a.dragStartedOverSlider || !a.dragStartedOverThumbs && !a.dragStartedOverTabs) && !("start" === n && h > 0 && (p > 0 || u > 0))) {
if ("end" == n && !f) {
if (a.sc_indicator = "arrow", "horizontal" == l && "left" == s || "vertical" == l && "up" == s) return a.sc_indicator_dir = 0, t.callingNewSlide(a, a.c, 1), !1;
if ("horizontal" == l && "right" == s || "vertical" == l && "down" == s) return a.sc_indicator_dir = 1, t.callingNewSlide(a, a.c, -1), !1
}
return a.dragStartedOverSlider = !1, a.dragStartedOverThumbs = !1, a.dragStartedOverTabs = !1, !0
}
p > 0 && (a.dragStartedOverThumbs = !0), u > 0 && (a.dragStartedOverTabs = !0);
var v = a.dragStartedOverThumbs ? ".tp-thumbs" : ".tp-tabs",
m = a.dragStartedOverThumbs ? ".tp-thumb-mask" : ".tp-tab-mask",
b = a.dragStartedOverThumbs ? ".tp-thumbs-inner-wrapper" : ".tp-tabs-inner-wrapper",
w = a.dragStartedOverThumbs ? ".tp-thumb" : ".tp-tab",
_ = a.dragStartedOverThumbs ? a.navigation.thumbnails : a.navigation.tabs;
d = s && s.match(/left|up/g) ? Math.round(-1 * d) : d = Math.round(1 * d);
var x = i.parent().find(m),
y = x.find(b),
T = _.direction,
L = "vertical" === T ? y.height() : y.width(),
j = "vertical" === T ? x.height() : x.width(),
C = "vertical" === T ? x.find(w).first().outerHeight(!0) + _.space : x.find(w).first().outerWidth(!0) + _.space,
S = void 0 === y.data("offset") ? 0 : parseInt(y.data("offset"), 0),
k = 0;
switch (n) {
case "start":
i.parent().find(v).addClass("dragged"), S = "vertical" === T ? y.position().top : y.position().left, y.data("offset", S), y.data("tmmove") && y.data("tmmove").pause();
break;
case "move":
if (j >= L) return !1;
k = S + d, k = k > 0 ? "horizontal" === T ? k - y.width() * (k / y.width() * k / y.width()) : k - y.height() * (k / y.height() * k / y.height()) : k;
var O = "vertical" === T ? 0 - (y.height() - x.height()) : 0 - (y.width() - x.width());
k = O > k ? "horizontal" === T ? k + y.width() * (k - O) / y.width() * (k - O) / y.width() : k + y.height() * (k - O) / y.height() * (k - O) / y.height() : k, "vertical" === T ? punchgs.TweenLite.set(y, {
top: k + "px"
}) : punchgs.TweenLite.set(y, {
left: k + "px"
});
break;
case "end":
case "cancel":
if (f) return k = S + d, k = "vertical" === T ? k < 0 - (y.height() - x.height()) ? 0 - (y.height() - x.height()) : k : k < 0 - (y.width() - x.width()) ? 0 - (y.width() - x.width()) : k, k = k > 0 ? 0 : k, k = Math.abs(d) > C / 10 ? 0 >= d ? Math.floor(k / C) * C : Math.ceil(k / C) * C : 0 > d ? Math.ceil(k / C) * C : Math.floor(k / C) * C, k = "vertical" === T ? k < 0 - (y.height() - x.height()) ? 0 - (y.height() - x.height()) : k : k < 0 - (y.width() - x.width()) ? 0 - (y.width() - x.width()) : k, k = k > 0 ? 0 : k, "vertical" === T ? punchgs.TweenLite.to(y, .5, {
top: k + "px",
ease: punchgs.Power3.easeOut
}) : punchgs.TweenLite.to(y, .5, {
left: k + "px",
ease: punchgs.Power3.easeOut
}), k = k ? k : "vertical" === T ? y.position().top : y.position().left, y.data("offset", k), y.data("distance", d), setTimeout(function() {
a.dragStartedOverSlider = !1, a.dragStartedOverThumbs = !1, a.dragStartedOverTabs = !1
}, 100), i.parent().find(v).removeClass("dragged"), !1
}
}
}
})
},
l = function(t) {
t.hide_delay = jQuery.isNumeric(parseInt(t.hide_delay, 0)) ? t.hide_delay / 1e3 : .2, t.hide_delay_mobile = jQuery.isNumeric(parseInt(t.hide_delay_mobile, 0)) ? t.hide_delay_mobile / 1e3 : .2
},
h = function(t) {
return t && t.enable
},
p = function(t) {
return t && t.enable && t.hide_onleave === !0 && (void 0 === t.position ? !0 : !t.position.match(/outer/g))
},
u = function(t, i) {
var a = t.parent();
p(i.navigation.arrows) && punchgs.TweenLite.delayedCall(e ? i.navigation.arrows.hide_delay_mobile : i.navigation.arrows.hide_delay, c, [a.find(".tparrows"), i.navigation.arrows, "hide"]), p(i.navigation.bullets) && punchgs.TweenLite.delayedCall(e ? i.navigation.bullets.hide_delay_mobile : i.navigation.bullets.hide_delay, c, [a.find(".tp-bullets"), i.navigation.bullets, "hide"]), p(i.navigation.thumbnails) && punchgs.TweenLite.delayedCall(e ? i.navigation.thumbnails.hide_delay_mobile : i.navigation.thumbnails.hide_delay, c, [a.find(".tp-thumbs"), i.navigation.thumbnails, "hide"]), p(i.navigation.tabs) && punchgs.TweenLite.delayedCall(e ? i.navigation.tabs.hide_delay_mobile : i.navigation.tabs.hide_delay, c, [a.find(".tp-tabs"), i.navigation.tabs, "hide"])
},
c = function(t, e, i, a) {
switch (a = void 0 === a ? .5 : a, i) {
case "show":
punchgs.TweenLite.to(t, a, {
autoAlpha: 1,
ease: punchgs.Power3.easeInOut,
overwrite: "auto"
});
break;
case "hide":
punchgs.TweenLite.to(t, a, {
autoAlpha: 0,
ease: punchgs.Power3.easeInOu,
overwrite: "auto"
})
}
},
f = function(t, e, i) {
e.style = void 0 === e.style ? "" : e.style, e.left.style = void 0 === e.left.style ? "" : e.left.style, e.right.style = void 0 === e.right.style ? "" : e.right.style, 0 === t.find(".tp-leftarrow.tparrows").length && t.append('<div class="tp-leftarrow tparrows ' + e.style + " " + e.left.style + '">' + e.tmp + "</div>"), 0 === t.find(".tp-rightarrow.tparrows").length && t.append('<div class="tp-rightarrow tparrows ' + e.style + " " + e.right.style + '">' + e.tmp + "</div>");
var a = t.find(".tp-leftarrow.tparrows"),
n = t.find(".tp-rightarrow.tparrows");
n.click(function() {
i.sc_indicator = "arrow", i.sc_indicator_dir = 0, t.revnext()
}), a.click(function() {
i.sc_indicator = "arrow", i.sc_indicator_dir = 1, t.revprev()
}), e.right.j = t.find(".tp-rightarrow.tparrows"), e.left.j = t.find(".tp-leftarrow.tparrows"), e.padding_top = parseInt(i.carousel.padding_top || 0, 0), e.padding_bottom = parseInt(i.carousel.padding_bottom || 0, 0), m(a, e.left), m(n, e.right), ("outer-left" == e.position || "outer-right" == e.position) && (i.outernav = !0)
},
g = function(t, e) {
var i = t.outerHeight(!0),
a = (t.outerWidth(!0), "top" === e.v_align ? {
top: "0px",
y: Math.round(e.v_offset) + "px"
} : "center" === e.v_align ? {
top: "50%",
y: Math.round(0 - i / 2 + e.v_offset) + "px"
} : {
top: "100%",
y: Math.round(0 - (i + e.v_offset)) + "px"
});
t.hasClass("outer-bottom") || punchgs.TweenLite.set(t, a)
},
v = function(t, e) {
var i = (t.outerHeight(!0), t.outerWidth(!0)),
a = "left" === e.h_align ? {
left: "0px",
x: Math.round(e.h_offset) + "px"
} : "center" === e.h_align ? {
left: "50%",
x: Math.round(0 - i / 2 + e.h_offset) + "px"
} : {
left: "100%",
x: Math.round(0 - (i + e.h_offset)) + "px"
};
punchgs.TweenLite.set(t, a)
},
m = function(t, e) {
var i = t.closest(".tp-simpleresponsive").length > 0 ? t.closest(".tp-simpleresponsive") : t.closest(".tp-revslider-mainul").length > 0 ? t.closest(".tp-revslider-mainul") : t.closest(".rev_slider_wrapper").length > 0 ? t.closest(".rev_slider_wrapper") : t.parent().find(".tp-revslider-mainul"),
a = i.width(),
n = i.height();
if (g(t, e), v(t, e), "outer-left" !== e.position || "fullwidth" != e.sliderLayout && "fullscreen" != e.sliderLayout ? "outer-right" !== e.position || "fullwidth" != e.sliderLayout && "fullscreen" != e.sliderLayout || punchgs.TweenLite.set(t, {
right: 0 - t.outerWidth() + "px",
x: e.h_offset + "px"
}) : punchgs.TweenLite.set(t, {
left: 0 - t.outerWidth() + "px",
x: e.h_offset + "px"
}), t.hasClass("tp-thumbs") || t.hasClass("tp-tabs")) {
var r = t.data("wr_padding"),
s = t.data("maxw"),
o = t.data("maxh"),
d = t.find(t.hasClass("tp-thumbs") ? ".tp-thumb-mask" : ".tp-tab-mask"),
l = parseInt(e.padding_top || 0, 0),
h = parseInt(e.padding_bottom || 0, 0);
s > a && "outer-left" !== e.position && "outer-right" !== e.position ? (punchgs.TweenLite.set(t, {
left: "0px",
x: 0,
maxWidth: a - 2 * r + "px"
}), punchgs.TweenLite.set(d, {
maxWidth: a - 2 * r + "px"
})) : (punchgs.TweenLite.set(t, {
maxWidth: s + "px"
}), punchgs.TweenLite.set(d, {
maxWidth: s + "px"
})), o + 2 * r > n && "outer-bottom" !== e.position && "outer-top" !== e.position ? (punchgs.TweenLite.set(t, {
top: "0px",
y: 0,
maxHeight: l + h + (n - 2 * r) + "px"
}), punchgs.TweenLite.set(d, {
maxHeight: l + h + (n - 2 * r) + "px"
})) : (punchgs.TweenLite.set(t, {
maxHeight: o + "px"
}), punchgs.TweenLite.set(d, {
maxHeight: o + "px"
})), "outer-left" !== e.position && "outer-right" !== e.position && (l = 0, h = 0), e.span === !0 && "vertical" === e.direction ? (punchgs.TweenLite.set(t, {
maxHeight: l + h + (n - 2 * r) + "px",
height: l + h + (n - 2 * r) + "px",
top: 0 - l,
y: 0
}), g(d, e)) : e.span === !0 && "horizontal" === e.direction && (punchgs.TweenLite.set(t, {
maxWidth: "100%",
width: a - 2 * r + "px",
left: 0,
x: 0
}), v(d, e))
}
},
b = function(t, e, i, a) {
0 === t.find(".tp-bullets").length && (e.style = void 0 === e.style ? "" : e.style, t.append('<div class="tp-bullets ' + e.style + " " + e.direction + '"></div>'));
var n = t.find(".tp-bullets"),
r = i.data("index"),
s = e.tmp;
jQuery.each(a.thumbs[i.index()].params, function(t, e) {
s = s.replace(e.from, e.to)
}), n.append('<div class="justaddedbullet tp-bullet">' + s + "</div>");
var o = t.find(".justaddedbullet"),
d = t.find(".tp-bullet").length,
l = o.outerWidth() + parseInt(void 0 === e.space ? 0 : e.space, 0),
h = o.outerHeight() + parseInt(void 0 === e.space ? 0 : e.space, 0);
"vertical" === e.direction ? (o.css({
top: (d - 1) * h + "px",
left: "0px"
}), n.css({
height: (d - 1) * h + o.outerHeight(),
width: o.outerWidth()
})) : (o.css({
left: (d - 1) * l + "px",
top: "0px"
}), n.css({
width: (d - 1) * l + o.outerWidth(),
height: o.outerHeight()
})), o.find(".tp-bullet-image").css({
backgroundImage: "url(" + a.thumbs[i.index()].src + ")"
}), o.data("liref", r), o.click(function() {
a.sc_indicator = "bullet", t.revcallslidewithid(r), t.find(".tp-bullet").removeClass("selected"), jQuery(this).addClass("selected")
}), o.removeClass("justaddedbullet"), e.padding_top = parseInt(a.carousel.padding_top || 0, 0), e.padding_bottom = parseInt(a.carousel.padding_bottom || 0, 0), ("outer-left" == e.position || "outer-right" == e.position) && (a.outernav = !0), m(n, e)
},
w = function(t, e) {
e = parseFloat(e), t = t.replace("#", "");
var i = parseInt(t.substring(0, 2), 16),
a = parseInt(t.substring(2, 4), 16),
n = parseInt(t.substring(4, 6), 16),
r = "rgba(" + i + "," + a + "," + n + "," + e + ")";
return r
},
_ = function(t, e, i, a, n) {
var r = "tp-thumb" === a ? ".tp-thumbs" : ".tp-tabs",
s = "tp-thumb" === a ? ".tp-thumb-mask" : ".tp-tab-mask",
o = "tp-thumb" === a ? ".tp-thumbs-inner-wrapper" : ".tp-tabs-inner-wrapper",
d = "tp-thumb" === a ? ".tp-thumb" : ".tp-tab",
l = "tp-thumb" === a ? ".tp-thumb-image" : ".tp-tab-image";
if (e.visibleAmount = e.visibleAmount > n.slideamount ? n.slideamount : e.visibleAmount, e.sliderLayout = n.sliderLayout, 0 === t.parent().find(r).length) {
e.style = void 0 === e.style ? "" : e.style;
var h = e.span === !0 ? "tp-span-wrapper" : "",
p = '<div class="' + a + "s " + h + " " + e.position + " " + e.style + '"><div class="' + a + '-mask"><div class="' + a + 's-inner-wrapper" style="position:relative;"></div></div></div>';
"outer-top" === e.position ? t.parent().prepend(p) : "outer-bottom" === e.position ? t.after(p) : t.append(p), e.padding_top = parseInt(n.carousel.padding_top || 0, 0), e.padding_bottom = parseInt(n.carousel.padding_bottom || 0, 0), ("outer-left" == e.position || "outer-right" == e.position) && (n.outernav = !0)
}
var u = i.data("index"),
c = t.parent().find(r),
f = c.find(s),
g = f.find(o),
v = "horizontal" === e.direction ? e.width * e.visibleAmount + e.space * (e.visibleAmount - 1) : e.width,
b = "horizontal" === e.direction ? e.height : e.height * e.visibleAmount + e.space * (e.visibleAmount - 1),
_ = e.tmp;
jQuery.each(n.thumbs[i.index()].params, function(t, e) {
_ = _.replace(e.from, e.to)
}), g.append('<div data-liindex="' + i.index() + '" data-liref="' + u + '" class="justaddedthumb ' + a + '" style="width:' + e.width + "px;height:" + e.height + 'px;">' + _ + "</div>");
var x = c.find(".justaddedthumb"),
y = c.find(d).length,
T = x.outerWidth() + parseInt(void 0 === e.space ? 0 : e.space, 0),
L = x.outerHeight() + parseInt(void 0 === e.space ? 0 : e.space, 0);
x.find(l).css({
backgroundImage: "url(" + n.thumbs[i.index()].src + ")"
}), "vertical" === e.direction ? (x.css({
top: (y - 1) * L + "px",
left: "0px"
}), g.css({
height: (y - 1) * L + x.outerHeight(),
width: x.outerWidth()
})) : (x.css({
left: (y - 1) * T + "px",
top: "0px"
}), g.css({
width: (y - 1) * T + x.outerWidth(),
height: x.outerHeight()
})), c.data("maxw", v), c.data("maxh", b), c.data("wr_padding", e.wrapper_padding);
var j = "outer-top" === e.position || "outer-bottom" === e.position ? "relative" : "absolute",
C = "outer-top" !== e.position && "outer-bottom" !== e.position || "center" !== e.h_align ? "0" : "auto";
f.css({
maxWidth: v + "px",
maxHeight: b + "px",
overflow: "hidden",
position: "relative"
}), c.css({
maxWidth: v + "px",
margin: C,
maxHeight: b + "px",
overflow: "visible",
position: j,
background: w(e.wrapper_color, e.wrapper_opacity),
padding: e.wrapper_padding + "px",
boxSizing: "contet-box"
}), x.click(function() {
n.sc_indicator = "bullet";
var e = t.parent().find(o).data("distance");
e = void 0 === e ? 0 : e, Math.abs(e) < 10 && (t.revcallslidewithid(u), t.parent().find(r).removeClass("selected"), jQuery(this).addClass("selected"))
}), x.removeClass("justaddedthumb"), m(c, e)
},
x = function(t) {
var e = t.c.parent().find(".outer-top"),
i = t.c.parent().find(".outer-bottom");
t.top_outer = e.hasClass("tp-forcenotvisible") ? 0 : e.outerHeight() || 0, t.bottom_outer = i.hasClass("tp-forcenotvisible") ? 0 : i.outerHeight() || 0
},
y = function(t, e, i, a) {
e > i || i > a ? t.addClass("tp-forcenotvisible") : t.removeClass("tp-forcenotvisible")
}
}(jQuery);
#2 JavaScript::Eval (size: 28365) - SHA256: 5d6b15cb51f2e3286d62a93607e03f07712778d13592e22be22621d1b43d45f5
/**
* 2016 Revolution Slider
*
* @author SmatDataSoft <support@smartdatasoft.com>
* @copyright 2016 SmatDataSoft
* @license private
* @version 5.1.3
* International Registered Trademark & Property of SmatDataSoft
*/
/************************************************
* REVOLUTION 5.0 EXTENSION - SLIDE ANIMATIONS
* @version: 1.1.0 (10.11.2015)
* @requires jquery.themepunch.revolution.js
* @author ThemePunch
************************************************/
! function() {
var t = jQuery.fn.revolution;
jQuery.extend(!0, t, {
animateSlide: function(t, e, o, a, n, r, s, l, d) {
return i(t, e, o, a, n, r, s, l, d)
}
});
var e = function(e, o, a, i) {
var n = e,
r = n.find(".defaultimg"),
s = n.data("zoomstart"),
l = n.data("rotationstart");
void 0 != r.data("currotate") && (l = r.data("currotate")), void 0 != r.data("curscale") && "box" == i ? s = 100 * r.data("curscale") : void 0 != r.data("curscale") && (s = r.data("curscale")), t.slotSize(r, o);
var d = r.attr("src"),
h = r.css("backgroundColor"),
f = o.width,
c = o.height,
p = r.data("fxof"),
u = 0;
"on" == o.autoHeight && (c = o.c.height()), void 0 == p && (p = 0);
var g = 0,
w = r.data("bgfit"),
v = r.data("bgrepeat"),
m = r.data("bgposition");
switch (void 0 == w && (w = "cover"), void 0 == v && (v = "no-repeat"), void 0 == m && (m = "center center"), i) {
case "box":
for (var x = 0, y = 0, T = 0; T < o.slots; T++) {
y = 0;
for (var z = 0; z < o.slots; z++) n.append('<div class="slot" style="position:absolute;top:' + (u + y) + "px;left:" + (p + x) + "px;width:" + o.slotw + "px;height:" + o.sloth + 'px;overflow:hidden;"><div class="slotslide" data-x="' + x + '" data-y="' + y + '" style="position:absolute;top:0px;left:0px;width:' + o.slotw + "px;height:" + o.sloth + 'px;overflow:hidden;"><div style="position:absolute;top:' + (0 - y) + "px;left:" + (0 - x) + "px;width:" + f + "px;height:" + c + "px;background-color:" + h + ";background-image:url(" + d + ");background-repeat:" + v + ";background-size:" + w + ";background-position:" + m + ';"></div></div></div>'), y += o.sloth, void 0 != s && void 0 != l && punchgs.TweenLite.set(n.find(".slot").last(), {
rotationZ: l
});
x += o.slotw
}
break;
case "vertical":
case "horizontal":
if ("horizontal" == i) {
if (!a) var g = 0 - o.slotw;
for (var z = 0; z < o.slots; z++) n.append('<div class="slot" style="position:absolute;top:' + (0 + u) + "px;left:" + (p + z * o.slotw) + "px;overflow:hidden;width:" + (o.slotw + .6) + "px;height:" + c + 'px"><div class="slotslide" style="position:absolute;top:0px;left:' + g + "px;width:" + (o.slotw + .6) + "px;height:" + c + 'px;overflow:hidden;"><div style="background-color:' + h + ";position:absolute;top:0px;left:" + (0 - z * o.slotw) + "px;width:" + f + "px;height:" + c + "px;background-image:url(" + d + ");background-repeat:" + v + ";background-size:" + w + ";background-position:" + m + ';"></div></div></div>'), void 0 != s && void 0 != l && punchgs.TweenLite.set(n.find(".slot").last(), {
rotationZ: l
})
} else {
if (!a) var g = 0 - o.sloth;
for (var z = 0; z < o.slots + 2; z++) n.append('<div class="slot" style="position:absolute;top:' + (u + z * o.sloth) + "px;left:" + p + "px;overflow:hidden;width:" + f + "px;height:" + o.sloth + 'px"><div class="slotslide" style="position:absolute;top:' + g + "px;left:0px;width:" + f + "px;height:" + o.sloth + 'px;overflow:hidden;"><div style="background-color:' + h + ";position:absolute;top:" + (0 - z * o.sloth) + "px;left:0px;width:" + f + "px;height:" + c + "px;background-image:url(" + d + ");background-repeat:" + v + ";background-size:" + w + ";background-position:" + m + ';"></div></div></div>'), void 0 != s && void 0 != l && punchgs.TweenLite.set(n.find(".slot").last(), {
rotationZ: l
})
}
}
},
o = function(t, e, o, a, i) {
function n() {
jQuery.each(y, function(t, e) {
(e[0] == o || e[8] == o) && (w = e[1], v = e[2], m = x), x += 1
})
}
var r = punchgs.Power1.easeIn,
s = punchgs.Power1.easeOut,
l = punchgs.Power1.easeInOut,
d = punchgs.Power2.easeIn,
h = punchgs.Power2.easeOut,
f = punchgs.Power2.easeInOut,
c = (punchgs.Power3.easeIn, punchgs.Power3.easeOut),
p = punchgs.Power3.easeInOut,
u = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45],
g = [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27],
w = 0,
v = 1,
m = 0,
x = 0,
y = (new Array, [
["boxslide", 0, 1, 10, 0, "box", !1, null, 0, s, s, 500, 6],
["boxfade", 1, 0, 10, 0, "box", !1, null, 1, l, l, 700, 5],
["slotslide-horizontal", 2, 0, 0, 200, "horizontal", !0, !1, 2, f, f, 700, 3],
["slotslide-vertical", 3, 0, 0, 200, "vertical", !0, !1, 3, f, f, 700, 3],
["curtain-1", 4, 3, 0, 0, "horizontal", !0, !0, 4, s, s, 300, 5],
["curtain-2", 5, 3, 0, 0, "horizontal", !0, !0, 5, s, s, 300, 5],
["curtain-3", 6, 3, 25, 0, "horizontal", !0, !0, 6, s, s, 300, 5],
["slotzoom-horizontal", 7, 0, 0, 400, "horizontal", !0, !0, 7, s, s, 300, 7],
["slotzoom-vertical", 8, 0, 0, 0, "vertical", !0, !0, 8, h, h, 500, 8],
["slotfade-horizontal", 9, 0, 0, 500, "horizontal", !0, null, 9, h, h, 500, 25],
["slotfade-vertical", 10, 0, 0, 500, "vertical", !0, null, 10, h, h, 500, 25],
["fade", 11, 0, 1, 300, "horizontal", !0, null, 11, f, f, 1e3, 1],
["crossfade", 11, 1, 1, 300, "horizontal", !0, null, 11, f, f, 1e3, 1],
["fadethroughdark", 11, 2, 1, 300, "horizontal", !0, null, 11, f, f, 1e3, 1],
["fadethroughlight", 11, 3, 1, 300, "horizontal", !0, null, 11, f, f, 1e3, 1],
["fadethroughtransparent", 11, 4, 1, 300, "horizontal", !0, null, 11, f, f, 1e3, 1],
["slideleft", 12, 0, 1, 0, "horizontal", !0, !0, 12, p, p, 1e3, 1],
["slideup", 13, 0, 1, 0, "horizontal", !0, !0, 13, p, p, 1e3, 1],
["slidedown", 14, 0, 1, 0, "horizontal", !0, !0, 14, p, p, 1e3, 1],
["slideright", 15, 0, 1, 0, "horizontal", !0, !0, 15, p, p, 1e3, 1],
["slideoverleft", 12, 7, 1, 0, "horizontal", !0, !0, 12, p, p, 1e3, 1],
["slideoverup", 13, 7, 1, 0, "horizontal", !0, !0, 13, p, p, 1e3, 1],
["slideoverdown", 14, 7, 1, 0, "horizontal", !0, !0, 14, p, p, 1e3, 1],
["slideoverright", 15, 7, 1, 0, "horizontal", !0, !0, 15, p, p, 1e3, 1],
["slideremoveleft", 12, 8, 1, 0, "horizontal", !0, !0, 12, p, p, 1e3, 1],
["slideremoveup", 13, 8, 1, 0, "horizontal", !0, !0, 13, p, p, 1e3, 1],
["slideremovedown", 14, 8, 1, 0, "horizontal", !0, !0, 14, p, p, 1e3, 1],
["slideremoveright", 15, 8, 1, 0, "horizontal", !0, !0, 15, p, p, 1e3, 1],
["papercut", 16, 0, 0, 600, "", null, null, 16, p, p, 1e3, 2],
["3dcurtain-horizontal", 17, 0, 20, 100, "vertical", !1, !0, 17, l, l, 500, 7],
["3dcurtain-vertical", 18, 0, 10, 100, "horizontal", !1, !0, 18, l, l, 500, 5],
["cubic", 19, 0, 20, 600, "horizontal", !1, !0, 19, p, p, 500, 1],
["cube", 19, 0, 20, 600, "horizontal", !1, !0, 20, p, p, 500, 1],
["flyin", 20, 0, 4, 600, "vertical", !1, !0, 21, c, p, 500, 1],
["turnoff", 21, 0, 1, 500, "horizontal", !1, !0, 22, p, p, 500, 1],
["incube", 22, 0, 20, 200, "horizontal", !1, !0, 23, f, f, 500, 1],
["cubic-horizontal", 23, 0, 20, 500, "vertical", !1, !0, 24, h, h, 500, 1],
["cube-horizontal", 23, 0, 20, 500, "vertical", !1, !0, 25, h, h, 500, 1],
["incube-horizontal", 24, 0, 20, 500, "vertical", !1, !0, 26, f, f, 500, 1],
["turnoff-vertical", 25, 0, 1, 200, "horizontal", !1, !0, 27, f, f, 500, 1],
["fadefromright", 12, 1, 1, 0, "horizontal", !0, !0, 28, f, f, 1e3, 1],
["fadefromleft", 15, 1, 1, 0, "horizontal", !0, !0, 29, f, f, 1e3, 1],
["fadefromtop", 14, 1, 1, 0, "horizontal", !0, !0, 30, f, f, 1e3, 1],
["fadefrombottom", 13, 1, 1, 0, "horizontal", !0, !0, 31, f, f, 1e3, 1],
["fadetoleftfadefromright", 12, 2, 1, 0, "horizontal", !0, !0, 32, f, f, 1e3, 1],
["fadetorightfadefromleft", 15, 2, 1, 0, "horizontal", !0, !0, 33, f, f, 1e3, 1],
["fadetobottomfadefromtop", 14, 2, 1, 0, "horizontal", !0, !0, 34, f, f, 1e3, 1],
["fadetotopfadefrombottom", 13, 2, 1, 0, "horizontal", !0, !0, 35, f, f, 1e3, 1],
["parallaxtoright", 12, 3, 1, 0, "horizontal", !0, !0, 36, f, d, 1500, 1],
["parallaxtoleft", 15, 3, 1, 0, "horizontal", !0, !0, 37, f, d, 1500, 1],
["parallaxtotop", 14, 3, 1, 0, "horizontal", !0, !0, 38, f, r, 1500, 1],
["parallaxtobottom", 13, 3, 1, 0, "horizontal", !0, !0, 39, f, r, 1500, 1],
["scaledownfromright", 12, 4, 1, 0, "horizontal", !0, !0, 40, f, d, 1e3, 1],
["scaledownfromleft", 15, 4, 1, 0, "horizontal", !0, !0, 41, f, d, 1e3, 1],
["scaledownfromtop", 14, 4, 1, 0, "horizontal", !0, !0, 42, f, d, 1e3, 1],
["scaledownfrombottom", 13, 4, 1, 0, "horizontal", !0, !0, 43, f, d, 1e3, 1],
["zoomout", 13, 5, 1, 0, "horizontal", !0, !0, 44, f, d, 1e3, 1],
["zoomin", 13, 6, 1, 0, "horizontal", !0, !0, 45, f, d, 1e3, 1],
["slidingoverlayup", 27, 0, 1, 0, "horizontal", !0, !0, 47, l, s, 2e3, 1],
["slidingoverlaydown", 28, 0, 1, 0, "horizontal", !0, !0, 48, l, s, 2e3, 1],
["slidingoverlayright", 30, 0, 1, 0, "horizontal", !0, !0, 49, l, s, 2e3, 1],
["slidingoverlayleft", 29, 0, 1, 0, "horizontal", !0, !0, 50, l, s, 2e3, 1],
["parallaxcirclesup", 31, 0, 1, 0, "horizontal", !0, !0, 51, f, r, 1500, 1],
["parallaxcirclesdown", 32, 0, 1, 0, "horizontal", !0, !0, 52, f, r, 1500, 1],
["parallaxcirclesright", 33, 0, 1, 0, "horizontal", !0, !0, 53, f, r, 1500, 1],
["parallaxcirclesleft", 34, 0, 1, 0, "horizontal", !0, !0, 54, f, r, 1500, 1],
["notransition", 26, 0, 1, 0, "horizontal", !0, null, 46, f, d, 1e3, 1],
["parallaxright", 12, 3, 1, 0, "horizontal", !0, !0, 55, f, d, 1500, 1],
["parallaxleft", 15, 3, 1, 0, "horizontal", !0, !0, 56, f, d, 1500, 1],
["parallaxup", 14, 3, 1, 0, "horizontal", !0, !0, 57, f, r, 1500, 1],
["parallaxdown", 13, 3, 1, 0, "horizontal", !0, !0, 58, f, r, 1500, 1]
]);
e.duringslidechange = !0, e.testanims = !1, 1 == e.testanims && (e.nexttesttransform = void 0 === e.nexttesttransform ? 34 : e.nexttesttransform + 1, e.nexttesttransform = e.nexttesttransform > 70 ? 0 : e.nexttesttransform, o = y[e.nexttesttransform][0], console.log(o + " " + e.nexttesttransform + " " + y[e.nexttesttransform][1] + " " + y[e.nexttesttransform][2])), jQuery.each(["parallaxcircles", "slidingoverlay", "slide", "slideover", "slideremove", "parallax"], function(t, e) {
o == e + "horizontal" && (o = 1 != i ? e + "left" : e + "right"), o == e + "vertical" && (o = 1 != i ? e + "up" : e + "down")
}), "random" == o && (o = Math.round(Math.random() * y.length - 1), o > y.length - 1 && (o = y.length - 1)), "random-static" == o && (o = Math.round(Math.random() * u.length - 1), o > u.length - 1 && (o = u.length - 1), o = u[o]), "random-premium" == o && (o = Math.round(Math.random() * g.length - 1), o > g.length - 1 && (o = g.length - 1), o = g[o]);
var T = [12, 13, 14, 15, 16, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45];
if (1 == e.isJoomla && void 0 != window.MooTools && -1 != T.indexOf(o)) {
var z = Math.round(Math.random() * (g.length - 2)) + 1;
z > g.length - 1 && (z = g.length - 1), 0 == z && (z = 1), o = g[z]
}
n(), w > 30 && (w = 30), 0 > w && (w = 0);
var L = new Object;
return L.nexttrans = w, L.STA = y[m], L.specials = v, L
},
a = function(t, e) {
return void 0 == e || jQuery.isNumeric(t) ? t : void 0 == t ? t : t.split(",")[e]
},
i = function(t, i, n, r, s, l, d, h, f) {
function c(t, e, o, a, i) {
var n = t.find(".slot"),
r = 6,
s = [2, 1.2, .9, .7, .55, .42],
l = t.width(),
h = t.height();
n.wrap('<div class="slot-circle-wrapper" style="overflow:hidden;position:absolute;border:1px solid #fff"></div>');
for (var c = 0; r > c; c++) n.parent().clone(!1).appendTo(d);
t.find(".slot-circle-wrapper").each(function(t) {
if (r > t) {
var a = jQuery(this),
n = a.find(".slot"),
d = l > h ? s[t] * l : s[t] * h,
c = d,
p = 0 + (c / 2 - l / 2),
u = 0 + (d / 2 - h / 2),
g = 0 != t ? "50%" : "0",
w = 31 == o ? h / 2 - d / 2 : 32 == o ? h / 2 - d / 2 : h / 2 - d / 2,
v = 33 == o ? l / 2 - c / 2 : 34 == o ? l - c : l / 2 - c / 2,
m = {
scale: 1,
transformOrigo: "50% 50%",
width: c + "px",
height: d + "px",
top: w + "px",
left: v + "px",
borderRadius: g
},
x = {
scale: 1,
top: h / 2 - d / 2,
left: l / 2 - c / 2,
ease: i
},
y = 31 == o ? u : 32 == o ? u : u,
T = 33 == o ? p : 34 == o ? p + l / 2 : p,
z = {
width: l,
height: h,
autoAlpha: 1,
top: y + "px",
position: "absolute",
left: T + "px"
},
L = {
top: u + "px",
left: p + "px",
ease: i
},
b = e,
D = 0;
f.add(punchgs.TweenLite.fromTo(a, b, m, x), D), f.add(punchgs.TweenLite.fromTo(n, b, z, L), D), f.add(punchgs.TweenLite.fromTo(a, .001, {
autoAlpha: 0
}, {
autoAlpha: 1
}), 0)
}
})
}
var p = l.index(),
u = s.index(),
g = p > u ? 1 : 0;
"arrow" == r.sc_indicator && (g = r.sc_indicator_dir);
var w = o(n, r, i, d, g),
v = w.STA,
m = w.specials,
t = w.nexttrans;
"on" == d.data("kenburns") && (t = 11);
var x = s.data("nexttransid") || 0,
y = a(s.data("masterspeed"), x);
y = "default" === y ? v[11] : "random" === y ? Math.round(1e3 * Math.random() + 300) : void 0 != y ? parseInt(y, 0) : v[11], y = y > r.delay ? r.delay : y, y += v[4], r.slots = a(s.data("slotamount"), x), r.slots = void 0 == r.slots || "default" == r.slots ? v[12] : "random" == r.slots ? Math.round(12 * Math.random() + 4) : r.slots, r.slots = r.slots < 1 ? "boxslide" == i ? Math.round(6 * Math.random() + 3) : "flyin" == i ? Math.round(4 * Math.random() + 1) : r.slots : r.slots, r.slots = (4 == t || 5 == t || 6 == t) && r.slots < 3 ? 3 : r.slots, r.slots = 0 != v[3] ? Math.min(r.slots, v[3]) : r.slots, r.slots = 9 == t ? r.width / 20 : 10 == t ? r.height / 20 : r.slots, r.rotate = a(s.data("rotate"), x), r.rotate = void 0 == r.rotate || "default" == r.rotate ? 0 : 999 == r.rotate || "random" == r.rotate ? Math.round(360 * Math.random()) : r.rotate, r.rotate = !jQuery.support.transition || r.ie || r.ie9 ? 0 : r.rotate, 11 != t && (null != v[7] && e(h, r, v[7], v[5]), null != v[6] && e(d, r, v[6], v[5])), f.add(punchgs.TweenLite.set(d.find(".defaultvid"), {
y: 0,
x: 0,
top: 0,
left: 0,
scale: 1
}), 0), f.add(punchgs.TweenLite.set(h.find(".defaultvid"), {
y: 0,
x: 0,
top: 0,
left: 0,
scale: 1
}), 0), f.add(punchgs.TweenLite.set(d.find(".defaultvid"), {
y: "+0%",
x: "+0%"
}), 0), f.add(punchgs.TweenLite.set(h.find(".defaultvid"), {
y: "+0%",
x: "+0%"
}), 0), f.add(punchgs.TweenLite.set(d, {
autoAlpha: 1,
y: "+0%",
x: "+0%"
}), 0), f.add(punchgs.TweenLite.set(h, {
autoAlpha: 1,
y: "+0%",
x: "+0%"
}), 0), f.add(punchgs.TweenLite.set(d.parent(), {
backgroundColor: "transparent"
}), 0), f.add(punchgs.TweenLite.set(h.parent(), {
backgroundColor: "transparent"
}), 0);
var T = a(s.data("easein"), x),
z = a(s.data("easeout"), x);
if (T = "default" === T ? v[9] || punchgs.Power2.easeInOut : T || v[9] || punchgs.Power2.easeInOut, z = "default" === z ? v[10] || punchgs.Power2.easeInOut : z || v[10] || punchgs.Power2.easeInOut, 0 == t) {
var L = Math.ceil(r.height / r.sloth),
b = 0;
d.find(".slotslide").each(function(t) {
var e = jQuery(this);
b += 1, b == L && (b = 0), f.add(punchgs.TweenLite.from(e, y / 600, {
opacity: 0,
top: 0 - r.sloth,
left: 0 - r.slotw,
rotation: r.rotate,
force3D: "auto",
ease: T
}), (15 * t + 30 * b) / 1500)
})
}
if (1 == t) {
var D, A = 0;
d.find(".slotslide").each(function(t) {
var e = jQuery(this),
o = Math.random() * y + 300,
a = 500 * Math.random() + 200;
o + a > D && (D = a + a, A = t), f.add(punchgs.TweenLite.from(e, o / 1e3, {
autoAlpha: 0,
force3D: "auto",
rotation: r.rotate,
ease: T
}), a / 1e3)
})
}
if (2 == t) {
var j = new punchgs.TimelineLite;
h.find(".slotslide").each(function() {
var t = jQuery(this);
j.add(punchgs.TweenLite.to(t, y / 1e3, {
left: r.slotw,
ease: T,
force3D: "auto",
rotation: 0 - r.rotate
}), 0), f.add(j, 0)
}), d.find(".slotslide").each(function() {
var t = jQuery(this);
j.add(punchgs.TweenLite.from(t, y / 1e3, {
left: 0 - r.slotw,
ease: T,
force3D: "auto",
rotation: r.rotate
}), 0), f.add(j, 0)
})
}
if (3 == t) {
var j = new punchgs.TimelineLite;
h.find(".slotslide").each(function() {
var t = jQuery(this);
j.add(punchgs.TweenLite.to(t, y / 1e3, {
top: r.sloth,
ease: T,
rotation: r.rotate,
force3D: "auto",
transformPerspective: 600
}), 0), f.add(j, 0)
}), d.find(".slotslide").each(function() {
var t = jQuery(this);
j.add(punchgs.TweenLite.from(t, y / 1e3, {
top: 0 - r.sloth,
rotation: r.rotate,
ease: z,
force3D: "auto",
transformPerspective: 600
}), 0), f.add(j, 0)
})
}
if (4 == t || 5 == t) {
setTimeout(function() {
h.find(".defaultimg").css({
opacity: 0
})
}, 100);
var k = y / 1e3,
j = new punchgs.TimelineLite;
h.find(".slotslide").each(function(e) {
var o = jQuery(this),
a = e * k / r.slots;
5 == t && (a = (r.slots - e - 1) * k / r.slots / 1.5), j.add(punchgs.TweenLite.to(o, 3 * k, {
transformPerspective: 600,
force3D: "auto",
top: 0 + r.height,
opacity: .5,
rotation: r.rotate,
ease: T,
delay: a
}), 0), f.add(j, 0)
}), d.find(".slotslide").each(function(e) {
var o = jQuery(this),
a = e * k / r.slots;
5 == t && (a = (r.slots - e - 1) * k / r.slots / 1.5), j.add(punchgs.TweenLite.from(o, 3 * k, {
top: 0 - r.height,
opacity: .5,
rotation: r.rotate,
force3D: "auto",
ease: punchgs.eo,
delay: a
}), 0), f.add(j, 0)
})
}
if (6 == t) {
r.slots < 2 && (r.slots = 2), r.slots % 2 && (r.slots = r.slots + 1);
var j = new punchgs.TimelineLite;
setTimeout(function() {
h.find(".defaultimg").css({
opacity: 0
})
}, 100), h.find(".slotslide").each(function(t) {
var e = jQuery(this);
if (t + 1 < r.slots / 2) var o = 90 * (t + 2);
else var o = 90 * (2 + r.slots - t);
j.add(punchgs.TweenLite.to(e, (y + o) / 1e3, {
top: 0 + r.height,
opacity: 1,
force3D: "auto",
rotation: r.rotate,
ease: T
}), 0), f.add(j, 0)
}), d.find(".slotslide").each(function(t) {
var e = jQuery(this);
if (t + 1 < r.slots / 2) var o = 90 * (t + 2);
else var o = 90 * (2 + r.slots - t);
j.add(punchgs.TweenLite.from(e, (y + o) / 1e3, {
top: 0 - r.height,
opacity: 1,
force3D: "auto",
rotation: r.rotate,
ease: z
}), 0), f.add(j, 0)
})
}
if (7 == t) {
y = 2 * y, y > r.delay && (y = r.delay);
var j = new punchgs.TimelineLite;
setTimeout(function() {
h.find(".defaultimg").css({
opacity: 0
})
}, 100), h.find(".slotslide").each(function() {
var t = jQuery(this).find("div");
j.add(punchgs.TweenLite.to(t, y / 1e3, {
left: 0 - r.slotw / 2 + "px",
top: 0 - r.height / 2 + "px",
width: 2 * r.slotw + "px",
height: 2 * r.height + "px",
opacity: 0,
rotation: r.rotate,
force3D: "auto",
ease: T
}), 0), f.add(j, 0)
}), d.find(".slotslide").each(function(t) {
var e = jQuery(this).find("div");
j.add(punchgs.TweenLite.fromTo(e, y / 1e3, {
left: 0,
top: 0,
opacity: 0,
transformPerspective: 600
}, {
left: 0 - t * r.slotw + "px",
ease: z,
force3D: "auto",
top: "0px",
width: r.width,
height: r.height,
opacity: 1,
rotation: 0,
delay: .1
}), 0), f.add(j, 0)
})
}
if (8 == t) {
y = 3 * y, y > r.delay && (y = r.delay);
var j = new punchgs.TimelineLite;
h.find(".slotslide").each(function() {
var t = jQuery(this).find("div");
j.add(punchgs.TweenLite.to(t, y / 1e3, {
left: 0 - r.width / 2 + "px",
top: 0 - r.sloth / 2 + "px",
width: 2 * r.width + "px",
height: 2 * r.sloth + "px",
force3D: "auto",
ease: T,
opacity: 0,
rotation: r.rotate
}), 0), f.add(j, 0)
}), d.find(".slotslide").each(function(t) {
var e = jQuery(this).find("div");
j.add(punchgs.TweenLite.fromTo(e, y / 1e3, {
left: 0,
top: 0,
opacity: 0,
force3D: "auto"
}, {
left: "0px",
top: 0 - t * r.sloth + "px",
width: d.find(".defaultimg").data("neww") + "px",
height: d.find(".defaultimg").data("newh") + "px",
opacity: 1,
ease: z,
rotation: 0
}), 0), f.add(j, 0)
})
}
if (9 == t || 10 == t) {
var M = 0;
d.find(".slotslide").each(function(t) {
var e = jQuery(this);
M++, f.add(punchgs.TweenLite.fromTo(e, y / 1e3, {
autoAlpha: 0,
force3D: "auto",
transformPerspective: 600
}, {
autoAlpha: 1,
ease: T,
delay: 5 * t / 1e3
}), 0)
})
}
if (27 == t || 28 == t || 29 == t || 30 == t) {
var P = d.find(".slot"),
Q = 27 == t || 28 == t ? 1 : 2,
O = 27 == t || 29 == t ? "-100%" : "+100%",
I = 27 == t || 29 == t ? "+100%" : "-100%",
X = 27 == t || 29 == t ? "-80%" : "80%",
Y = 27 == t || 29 == t ? "80%" : "-80%",
S = 27 == t || 29 == t ? "10%" : "-10%",
_ = {
overwrite: "all"
},
C = {
autoAlpha: 0,
zIndex: 1,
force3D: "auto",
ease: T
},
V = {
position: "inherit",
autoAlpha: 0,
overwrite: "all",
zIndex: 1
},
Z = {
autoAlpha: 1,
force3D: "auto",
ease: z
},
H = {
overwrite: "all",
zIndex: 2
},
J = {
autoAlpha: 1,
force3D: "auto",
overwrite: "all",
ease: T
},
N = {
overwrite: "all",
zIndex: 2
},
R = {
autoAlpha: 1,
force3D: "auto",
ease: T
},
q = 1 == Q ? "y" : "x";
_[q] = "0px", C[q] = O, V[q] = S, Z[q] = "0%", H[q] = I, J[q] = O, N[q] = X, R[q] = Y, P.append('<span style="background-color:rgba(0,0,0,0.6);width:100%;height:100%;position:absolute;top:0px;left:0px;display:block;z-index:2"></span>'), f.add(punchgs.TweenLite.fromTo(h, y / 1e3, _, C), 0), f.add(punchgs.TweenLite.fromTo(d.find(".defaultimg"), y / 2e3, V, Z), y / 2e3), f.add(punchgs.TweenLite.fromTo(P, y / 1e3, H, J), 0), f.add(punchgs.TweenLite.fromTo(P.find(".slotslide div"), y / 1e3, N, R), 0)
}
if (31 == t || 32 == t || 33 == t || 34 == t) {
y = 6e3, T = punchgs.Power3.easeInOut;
var B = y / 1e3;
mas = B - B / 5, _nt = t, fy = 31 == _nt ? "+100%" : 32 == _nt ? "-100%" : "0%", fx = 33 == _nt ? "+100%" : 34 == _nt ? "-100%" : "0%", ty = 31 == _nt ? "-100%" : 32 == _nt ? "+100%" : "0%", tx = 33 == _nt ? "-100%" : 34 == _nt ? "+100%" : "0%", f.add(punchgs.TweenLite.fromTo(h, B - .2 * B, {
y: 0,
x: 0
}, {
y: ty,
x: tx,
ease: z
}), .2 * B), f.add(punchgs.TweenLite.fromTo(d, B, {
y: fy,
x: fx
}, {
y: "0%",
x: "0%",
ease: T
}), 0), d.find(".slot").remove(), d.find(".defaultimg").clone().appendTo(d).addClass("slot"), c(d, B, _nt, "in", T)
}
if (11 == t) {
m > 4 && (m = 0);
var M = 0,
E = 2 == m ? "#000000" : 3 == m ? "#ffffff" : "transparent";
switch (m) {
case 0:
f.add(punchgs.TweenLite.fromTo(d, y / 1e3, {
autoAlpha: 0
}, {
autoAlpha: 1,
force3D: "auto",
ease: T
}), 0);
break;
case 1:
f.add(punchgs.TweenLite.fromTo(d, y / 1e3, {
autoAlpha: 0
}, {
autoAlpha: 1,
force3D: "auto",
ease: T
}), 0), f.add(punchgs.TweenLite.fromTo(h, y / 1e3, {
autoAlpha: 1
}, {
autoAlpha: 0,
force3D: "auto",
ease: T
}), 0);
break;
case 2:
case 3:
case 4:
f.add(punchgs.TweenLite.set(h.parent(), {
backgroundColor: E,
force3D: "auto"
}), 0), f.add(punchgs.TweenLite.set(d.parent(), {
backgroundColor: "transparent",
force3D: "auto"
}), 0), f.add(punchgs.TweenLite.to(h, y / 2e3, {
autoAlpha: 0,
force3D: "auto",
ease: T
}), 0), f.add(punchgs.TweenLite.fromTo(d, y / 2e3, {
autoAlpha: 0
}, {
autoAlpha: 1,
force3D: "auto",
ease: T
}), y / 2e3)
}
f.add(punchgs.TweenLite.set(d.find(".defaultimg"), {
autoAlpha: 1
}), 0), f.add(punchgs.TweenLite.set(h.find("defaultimg"), {
autoAlpha: 1
}), 0)
}
if (26 == t) {
var M = 0;
y = 0, f.add(punchgs.TweenLite.fromTo(d, y / 1e3, {
autoAlpha: 0
}, {
autoAlpha: 1,
force3D: "auto",
ease: T
}), 0), f.add(punchgs.TweenLite.to(h, y / 1e3, {
autoAlpha: 0,
force3D: "auto",
ease: T
}), 0), f.add(punchgs.TweenLite.set(d.find(".defaultimg"), {
autoAlpha: 1
}), 0), f.add(punchgs.TweenLite.set(h.find("defaultimg"), {
autoAlpha: 1
}), 0)
}
if (12 == t || 13 == t || 14 == t || 15 == t) {
y = y, y > r.delay && (y = r.delay), setTimeout(function() {
punchgs.TweenLite.set(h.find(".defaultimg"), {
autoAlpha: 0
})
}, 100);
var F = r.width,
G = r.height,
K = d.find(".slotslide, .defaultvid"),
U = 0,
W = 0,
$ = 1,
te = 1,
ee = 1,
oe = y / 1e3,
ae = oe;
("fullwidth" == r.sliderLayout || "fullscreen" == r.sliderLayout) && (F = K.width(), G = K.height()), 12 == t ? U = F : 15 == t ? U = 0 - F : 13 == t ? W = G : 14 == t && (W = 0 - G), 1 == m && ($ = 0), 2 == m && ($ = 0), 3 == m && (oe = y / 1300), (4 == m || 5 == m) && (te = .6), 6 == m && (te = 1.4), (5 == m || 6 == m) && (ee = 1.4, $ = 0, F = 0, G = 0, U = 0, W = 0), 6 == m && (ee = .6);
7 == m && (F = 0, G = 0);
var ie = d.find(".slotslide"),
ne = h.find(".slotslide, .defaultvid");
if (f.add(punchgs.TweenLite.set(l, {
zIndex: 15
}), 0), f.add(punchgs.TweenLite.set(s, {
zIndex: 20
}), 0), 8 == m ? (f.add(punchgs.TweenLite.set(l, {
zIndex: 20
}), 0), f.add(punchgs.TweenLite.set(s, {
zIndex: 15
}), 0), f.add(punchgs.TweenLite.set(ie, {
left: 0,
top: 0,
scale: 1,
opacity: 1,
rotation: 0,
ease: T,
force3D: "auto"
}), 0)) : f.add(punchgs.TweenLite.from(ie, oe, {
left: U,
top: W,
scale: ee,
opacity: $,
rotation: r.rotate,
ease: T,
force3D: "auto"
}), 0), (4 == m || 5 == m) && (F = 0, G = 0), 1 != m) switch (t) {
case 12:
f.add(punchgs.TweenLite.to(ne, ae, {
left: 0 - F + "px",
force3D: "auto",
scale: te,
opacity: $,
rotation: r.rotate,
ease: z
}), 0);
break;
case 15:
f.add(punchgs.TweenLite.to(ne, ae, {
left: F + "px",
force3D: "auto",
scale: te,
opacity: $,
rotation: r.rotate,
ease: z
}), 0);
break;
case 13:
f.add(punchgs.TweenLite.to(ne, ae, {
top: 0 - G + "px",
force3D: "auto",
scale: te,
opacity: $,
rotation: r.rotate,
ease: z
}), 0);
break;
case 14:
f.add(punchgs.TweenLite.to(ne, ae, {
top: G + "px",
force3D: "auto",
scale: te,
opacity: $,
rotation: r.rotate,
ease: z
}), 0)
}
}
if (16 == t) {
var j = new punchgs.TimelineLite;
f.add(punchgs.TweenLite.set(l, {
position: "absolute",
"z-index": 20
}), 0), f.add(punchgs.TweenLite.set(s, {
position: "absolute",
"z-index": 15
}), 0), l.wrapInner('<div class="tp-half-one" style="position:relative; width:100%;height:100%"></div>'), l.find(".tp-half-one").clone(!0).appendTo(l).addClass("tp-half-two"), l.find(".tp-half-two").removeClass("tp-half-one");
var F = r.width,
G = r.height;
"on" == r.autoHeight && (G = n.height()), l.find(".tp-half-one .defaultimg").wrap('<div class="tp-papercut" style="width:' + F + "px;height:" + G + 'px;"></div>'), l.find(".tp-half-two .defaultimg").wrap('<div class="tp-papercut" style="width:' + F + "px;height:" + G + 'px;"></div>'), l.find(".tp-half-two .defaultimg").css({
position: "absolute",
top: "-50%"
}), l.find(".tp-half-two .tp-caption").wrapAll('<div style="position:absolute;top:-50%;left:0px;"></div>'), f.add(punchgs.TweenLite.set(l.find(".tp-half-two"), {
width: F,
height: G,
overflow: "hidden",
zIndex: 15,
position: "absolute",
top: G / 2,
left: "0px",
transformPerspective: 600,
transformOrigin: "center bottom"
}), 0), f.add(punchgs.TweenLite.set(l.find(".tp-half-one"), {
width: F,
height: G / 2,
overflow: "visible",
zIndex: 10,
position: "absolute",
top: "0px",
left: "0px",
transformPerspective: 600,
transformOrigin: "center top"
}), 0);
var re = (l.find(".defaultimg"), Math.round(20 * Math.random() - 10)),
se = Math.round(20 * Math.random() - 10),
le = Math.round(20 * Math.random() - 10),
de = .4 * Math.random() - .2,
he = .4 * Math.random() - .2,
fe = 1 * Math.random() + 1,
ce = 1 * Math.random() + 1,
pe = .3 * Math.random() + .3;
f.add(punchgs.TweenLite.set(l.find(".tp-half-one"), {
overflow: "hidden"
}), 0), f.add(punchgs.TweenLite.fromTo(l.find(".tp-half-one"), y / 800, {
width: F,
height: G / 2,
position: "absolute",
top: "0px",
left: "0px",
force3D: "auto",
transformOrigin: "center top"
}, {
scale: fe,
rotation: re,
y: 0 - G - G / 4,
autoAlpha: 0,
ease: T
}), 0), f.add(punchgs.TweenLite.fromTo(l.find(".tp-half-two"), y / 800, {
width: F,
height: G,
overflow: "hidden",
position: "absolute",
top: G / 2,
left: "0px",
force3D: "auto",
transformOrigin: "center bottom"
}, {
scale: ce,
rotation: se,
y: G + G / 4,
ease: T,
autoAlpha: 0,
onComplete: function() {
punchgs.TweenLite.set(l, {
position: "absolute",
"z-index": 15
}), punchgs.TweenLite.set(s, {
position: "absolute",
"z-index": 20
}), l.find(".tp-half-one").length > 0 && (l.find(".tp-half-one .defaultimg").unwrap(), l.find(".tp-half-one .slotholder").unwrap()), l.find(".tp-half-two").remove()
}
}), 0), j.add(punchgs.TweenLite.set(d.find(".defaultimg"), {
autoAlpha: 1
}), 0), null != l.html() && f.add(punchgs.TweenLite.fromTo(s, (y - 200) / 1e3, {
scale: pe,
x: r.width / 4 * de,
y: G / 4 * he,
rotation: le,
force3D: "auto",
transformOrigin: "center center",
ease: z
}, {
autoAlpha: 1,
scale: 1,
x: 0,
y: 0,
rotation: 0
}), 0), f.add(j, 0)
}
if (17 == t && d.find(".slotslide").each(function(t) {
var e = jQuery(this);
f.add(punchgs.TweenLite.fromTo(e, y / 800, {
opacity: 0,
rotationY: 0,
scale: .9,
rotationX: -110,
force3D: "auto",
transformPerspective: 600,
transformOrigin: "center center"
}, {
opacity: 1,
top: 0,
left: 0,
scale: 1,
rotation: 0,
rotationX: 0,
force3D: "auto",
rotationY: 0,
ease: T,
delay: .06 * t
}), 0)
}), 18 == t && d.find(".slotslide").each(function(t) {
var e = jQuery(this);
f.add(punchgs.TweenLite.fromTo(e, y / 500, {
autoAlpha: 0,
rotationY: 110,
scale: .9,
rotationX: 10,
force3D: "auto",
transformPerspective: 600,
transformOrigin: "center center"
}, {
autoAlpha: 1,
top: 0,
left: 0,
scale: 1,
rotation: 0,
rotationX: 0,
force3D: "auto",
rotationY: 0,
ease: T,
delay: .06 * t
}), 0)
}), 19 == t || 22 == t) {
var j = new punchgs.TimelineLite;
f.add(punchgs.TweenLite.set(l, {
zIndex: 20
}), 0), f.add(punchgs.TweenLite.set(s, {
zIndex: 20
}), 0), setTimeout(function() {
h.find(".defaultimg").css({
opacity: 0
})
}, 100);
var ue = 90,
$ = 1,
ge = "center center ";
1 == g && (ue = -90), 19 == t ? (ge = ge + "-" + r.height / 2, $ = 0) : ge += r.height / 2, punchgs.TweenLite.set(n, {
transformStyle: "flat",
backfaceVisibility: "hidden",
transformPerspective: 600
}), d.find(".slotslide").each(function(t) {
var e = jQuery(this);
j.add(punchgs.TweenLite.fromTo(e, y / 1e3, {
transformStyle: "flat",
backfaceVisibility: "hidden",
left: 0,
rotationY: r.rotate,
z: 10,
top: 0,
scale: 1,
force3D: "auto",
transformPerspective: 600,
transformOrigin: ge,
rotationX: ue
}, {
left: 0,
rotationY: 0,
top: 0,
z: 0,
scale: 1,
force3D: "auto",
rotationX: 0,
delay: 50 * t / 1e3,
ease: T
}), 0), j.add(punchgs.TweenLite.to(e, .1, {
autoAlpha: 1,
delay: 50 * t / 1e3
}), 0), f.add(j)
}), h.find(".slotslide").each(function(t) {
var e = jQuery(this),
o = -90;
1 == g && (o = 90), j.add(punchgs.TweenLite.fromTo(e, y / 1e3, {
transformStyle: "flat",
backfaceVisibility: "hidden",
autoAlpha: 1,
rotationY: 0,
top: 0,
z: 0,
scale: 1,
force3D: "auto",
transformPerspective: 600,
transformOrigin: ge,
rotationX: 0
}, {
autoAlpha: 1,
rotationY: r.rotate,
top: 0,
z: 10,
scale: 1,
rotationX: o,
delay: 50 * t / 1e3,
force3D: "auto",
ease: z
}), 0), f.add(j)
}), f.add(punchgs.TweenLite.set(l, {
zIndex: 18
}), 0)
}
if (20 == t) {
if (setTimeout(function() {
h.find(".defaultimg").css({
opacity: 0
})
}, 100), 1 == g) var we = -r.width,
ue = 80,
ge = "20% 70% -" + r.height / 2;
else var we = r.width,
ue = -80,
ge = "80% 70% -" + r.height / 2;
d.find(".slotslide").each(function(t) {
var e = jQuery(this),
o = 50 * t / 1e3;
f.add(punchgs.TweenLite.fromTo(e, y / 1e3, {
left: we,
rotationX: 40,
z: -600,
opacity: $,
top: 0,
scale: 1,
force3D: "auto",
transformPerspective: 600,
transformOrigin: ge,
transformStyle: "flat",
rotationY: ue
}, {
left: 0,
rotationX: 0,
opacity: 1,
top: 0,
z: 0,
scale: 1,
rotationY: 0,
delay: o,
ease: T
}), 0)
}), h.find(".slotslide").each(function(t) {
var e = jQuery(this),
o = 50 * t / 1e3;
if (o = t > 0 ? o + y / 9e3 : 0, 1 != g) var a = -r.width / 2,
i = 30,
n = "20% 70% -" + r.height / 2;
else var a = r.width / 2,
i = -30,
n = "80% 70% -" + r.height / 2;
z = punchgs.Power2.easeInOut, f.add(punchgs.TweenLite.fromTo(e, y / 1e3, {
opacity: 1,
rotationX: 0,
top: 0,
z: 0,
scale: 1,
left: 0,
force3D: "auto",
transformPerspective: 600,
transformOrigin: n,
transformStyle: "flat",
rotationY: 0
}, {
opacity: 1,
rotationX: 20,
top: 0,
z: -600,
left: a,
force3D: "auto",
rotationY: i,
delay: o,
ease: z
}), 0)
})
}
if (21 == t || 25 == t) {
setTimeout(function() {
h.find(".defaultimg").css({
opacity: 0
})
}, 100);
var ue = 90,
we = -r.width,
ve = -ue;
if (1 == g)
if (25 == t) {
var ge = "center top 0";
ue = r.rotate
} else {
var ge = "left center 0";
ve = r.rotate
} else if (we = r.width, ue = -90, 25 == t) {
var ge = "center bottom 0";
ve = -ue, ue = r.rotate
} else {
var ge = "right center 0";
ve = r.rotate
}
d.find(".slotslide").each(function() {
var t = jQuery(this),
e = y / 1.5 / 3;
f.add(punchgs.TweenLite.fromTo(t, 2 * e / 1e3, {
left: 0,
transformStyle: "flat",
rotationX: ve,
z: 0,
autoAlpha: 0,
top: 0,
scale: 1,
force3D: "auto",
transformPerspective: 1200,
transformOrigin: ge,
rotationY: ue
}, {
left: 0,
rotationX: 0,
top: 0,
z: 0,
autoAlpha: 1,
scale: 1,
rotationY: 0,
force3D: "auto",
delay: e / 1e3,
ease: T
}), 0)
}), 1 != g ? (we = -r.width, ue = 90, 25 == t ? (ge = "center top 0", ve = -ue, ue = r.rotate) : (ge = "left center 0", ve = r.rotate)) : (we = r.width, ue = -90, 25 == t ? (ge = "center bottom 0", ve = -ue, ue = r.rotate) : (ge = "right center 0", ve = r.rotate)), h.find(".slotslide").each(function() {
var t = jQuery(this);
f.add(punchgs.TweenLite.fromTo(t, y / 1e3, {
left: 0,
transformStyle: "flat",
rotationX: 0,
z: 0,
autoAlpha: 1,
top: 0,
scale: 1,
force3D: "auto",
transformPerspective: 1200,
transformOrigin: ge,
rotationY: 0
}, {
left: 0,
rotationX: ve,
top: 0,
z: 0,
autoAlpha: 1,
force3D: "auto",
scale: 1,
rotationY: ue,
ease: z
}), 0)
})
}
if (23 == t || 24 == t) {
setTimeout(function() {
h.find(".defaultimg").css({
opacity: 0
})
}, 100);
var ue = -90,
$ = 1,
me = 0;
if (1 == g && (ue = 90), 23 == t) {
var ge = "center center -" + r.width / 2;
$ = 0
} else var ge = "center center " + r.width / 2;
punchgs.TweenLite.set(n, {
transformStyle: "preserve-3d",
backfaceVisibility: "hidden",
perspective: 2500
}), d.find(".slotslide").each(function(t) {
var e = jQuery(this);
f.add(punchgs.TweenLite.fromTo(e, y / 1e3, {
left: me,
rotationX: r.rotate,
force3D: "auto",
opacity: $,
top: 0,
scale: 1,
transformPerspective: 1200,
transformOrigin: ge,
rotationY: ue
}, {
left: 0,
rotationX: 0,
autoAlpha: 1,
top: 0,
z: 0,
scale: 1,
rotationY: 0,
delay: 50 * t / 500,
ease: T
}), 0)
}), ue = 90, 1 == g && (ue = -90), h.find(".slotslide").each(function(e) {
var o = jQuery(this);
f.add(punchgs.TweenLite.fromTo(o, y / 1e3, {
left: 0,
rotationX: 0,
top: 0,
z: 0,
scale: 1,
force3D: "auto",
transformStyle: "flat",
transformPerspective: 1200,
transformOrigin: ge,
rotationY: 0
}, {
left: me,
rotationX: r.rotate,
top: 0,
scale: 1,
rotationY: ue,
delay: 50 * e / 500,
ease: z
}), 0), 23 == t && f.add(punchgs.TweenLite.fromTo(o, y / 2e3, {
autoAlpha: 1
}, {
autoAlpha: 0,
delay: 50 * e / 500 + y / 3e3,
ease: z
}), 0)
})
}
return f
}
}(jQuery);
#3 JavaScript::Eval (size: 30568) - SHA256: 16d51809e34ecd06dc421c8369b2a5f804507395793c8118b1ff491c15d52180
/**
* 2016 Revolution Slider
*
* @author SmatDataSoft <support@smartdatasoft.com>
* @copyright 2016 SmatDataSoft
* @license private
* @version 5.1.3
* International Registered Trademark & Property of SmatDataSoft
*/
/********************************************
* REVOLUTION 5.0 EXTENSION - LAYER ANIMATION
* @version: 1.1.5 (23.10.2015)
* @requires jquery.themepunch.revolution.js
* @author ThemePunch
*********************************************/
! function() {
function a(a, e, t, i, n, o, r) {
var d = a.find(e);
d.css("borderWidth", o + "px"), d.css(t, 0 - o + "px"), d.css(i, "0px solid transparent"), d.css(n, r)
}
var e = jQuery.fn.revolution,
t = e.is_mobile();
jQuery.extend(!0, e, {
animcompleted: function(a, t) {
var i = a.data("videotype"),
n = a.data("autoplay"),
o = a.data("autoplayonlyfirsttime");
void 0 != i && "none" != i && (1 == n || "true" == n || "on" == n || "1sttime" == n || o ? (e.playVideo(a, t), (o || "1sttime" == n) && (a.data("autoplayonlyfirsttime", !1), a.data("autoplay", "off"))) : "no1sttime" == n && a.data("autoplay", "on"))
},
handleStaticLayers: function(a, e) {
var t = parseInt(a.data("startslide"), 0),
i = parseInt(a.data("endslide"), 0);
0 > t && (t = 0), 0 > i && (i = e.slideamount), 0 === t && i === e.slideamount - 1 && (i = e.slideamount + 1), a.data("startslide", t), a.data("endslide", i)
},
animateTheCaptions: function(a, t, i, n) {
var o = "carousel" === t.sliderType ? 0 : t.width / 2 - t.gridwidth[t.curWinRange] * t.bw / 2,
r = 0,
d = a.data("index");
t.layers = t.layers || new Object, t.layers[d] = t.layers[d] || a.find(".tp-caption"), t.layers["static"] = t.layers["static"] || t.c.find(".tp-static-layers").find(".tp-caption");
var s = new Array;
if (t.conh = t.c.height(), t.conw = t.c.width(), t.ulw = t.ul.width(), t.ulh = t.ul.height(), t.debugMode) {
a.addClass("indebugmode"), a.find(".helpgrid").remove(), t.c.find(".hglayerinfo").remove(), a.append('<div class="helpgrid" style="width:' + t.gridwidth[t.curWinRange] * t.bw + "px;height:" + t.gridheight[t.curWinRange] * t.bw + 'px;"></div>');
var l = a.find(".helpgrid");
l.append('<div class="hginfo">Zoom:' + Math.round(100 * t.bw) + "% Device Level:" + t.curWinRange + " Grid Preset:" + t.gridwidth[t.curWinRange] + "x" + t.gridheight[t.curWinRange] + "</div>"), t.c.append('<div class="hglayerinfo"></div>'), l.append('<div class="tlhg"></div>')
}
s && jQuery.each(s, function() {
var a = jQuery(this);
punchgs.TweenLite.set(a.find(".tp-videoposter"), {
autoAlpha: 1
}), punchgs.TweenLite.set(a.find("iframe"), {
autoAlpha: 0
})
}), t.layers[d] && jQuery.each(t.layers[d], function(a, e) {
s.push(e)
}), t.layers["static"] && jQuery.each(t.layers["static"], function(a, e) {
s.push(e)
}), s && jQuery.each(s, function(a) {
e.animateSingleCaption(jQuery(this), t, o, r, a, i)
});
var p = jQuery("body").find("#" + t.c.attr("id")).find(".tp-bannertimer");
p.data("opt", t), void 0 != n && setTimeout(function() {
n.resume()
}, 30)
},
animateSingleCaption: function(n, r, u, w, y, b, x) {
var T = b,
L = h(n, r, "in", !0),
W = n.data("_pw") || n.closest(".tp-parallax-wrap"),
C = n.data("_lw") || n.closest(".tp-loop-wrap"),
j = n.data("_mw") || n.closest(".tp-mask-wrap"),
R = n.data("responsive") || "on",
I = n.data("responsive_offset") || "on",
k = n.data("basealign") || "grid",
_ = "grid" === k ? r.width : r.ulw,
z = "grid" === k ? r.height : r.ulh,
Q = jQuery("body").hasClass("rtl");
if (n.data("_pw") || (n.data("_pw", W), n.data("_lw", C), n.data("_mw", j)), "fullscreen" == r.sliderLayout && (w = z / 2 - r.gridheight[r.curWinRange] * r.bh / 2), ("on" == r.autoHeight || void 0 != r.minHeight && r.minHeight > 0) && (w = r.conh / 2 - r.gridheight[r.curWinRange] * r.bh / 2), 0 > w && (w = 0), r.debugMode) {
n.closest("li").find(".helpgrid").css({
top: w + "px",
left: u + "px"
});
var S = r.c.find(".hglayerinfo");
n.on("hover, mouseenter", function() {
var a = "";
n.data() && jQuery.each(n.data(), function(e, t) {
"object" != typeof t && (a = a + '<span style="white-space:nowrap"><span style="color:#27ae60">' + e + ":</span>" + t + "</span> ")
}), S.html(a)
})
}
var M = p(n.data("visibility"), r)[r.forcedWinRange] || p(n.data("visibility"), r) || "on";
if ("off" == M || _ < r.hideCaptionAtLimit && "on" == n.data("captionhidden") || _ < r.hideAllCaptionAtLimit ? n.addClass("tp-hidden-caption") : n.removeClass("tp-hidden-caption"), n.data("layertype", "html"), 0 > u && (u = 0), void 0 != n.data("thumbimage") && void 0 == n.data("videoposter") && n.data("videoposter", n.data("thumbimage")), n.hasClass("tp-videolayer") && void 0 != n.data("videoposter") && ("on" == n.data("posterOnMobile") || "on" == n.data("posteronmobile")) && t) {
var O = p(n.data("videowidth"), r)[r.curWinRange] || p(n.data("videowidth"), r) || "auto",
H = p(n.data("videoheight"), r)[r.curWinRange] || p(n.data("videoheight"), r) || "auto";
O = parseFloat(F), H = parseFloat(A), n.append('<div class="tp-videoposter" style="position:absolute;top:0px;left:0px;width:100%;height:100%;background-image:url(' + n.data("videoposter") + '); background-size:cover;background-position:center center;"></div>'), n.css("100%" != O ? {
minWidth: O + "px",
minHeight: H + "px"
} : {
width: "100%",
height: "100%"
}), n.removeClass("tp-videolayer")
}
if (n.find("img").length > 0) {
var B = n.find("img");
n.data("layertype", "image"), 0 == B.width() && B.css({
width: "auto"
}), 0 == B.height() && B.css({
height: "auto"
}), void 0 == B.data("ww") && B.width() > 0 && B.data("ww", B.width()), void 0 == B.data("hh") && B.height() > 0 && B.data("hh", B.height());
var F = B.data("ww"),
A = B.data("hh"),
D = "slide" == k ? r.ulw : r.gridwidth[r.curWinRange],
P = "slide" == k ? r.ulh : r.gridheight[r.curWinRange],
F = p(B.data("ww"), r)[r.curWinRange] || p(B.data("ww"), r) || "auto",
A = p(B.data("hh"), r)[r.curWinRange] || p(B.data("hh"), r) || "auto",
X = "full" === F || "full-proportional" === F,
Y = "full" === A || "full-proportional" === A;
if ("full-proportional" === F) {
var V = B.data("owidth"),
N = B.data("oheight");
N / P > V / D ? (F = D, A = N * (D / V)) : (A = P, F = V * (P / N))
} else F = X ? D : parseFloat(F), A = Y ? P : parseFloat(A);
void 0 == F && (F = 0), void 0 == A && (A = 0), "off" !== R ? (B.width("grid" != k && X ? F : F * r.bw), B.height("grid" != k && Y ? A : A * r.bh)) : (B.width(F), B.height(A))
}
if ("slide" === k && (u = 0, w = 0), n.hasClass("tp-videolayer") || n.find("iframe").length > 0 || n.find("video").length > 0) {
if (n.data("layertype", "video"), e.manageVideoLayer(n, r, b, T), !b && !T) {
{
n.data("videotype")
}
e.resetVideo(n, r)
}
var Z = n.data("aspectratio");
void 0 != Z && Z.split(":").length > 1 && e.prepareCoveredVideo(Z, r, n);
var B = n.find("iframe") ? n.find("iframe") : B = n.find("video"),
$ = n.find("iframe") ? !1 : !0,
G = n.hasClass("coverscreenvideo");
B.css({
display: "block"
}), void 0 == n.data("videowidth") && (n.data("videowidth", B.width()), n.data("videoheight", B.height()));
var U, F = p(n.data("videowidth"), r)[r.curWinRange] || p(n.data("videowidth"), r) || "auto",
A = p(n.data("videoheight"), r)[r.curWinRange] || p(n.data("videoheight"), r) || "auto";
F = parseFloat(F), A = parseFloat(A), void 0 === n.data("cssobj") && (U = g(n, 0), n.data("cssobj", U));
var q = m(n.data("cssobj"), r);
if ("auto" == q.lineHeight && (q.lineHeight = q.fontSize + 4), n.hasClass("fullscreenvideo") || G) {
u = 0, w = 0, n.data("x", 0), n.data("y", 0);
var E = z;
"on" == r.autoHeight && (E = r.conh), n.css({
width: _,
height: E
})
} else punchgs.TweenLite.set(n, {
paddingTop: Math.round(q.paddingTop * r.bh) + "px",
paddingBottom: Math.round(q.paddingBottom * r.bh) + "px",
paddingLeft: Math.round(q.paddingLeft * r.bw) + "px",
paddingRight: Math.round(q.paddingRight * r.bw) + "px",
marginTop: q.marginTop * r.bh + "px",
marginBottom: q.marginBottom * r.bh + "px",
marginLeft: q.marginLeft * r.bw + "px",
marginRight: q.marginRight * r.bw + "px",
borderTopWidth: Math.round(q.borderTopWidth * r.bh) + "px",
borderBottomWidth: Math.round(q.borderBottomWidth * r.bh) + "px",
borderLeftWidth: Math.round(q.borderLeftWidth * r.bw) + "px",
borderRightWidth: Math.round(q.borderRightWidth * r.bw) + "px",
width: F * r.bw + "px",
height: A * r.bh + "px"
});
(0 == $ && !G || 1 != n.data("forcecover") && !n.hasClass("fullscreenvideo") && !G) && (B.width(F * r.bw), B.height(A * r.bh))
}
n.find(".tp-resizeme, .tp-resizeme *").each(function() {
v(jQuery(this), r, "rekursive", R)
}), n.hasClass("tp-resizeme") && n.find("*").each(function() {
v(jQuery(this), r, "rekursive", R)
}), v(n, r, 0, R);
var J = n.outerHeight(),
K = n.css("backgroundColor");
a(n, ".frontcorner", "left", "borderRight", "borderTopColor", J, K), a(n, ".frontcornertop", "left", "borderRight", "borderBottomColor", J, K), a(n, ".backcorner", "right", "borderLeft", "borderBottomColor", J, K), a(n, ".backcornertop", "right", "borderLeft", "borderTopColor", J, K), "on" == r.fullScreenAlignForce && (u = 0, w = 0);
var ae = n.data("arrobj");
if (void 0 === ae) {
var ae = new Object;
ae.voa = p(n.data("voffset"), r)[r.curWinRange] || p(n.data("voffset"), r)[0], ae.hoa = p(n.data("hoffset"), r)[r.curWinRange] || p(n.data("hoffset"), r)[0], ae.elx = p(n.data("x"), r)[r.curWinRange] || p(n.data("x"), r)[0], ae.ely = p(n.data("y"), r)[r.curWinRange] || p(n.data("y"), r)[0]
}
var ee = 0 == ae.voa.length ? 0 : ae.voa,
te = 0 == ae.hoa.length ? 0 : ae.hoa,
ie = 0 == ae.elx.length ? 0 : ae.elx,
ne = 0 == ae.ely.length ? 0 : ae.ely,
oe = n.outerWidth(!0),
re = n.outerHeight(!0);
0 == oe && 0 == re && (oe = r.ulw, re = r.ulh);
var de = "off" !== I ? parseInt(ee, 0) * r.bw : parseInt(ee, 0),
se = "off" !== I ? parseInt(te, 0) * r.bw : parseInt(te, 0),
le = "grid" === k ? r.gridwidth[r.curWinRange] * r.bw : _,
pe = "grid" === k ? r.gridheight[r.curWinRange] * r.bw : z;
"on" == r.fullScreenAlignForce && (le = r.ulw, pe = r.ulh), ie = "center" === ie || "middle" === ie ? le / 2 - oe / 2 + se : "left" === ie ? se : "right" === ie ? le - oe - se : "off" !== I ? ie * r.bw : ie, ne = "center" == ne || "middle" == ne ? pe / 2 - re / 2 + de : "top" == ne ? de : "bottom" == ne ? pe - re - de : "off" !== I ? ne * r.bw : ne, Q && (ie += oe);
var he = n.data("lasttriggerstate"),
ce = n.data("triggerstate"),
ge = n.data("start") || 100,
me = n.data("end"),
ue = x ? 0 : "bytrigger" === ge || "sliderenter" === ge ? 0 : parseFloat(ge) / 1e3,
ve = ie + u,
fe = ne + w,
we = n.css("z-Index");
x || ("reset" == he && "bytrigger" != ge ? (n.data("triggerstate", "on"), n.data("animdirection", "in"), ce = "on") : "reset" == he && "bytrigger" == ge && (n.data("triggerstate", "off"), n.data("animdirection", "out"), ce = "off")), punchgs.TweenLite.set(W, {
zIndex: we,
top: fe,
left: ve,
overwrite: "auto"
}), 0 == L && (T = !0), void 0 == n.data("timeline") || T || (2 != L && n.data("timeline").gotoAndPlay(0), T = !0), !b && n.data("timeline_out") && 2 != L && 0 != L && (n.data("timeline_out").kill(), n.data("outstarted", 0)), x && void 0 != n.data("timeline") && (n.removeData("$anims"), n.data("timeline").pause(0), n.data("timeline").kill(), void 0 != n.data("newhoveranim") && (n.data("newhoveranim").progress(0), n.data("newhoveranim").kill()), n.removeData("timeline"), punchgs.TweenLite.killTweensOf(n), n.unbind("hover"), n.removeClass("rs-hover-ready"), n.removeData("newhoveranim"));
var ye = n.data("timeline") ? n.data("timeline").time() : 0,
be = void 0 !== n.data("timeline") ? n.data("timeline").progress() : 0,
xe = n.data("timeline") || new punchgs.TimelineLite({
smoothChildTiming: !0
});
if (be = jQuery.isNumeric(be) ? be : 0, xe.pause(), 1 > be && 1 != n.data("outstarted") || 2 == L || x) {
var Te = n;
if (void 0 != n.data("mySplitText") && n.data("mySplitText").revert(), void 0 != n.data("splitin") && n.data("splitin").match(/chars|words|lines/g) || void 0 != n.data("splitout") && n.data("splitout").match(/chars|words|lines/g)) {
var Le = n.find("a").length > 0 ? n.find("a") : n;
n.data("mySplitText", new punchgs.SplitText(Le, {
type: "lines,words,chars",
charsClass: "tp-splitted",
wordsClass: "tp-splitted",
linesClass: "tp-splitted"
})), n.addClass("splitted")
}
void 0 !== n.data("mySplitText") && n.data("splitin") && n.data("splitin").match(/chars|words|lines/g) && (Te = n.data("mySplitText")[n.data("splitin")]);
var We = new Object,
Ce = void 0 != n.data("transform_in") ? n.data("transform_in").match(/\(R\)/gi) : !1;
if (!n.data("$anims") || x || Ce) {
var je = i(),
Re = i(),
Ie = o(),
ke = void 0 !== n.data("transform_hover") || void 0 !== n.data("style_hover");
Re = s(Re, n.data("transform_idle")), je = s(Re, n.data("transform_in"), 1 == r.sdir), ke && (Ie = s(Ie, n.data("transform_hover")), Ie = c(Ie, n.data("style_hover")), n.data("hover", Ie)), je.elemdelay = void 0 == n.data("elementdelay") ? 0 : n.data("elementdelay"), Re.anim.ease = je.anim.ease = je.anim.ease || punchgs.Power1.easeInOut, ke && !n.hasClass("rs-hover-ready") && (n.addClass("rs-hover-ready"), n.hover(function(a) {
var e = jQuery(a.currentTarget),
t = e.data("hover"),
i = e.data("timeline");
i && 1 == i.progress() && (void 0 === e.data("newhoveranim") || "none" === e.data("newhoveranim") ? e.data("newhoveranim", punchgs.TweenLite.to(e, t.speed, t.anim)) : (e.data("newhoveranim").progress(0), e.data("newhoveranim").play()))
}, function(a) {
var e = jQuery(a.currentTarget),
t = e.data("timeline");
t && 1 == t.progress() && void 0 != e.data("newhoveranim") && e.data("newhoveranim").reverse()
})), We = new Object, We.f = je, We.r = Re, n.data("$anims")
} else We = n.data("$anims");
var _e = l(n.data("mask_in")),
ze = new punchgs.TimelineLite;
if (We.f.anim.x = We.f.anim.x * r.bw || d(We.f.anim.x, r, oe, re, fe, ve, "horizontal"), We.f.anim.y = We.f.anim.y * r.bw || d(We.f.anim.y, r, oe, re, fe, ve, "vertical"), 2 != L || x) {
if (Te != n) {
var Qe = We.r.anim.ease;
xe.add(punchgs.TweenLite.set(n, We.r.anim)), We.r = i(), We.r.anim.ease = Qe
}
if (We.f.anim.visibility = "hidden", ze.eventCallback("onStart", function() {
punchgs.TweenLite.set(n, {
visibility: "visible"
}), n.data("iframes") && n.find("iframe").each(function() {
punchgs.TweenLite.set(jQuery(this), {
autoAlpha: 1
})
}), punchgs.TweenLite.set(W, {
visibility: "visible"
});
var a = {};
a.layer = n, a.eventtype = "enterstage", a.layertype = n.data("layertype"), a.layersettings = n.data(), r.c.trigger("revolution.layeraction", a)
}), ze.eventCallback("onComplete", function() {
var a = {};
a.layer = n, a.eventtype = "enteredstage", a.layertype = n.data("layertype"), a.layersettings = n.data(), r.c.trigger("revolution.layeraction", a), e.animcompleted(n, r)
}), "sliderenter" == ge && r.overcontainer && (ue = .6), xe.add(ze.staggerFromTo(Te, We.f.speed, We.f.anim, We.r.anim, We.f.elemdelay), ue), _e) {
var Se = new Object;
Se.ease = We.r.anim.ease, Se.overflow = _e.anim.overflow = "hidden", Se.x = Se.y = 0, _e.anim.x = _e.anim.x * r.bw || d(_e.anim.x, r, oe, re, fe, ve, "horizontal"), _e.anim.y = _e.anim.y * r.bw || d(_e.anim.y, r, oe, re, fe, ve, "vertical"), xe.add(punchgs.TweenLite.fromTo(j, We.f.speed, _e.anim, Se, je.elemdelay), ue)
} else xe.add(punchgs.TweenLite.set(j, {
overflow: "visible"
}, je.elemdelay), 0)
}
n.data("timeline", xe), L = h(n, r, "in"), 0 !== be && 2 != L || "bytrigger" === me || x || "sliderleave" == me || (void 0 == me || -1 != L && 2 != L || "bytriger" === me ? punchgs.TweenLite.delayedCall(999999, e.endMoveCaption, [n, j, W, r]) : punchgs.TweenLite.delayedCall(parseInt(n.data("end"), 0) / 1e3, e.endMoveCaption, [n, j, W, r])), xe = n.data("timeline"), "on" == n.data("loopanimation") && f(C, r.bw), ("sliderenter" != ge || "sliderenter" == ge && r.overcontainer) && (-1 == L || 1 == L || x || 0 == L && 1 > be && n.hasClass("rev-static-visbile")) && (1 > be && be > 0 || 0 == be && "bytrigger" != ge && "keep" != he || 0 == be && "bytrigger" != ge && "keep" == he && "on" == ce || "bytrigger" == ge && "keep" == he && "on" == ce) && xe.resume(ye)
}
"on" == n.data("loopanimation") && punchgs.TweenLite.set(C, {
minWidth: oe,
minHeight: re
}), 0 == n.data("slidelink") || 1 != n.data("slidelink") && !n.hasClass("slidelink") ? (punchgs.TweenLite.set(j, {
width: "auto",
height: "auto"
}), n.data("slidelink", 0)) : (punchgs.TweenLite.set(j, {
width: "100%",
height: "100%"
}), n.data("slidelink", 1))
},
endMoveCaption: function(a, e, t, o) {
if (e = e || a.data("_mw"), t = t || a.data("_pw"), a.data("outstarted", 1), a.data("timeline")) a.data("timeline").pause();
else if (void 0 === a.data("_pw")) return;
var r = new punchgs.TimelineLite,
p = new punchgs.TimelineLite,
h = new punchgs.TimelineLite,
c = s(i(), a.data("transform_in"), 1 == o.sdir),
g = a.data("transform_out") ? s(n(), a.data("transform_out"), 1 == o.sdir) : s(n(), a.data("transform_in"), 1 == o.sdir),
m = a.data("splitout") && a.data("splitout").match(/words|chars|lines/g) ? a.data("mySplitText")[a.data("splitout")] : a,
u = void 0 == a.data("endelementdelay") ? 0 : a.data("endelementdelay"),
v = a.innerWidth(),
f = a.innerHeight(),
w = t.position();
a.data("transform_out") && a.data("transform_out").match(/auto:auto/g) && (c.speed = g.speed, c.anim.ease = g.anim.ease, g = c);
var y = l(a.data("mask_out"));
g.anim.x = g.anim.x * o.bw || d(g.anim.x, o, v, f, w.top, w.left, "horizontal"), g.anim.y = g.anim.y * o.bw || d(g.anim.y, o, v, f, w.top, w.left, "vertical"), p.eventCallback("onStart", function() {
var e = {};
e.layer = a, e.eventtype = "leavestage", e.layertype = a.data("layertype"), e.layersettings = a.data(), o.c.trigger("revolution.layeraction", e)
}), p.eventCallback("onComplete", function() {
punchgs.TweenLite.set(a, {
visibility: "hidden"
}), punchgs.TweenLite.set(t, {
visibility: "hidden"
});
var e = {};
e.layer = a, e.eventtype = "leftstage", e.layertype = a.data("layertype"), e.layersettings = a.data(), o.c.trigger("revolution.layeraction", e)
}), r.add(p.staggerTo(m, g.speed, g.anim, u), 0), y ? (y.anim.ease = g.anim.ease, y.anim.overflow = "hidden", y.anim.x = y.anim.x * o.bw || d(y.anim.x, o, v, f, w.top, w.left, "horizontal"), y.anim.y = y.anim.y * o.bw || d(y.anim.y, o, v, f, w.top, w.left, "vertical"), r.add(h.to(e, g.speed, y.anim, u), 0)) : r.add(h.set(e, {
overflow: "visible",
overwrite: "auto"
}, u), 0), a.data("timeline_out", r)
},
removeTheCaptions: function(a, t) {
var i = a.data("index"),
n = new Array;
t.layers[i] && jQuery.each(t.layers[i], function(a, e) {
n.push(e)
}), t.layers["static"] && jQuery.each(t.layers["static"], function(a, e) {
n.push(e)
}), punchgs.TweenLite.killDelayedCallsTo(e.endMoveCaption), n && jQuery.each(n, function() {
var a = jQuery(this),
i = h(a, t, "out");
0 != i && (w(a), clearTimeout(a.data("videoplaywait")), e.stopVideo && e.stopVideo(a, t), e.endMoveCaption(a, null, null, t), t.playingvideos = [], t.lastplayedvideos = [])
})
}
});
var i = function() {
var a = new Object;
return a.anim = new Object, a.anim.x = 0, a.anim.y = 0, a.anim.z = 0, a.anim.rotationX = 0, a.anim.rotationY = 0, a.anim.rotationZ = 0, a.anim.scaleX = 1, a.anim.scaleY = 1, a.anim.skewX = 0, a.anim.skewY = 0, a.anim.opacity = 1, a.anim.transformOrigin = "50% 50%", a.anim.transformPerspective = 600, a.anim.rotation = 0, a.anim.ease = punchgs.Power3.easeOut, a.anim.force3D = "auto", a.speed = .3, a.anim.autoAlpha = 1, a.anim.visibility = "visible", a.anim.overwrite = "all", a
},
n = function() {
var a = new Object;
return a.anim = new Object, a.anim.x = 0, a.anim.y = 0, a.anim.z = 0, a
},
o = function() {
var a = new Object;
return a.anim = new Object, a.speed = .2, a
},
r = function(a, e) {
if (jQuery.isNumeric(parseFloat(a))) return parseFloat(a);
if (void 0 === a || "inherit" === a) return e;
if (a.split("{").length > 1) {
var t = a.split(","),
i = parseFloat(t[1].split("}")[0]);
t = parseFloat(t[0].split("{")[1]), a = Math.random() * (i - t) + t
}
return a
},
d = function(a, e, t, i, n, o, r) {
return !jQuery.isNumeric(a) && a.match(/%]/g) ? (a = a.split("[")[1].split("]")[0], "horizontal" == r ? a = (t + 2) * parseInt(a, 0) / 100 : "vertical" == r && (a = (i + 2) * parseInt(a, 0) / 100)) : (a = "layer_left" === a ? 0 - t : "layer_right" === a ? t : a, a = "layer_top" === a ? 0 - i : "layer_bottom" === a ? i : a, a = "left" === a || "stage_left" === a ? 0 - t - o : "right" === a || "stage_right" === a ? e.conw - o : "center" === a || "stage_center" === a ? e.conw / 2 - t / 2 - o : a, a = "top" === a || "stage_top" === a ? 0 - i - n : "bottom" === a || "stage_bottom" === a ? e.conh - n : "middle" === a || "stage_middle" === a ? e.conh / 2 - i / 2 - n : a), a
},
s = function(a, e, t) {
var i = new Object;
if (i = jQuery.extend(!0, {}, i, a), void 0 === e) return i;
var n = e.split(";");
return n && jQuery.each(n, function(a, e) {
var n = e.split(":"),
o = n[0],
d = n[1];
t && void 0 != d && d.length > 0 && d.match(/\(R\)/) && (d = d.replace("(R)", ""), d = "right" === d ? "left" : "left" === d ? "right" : "top" === d ? "bottom" : "bottom" === d ? "top" : d, "[" === d[0] && "-" === d[1] ? d = d.replace("[-", "[") : "[" === d[0] && "-" !== d[1] ? d = d.replace("[", "[-") : "-" === d[0] ? d = d.replace("-", "") : d[0].match(/[1-9]/) && (d = "-" + d)), void 0 != d && (d = d.replace(/\(R\)/, ""), ("rotationX" == o || "rX" == o) && (i.anim.rotationX = r(d, i.anim.rotationX) + "deg"), ("rotationY" == o || "rY" == o) && (i.anim.rotationY = r(d, i.anim.rotationY) + "deg"), ("rotationZ" == o || "rZ" == o) && (i.anim.rotation = r(d, i.anim.rotationZ) + "deg"), ("scaleX" == o || "sX" == o) && (i.anim.scaleX = r(d, i.anim.scaleX)), ("scaleY" == o || "sY" == o) && (i.anim.scaleY = r(d, i.anim.scaleY)), ("opacity" == o || "o" == o) && (i.anim.opacity = r(d, i.anim.opacity)), ("skewX" == o || "skX" == o) && (i.anim.skewX = r(d, i.anim.skewX)), ("skewY" == o || "skY" == o) && (i.anim.skewY = r(d, i.anim.skewY)), "x" == o && (i.anim.x = r(d, i.anim.x)), "y" == o && (i.anim.y = r(d, i.anim.y)), "z" == o && (i.anim.z = r(d, i.anim.z)), ("transformOrigin" == o || "tO" == o) && (i.anim.transformOrigin = d.toString()), ("transformPerspective" == o || "tP" == o) && (i.anim.transformPerspective = parseInt(d, 0)), ("speed" == o || "s" == o) && (i.speed = parseFloat(d) / 1e3), ("ease" == o || "e" == o) && (i.anim.ease = d))
}), i
},
l = function(a) {
if (void 0 === a) return !1;
var e = new Object;
e.anim = new Object;
var t = a.split(";");
return t && jQuery.each(t, function(a, t) {
t = t.split(":");
var i = t[0],
n = t[1];
"x" == i && (e.anim.x = n), "y" == i && (e.anim.y = n), "s" == i && (e.speed = parseFloat(n) / 1e3), ("e" == i || "ease" == i) && (e.anim.ease = n)
}), e
},
p = function(a, e) {
if (void 0 == a && (a = 0), !jQuery.isArray(a) && "string" === jQuery.type(a) && (a.split(",").length > 1 || a.split("[").length > 1)) {
a = a.replace("[", ""), a = a.replace("]", "");
var t = a.split(a.match(/'/g) ? "'," : ",");
a = new Array, t && jQuery.each(t, function(e, t) {
t = t.replace("'", ""), t = t.replace("'", ""), a.push(t)
})
} else {
var i = a;
jQuery.isArray(a) || (a = new Array, a.push(i))
}
var i = a[a.length - 1];
if (a.length < e.rle)
for (var n = 1; n <= e.curWinRange; n++) a.push(i);
return a
},
h = function(a, e, t, i) {
var n = -1;
if (a.hasClass("tp-static-layer")) {
var o = parseInt(a.data("startslide"), 0),
r = parseInt(a.data("endslide"), 0),
d = e.c.find(".processing-revslide").index(),
s = -1 != d ? d : e.c.find(".active-revslide").index();
s = -1 == s ? 0 : s, "in" === t ? a.hasClass("rev-static-visbile") ? n = r == s || o > s || s > r ? 2 : 0 : s >= o && r >= s || o == s || r == s ? (i || (a.addClass("rev-static-visbile"), a.removeClass("rev-static-hidden")), n = 1) : n = 0 : a.hasClass("rev-static-visbile") ? o > s || s > r ? (n = 2, i || (a.removeClass("rev-static-visbile"), a.addClass("rev-static-hidden"))) : n = 0 : n = 2
}
return n
},
c = function(a, e) {
if (void 0 === e) return a;
e = e.replace("c:", "color:"), e = e.replace("bg:", "background-color:"), e = e.replace("bw:", "border-width:"), e = e.replace("bc:", "border-color:"), e = e.replace("br:", "borderRadius:"), e = e.replace("bs:", "border-style:"), e = e.replace("td:", "text-decoration:");
var t = e.split(";");
return t && jQuery.each(t, function(e, t) {
var i = t.split(":");
i[0].length > 0 && (a.anim[i[0]] = i[1])
}), a
},
g = function(a, e) {
var t, i = new Object,
n = !1;
if ("rekursive" == e && (t = a.closest(".tp-caption"), t && a.css("fontSize") === t.css("fontSize") && (n = !0)), i.basealign = a.data("basealign") || "grid", i.fontSize = n ? void 0 === t.data("fontsize") ? parseInt(t.css("fontSize"), 0) || 0 : t.data("fontsize") : void 0 === a.data("fontsize") ? parseInt(a.css("fontSize"), 0) || 0 : a.data("fontsize"), i.fontWeight = n ? void 0 === t.data("fontweight") ? parseInt(t.css("fontWeight"), 0) || 0 : t.data("fontweight") : void 0 === a.data("fontweight") ? parseInt(a.css("fontWeight"), 0) || 0 : a.data("fontweight"), i.whiteSpace = n ? void 0 === t.data("whitespace") ? t.css("whitespace") || "normal" : t.data("whitespace") : void 0 === a.data("whitespace") ? a.css("whitespace") || "normal" : a.data("whitespace"), i.lineHeight = n ? void 0 === t.data("lineheight") ? parseInt(t.css("lineHeight"), 0) || 0 : t.data("lineheight") : void 0 === a.data("lineheight") ? parseInt(a.css("lineHeight"), 0) || 0 : a.data("lineheight"), i.letterSpacing = n ? void 0 === t.data("letterspacing") ? parseFloat(t.css("letterSpacing"), 0) || 0 : t.data("letterspacing") : void 0 === a.data("letterspacing") ? parseFloat(a.css("letterSpacing")) || 0 : a.data("letterspacing"), i.paddingTop = void 0 === a.data("paddingtop") ? parseInt(a.css("paddingTop"), 0) || 0 : a.data("paddingtop"), i.paddingBottom = void 0 === a.data("paddingbottom") ? parseInt(a.css("paddingBottom"), 0) || 0 : a.data("paddingbottom"), i.paddingLeft = void 0 === a.data("paddingleft") ? parseInt(a.css("paddingLeft"), 0) || 0 : a.data("paddingleft"), i.paddingRight = void 0 === a.data("paddingright") ? parseInt(a.css("paddingRight"), 0) || 0 : a.data("paddingright"), i.marginTop = void 0 === a.data("margintop") ? parseInt(a.css("marginTop"), 0) || 0 : a.data("margintop"), i.marginBottom = void 0 === a.data("marginbottom") ? parseInt(a.css("marginBottom"), 0) || 0 : a.data("marginbottom"), i.marginLeft = void 0 === a.data("marginleft") ? parseInt(a.css("marginLeft"), 0) || 0 : a.data("marginleft"), i.marginRight = void 0 === a.data("marginright") ? parseInt(a.css("marginRight"), 0) || 0 : a.data("marginright"), i.borderTopWidth = void 0 === a.data("bordertopwidth") ? parseInt(a.css("borderTopWidth"), 0) || 0 : a.data("bordertopwidth"), i.borderBottomWidth = void 0 === a.data("borderbottomwidth") ? parseInt(a.css("borderBottomWidth"), 0) || 0 : a.data("borderbottomwidth"), i.borderLeftWidth = void 0 === a.data("borderleftwidth") ? parseInt(a.css("borderLeftWidth"), 0) || 0 : a.data("borderleftwidth"), i.borderRightWidth = void 0 === a.data("borderrightwidth") ? parseInt(a.css("borderRightWidth"), 0) || 0 : a.data("borderrightwidth"), "rekursive" != e) {
if (i.color = void 0 === a.data("color") ? "nopredefinedcolor" : a.data("color"), i.whiteSpace = n ? void 0 === t.data("whitespace") ? t.css("whiteSpace") || "nowrap" : t.data("whitespace") : void 0 === a.data("whitespace") ? a.css("whiteSpace") || "nowrap" : a.data("whitespace"), i.minWidth = void 0 === a.data("width") ? parseInt(a.css("minWidth"), 0) || 0 : a.data("width"), i.minHeight = void 0 === a.data("height") ? parseInt(a.css("minHeight"), 0) || 0 : a.data("height"), void 0 != a.data("videowidth") && void 0 != a.data("videoheight")) {
var o = a.data("videowidth"),
r = a.data("videoheight");
o = "100%" === o ? "none" : o, r = "100%" === r ? "none" : r, a.data("width", o), a.data("height", r)
}
i.maxWidth = void 0 === a.data("width") ? parseInt(a.css("maxWidth"), 0) || "none" : a.data("width"), i.maxHeight = void 0 === a.data("height") ? parseInt(a.css("maxHeight"), 0) || "none" : a.data("height"), i.wan = void 0 === a.data("wan") ? parseInt(a.css("-webkit-transition"), 0) || "none" : a.data("wan"), i.moan = void 0 === a.data("moan") ? parseInt(a.css("-moz-animation-transition"), 0) || "none" : a.data("moan"), i.man = void 0 === a.data("man") ? parseInt(a.css("-ms-animation-transition"), 0) || "none" : a.data("man"), i.ani = void 0 === a.data("ani") ? parseInt(a.css("transition"), 0) || "none" : a.data("ani")
}
return i.styleProps = a.css(["background-color", "border-top-color", "border-bottom-color", "border-right-color", "border-left-color", "border-top-style", "border-bottom-style", "border-left-style", "border-right-style", "border-left-width", "border-right-width", "border-bottom-width", "border-top-width", "color", "text-decoration", "font-style", "border-radius"]), i
},
m = function(a, e) {
var t = new Object;
return a && jQuery.each(a, function(i, n) {
t[i] = p(n, e)[e.curWinRange] || a[i]
}), t
},
u = function(a, e, t, i) {
return a = jQuery.isNumeric(a) ? a * e + "px" : a, a = "full" === a ? i : "auto" === a || "none" === a ? t : a
},
v = function(a, e, t, i) {
var n;
void 0 === a.data("cssobj") ? (n = g(a, t), a.data("cssobj", n)) : n = a.data("cssobj");
var o = m(n, e),
r = e.bw,
d = e.bh;
if ("off" === i && (r = 1, d = 1), "auto" == o.lineHeight && (o.lineHeight = o.fontSize + 4), !a.hasClass("tp-splitted")) {
a.css("-webkit-transition", "none"), a.css("-moz-transition", "none"), a.css("-ms-transition", "none"), a.css("transition", "none");
var s = void 0 !== a.data("transform_hover") || void 0 !== a.data("style_hover");
if (s && punchgs.TweenLite.set(a, o.styleProps), punchgs.TweenLite.set(a, {
fontSize: Math.round(o.fontSize * r) + "px",
fontWeight: o.fontWeight,
letterSpacing: Math.floor(o.letterSpacing * r) + "px",
paddingTop: Math.round(o.paddingTop * d) + "px",
paddingBottom: Math.round(o.paddingBottom * d) + "px",
paddingLeft: Math.round(o.paddingLeft * r) + "px",
paddingRight: Math.round(o.paddingRight * r) + "px",
marginTop: o.marginTop * d + "px",
marginBottom: o.marginBottom * d + "px",
marginLeft: o.marginLeft * r + "px",
marginRight: o.marginRight * r + "px",
borderTopWidth: Math.round(o.borderTopWidth * d) + "px",
borderBottomWidth: Math.round(o.borderBottomWidth * d) + "px",
borderLeftWidth: Math.round(o.borderLeftWidth * r) + "px",
borderRightWidth: Math.round(o.borderRightWidth * r) + "px",
lineHeight: Math.round(o.lineHeight * d) + "px",
overwrite: "auto"
}), "rekursive" != t) {
var l = "slide" == o.basealign ? e.ulw : e.gridwidth[e.curWinRange],
p = "slide" == o.basealign ? e.ulh : e.gridheight[e.curWinRange],
h = u(o.maxWidth, r, "none", l),
c = u(o.maxHeight, d, "none", p),
v = u(o.minWidth, r, "0px", l),
f = u(o.minHeight, d, "0px", p);
punchgs.TweenLite.set(a, {
maxWidth: h,
maxHeight: c,
minWidth: v,
minHeight: f,
whiteSpace: o.whiteSpace,
overwrite: "auto"
}), "nopredefinedcolor" != o.color && punchgs.TweenLite.set(a, {
color: o.color,
overwrite: "auto"
})
}
setTimeout(function() {
a.css("-webkit-transition", a.data("wan")), a.css("-moz-transition", a.data("moan")), a.css("-ms-transition", a.data("man")), a.css("transition", a.data("ani"))
}, 30)
}
},
f = function(a, e) {
if (a.hasClass("rs-pendulum") && void 0 == a.data("loop-timeline")) {
a.data("loop-timeline", new punchgs.TimelineLite);
var t = void 0 == a.data("startdeg") ? -20 : a.data("startdeg"),
i = void 0 == a.data("enddeg") ? 20 : a.data("enddeg"),
n = void 0 == a.data("speed") ? 2 : a.data("speed"),
o = void 0 == a.data("origin") ? "50% 50%" : a.data("origin"),
r = void 0 == a.data("easing") ? punchgs.Power2.easeInOut : a.data("ease");
t *= e, i *= e, a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a, n, {
force3D: "auto",
rotation: t,
transformOrigin: o
}, {
rotation: i,
ease: r
})), a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a, n, {
force3D: "auto",
rotation: i,
transformOrigin: o
}, {
rotation: t,
ease: r,
onComplete: function() {
a.data("loop-timeline").restart()
}
}))
}
if (a.hasClass("rs-rotate") && void 0 == a.data("loop-timeline")) {
a.data("loop-timeline", new punchgs.TimelineLite);
var t = void 0 == a.data("startdeg") ? 0 : a.data("startdeg"),
i = void 0 == a.data("enddeg") ? 360 : a.data("enddeg");
n = void 0 == a.data("speed") ? 2 : a.data("speed"), o = void 0 == a.data("origin") ? "50% 50%" : a.data("origin"), r = void 0 == a.data("easing") ? punchgs.Power2.easeInOut : a.data("easing"), t *= e, i *= e, a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a, n, {
force3D: "auto",
rotation: t,
transformOrigin: o
}, {
rotation: i,
ease: r,
onComplete: function() {
a.data("loop-timeline").restart()
}
}))
}
if (a.hasClass("rs-slideloop") && void 0 == a.data("loop-timeline")) {
a.data("loop-timeline", new punchgs.TimelineLite);
var d = void 0 == a.data("xs") ? 0 : a.data("xs"),
s = void 0 == a.data("ys") ? 0 : a.data("ys"),
l = void 0 == a.data("xe") ? 0 : a.data("xe"),
p = void 0 == a.data("ye") ? 0 : a.data("ye"),
n = void 0 == a.data("speed") ? 2 : a.data("speed"),
r = void 0 == a.data("easing") ? punchgs.Power2.easeInOut : a.data("easing");
d *= e, s *= e, l *= e, p *= e, a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a, n, {
force3D: "auto",
x: d,
y: s
}, {
x: l,
y: p,
ease: r
})), a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a, n, {
force3D: "auto",
x: l,
y: p
}, {
x: d,
y: s,
onComplete: function() {
a.data("loop-timeline").restart()
}
}))
}
if (a.hasClass("rs-pulse") && void 0 == a.data("loop-timeline")) {
a.data("loop-timeline", new punchgs.TimelineLite);
var h = void 0 == a.data("zoomstart") ? 0 : a.data("zoomstart"),
c = void 0 == a.data("zoomend") ? 0 : a.data("zoomend"),
n = void 0 == a.data("speed") ? 2 : a.data("speed"),
r = void 0 == a.data("easing") ? punchgs.Power2.easeInOut : a.data("easing");
a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a, n, {
force3D: "auto",
scale: h
}, {
scale: c,
ease: r
})), a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(a, n, {
force3D: "auto",
scale: c
}, {
scale: h,
onComplete: function() {
a.data("loop-timeline").restart()
}
}))
}
if (a.hasClass("rs-wave") && void 0 == a.data("loop-timeline")) {
a.data("loop-timeline", new punchgs.TimelineLite);
var g = void 0 == a.data("angle") ? 10 : parseInt(a.data("angle"), 0),
m = void 0 == a.data("radius") ? 10 : parseInt(a.data("radius"), 0),
n = void 0 == a.data("speed") ? -20 : a.data("speed"),
o = void 0 == a.data("origin") ? "50% 50%" : a.data("origin"),
u = o.split(" "),
v = new Object;
u.length >= 1 ? (v.x = u[0], v.y = u[1]) : (v.x = "50%", v.y = "50%"), g *= e, m *= e;
var f = 0 - a.height() / 2 + m * (-1 + parseInt(v.y, 0) / 100),
w = a.width() * (-.5 + parseInt(v.x, 0) / 100),
y = {
a: 0,
ang: g,
element: a,
unit: m,
xoffset: w,
yoffset: f
};
a.data("loop-timeline").append(new punchgs.TweenLite.fromTo(y, n, {
a: 360
}, {
a: 0,
force3D: "auto",
ease: punchgs.Linear.easeNone,
onUpdate: function() {
var a = y.a * (Math.PI / 180);
punchgs.TweenLite.to(y.element, .1, {
force3D: "auto",
x: y.xoffset + Math.cos(a) * y.unit,
y: y.yoffset + y.unit * (1 - Math.sin(a))
})
},
onComplete: function() {
a.data("loop-timeline").restart()
}
}))
}
},
w = function(a) {
a.find(".rs-pendulum, .rs-slideloop, .rs-pulse, .rs-wave").each(function() {
var a = jQuery(this);
void 0 != a.data("loop-timeline") && (a.data("loop-timeline").pause(), a.data("loop-timeline", null))
})
}
}(jQuery);
#4 JavaScript::Eval (size: 167198) - SHA256: ac0aa748570b39b49319bc3634b503ed1971048d25c9f61dfdf103cf8470af51
window.MagicScroll = (function() {
var u, v;
u = v = (function() {
var R = {
version: "v3.3-b5-7-g46fd501",
UUID: 0,
storage: {},
$uuid: function(V) {
return (V.$J_UUID || (V.$J_UUID = ++L.UUID))
},
getStorage: function(V) {
return (L.storage[V] || (L.storage[V] = {}))
},
$F: function() {},
$false: function() {
return false
},
$true: function() {
return true
},
stylesId: "mjs-" + Math.floor(Math.random() * new Date().getTime()),
defined: function(V) {
return (undefined != V)
},
ifndef: function(W, V) {
return (undefined != W) ? W : V
},
exists: function(V) {
return !!(V)
},
jTypeOf: function(V) {
if (!L.defined(V)) {
return false
}
if (V.$J_TYPE) {
return V.$J_TYPE
}
if (!!V.nodeType) {
if (1 == V.nodeType) {
return "element"
}
if (3 == V.nodeType) {
return "textnode"
}
}
if (V.length && V.item) {
return "collection"
}
if (V.length && V.callee) {
return "arguments"
}
if ((V instanceof window.Object || V instanceof window.Function) && V.constructor === L.Class) {
return "class"
}
if (V instanceof window.Array) {
return "array"
}
if (V instanceof window.Function) {
return "function"
}
if (V instanceof window.String) {
return "string"
}
if (L.browser.trident) {
if (L.defined(V.cancelBubble)) {
return "event"
}
} else {
if (V === window.event || V.constructor == window.Event || V.constructor == window.MouseEvent || V.constructor == window.UIEvent || V.constructor == window.KeyboardEvent || V.constructor == window.KeyEvent) {
return "event"
}
}
if (V instanceof window.Date) {
return "date"
}
if (V instanceof window.RegExp) {
return "regexp"
}
if (V === window) {
return "window"
}
if (V === document) {
return "document"
}
return typeof(V)
},
extend: function(aa, Z) {
if (!(aa instanceof window.Array)) {
aa = [aa]
}
if (!Z) {
return aa[0]
}
for (var Y = 0, W = aa.length; Y < W; Y++) {
if (!L.defined(aa)) {
continue
}
for (var X in Z) {
if (!Object.prototype.hasOwnProperty.call(Z, X)) {
continue
}
try {
aa[Y][X] = Z[X]
} catch (V) {}
}
}
return aa[0]
},
implement: function(Z, Y) {
if (!(Z instanceof window.Array)) {
Z = [Z]
}
for (var X = 0, V = Z.length; X < V; X++) {
if (!L.defined(Z[X])) {
continue
}
if (!Z[X].prototype) {
continue
}
for (var W in (Y || {})) {
if (!Z[X].prototype[W]) {
Z[X].prototype[W] = Y[W]
}
}
}
return Z[0]
},
nativize: function(X, W) {
if (!L.defined(X)) {
return X
}
for (var V in (W || {})) {
if (!X[V]) {
X[V] = W[V]
}
}
return X
},
$try: function() {
for (var W = 0, V = arguments.length; W < V; W++) {
try {
return arguments[W]()
} catch (X) {}
}
return null
},
$A: function(X) {
if (!L.defined(X)) {
return L.$([])
}
if (X.toArray) {
return L.$(X.toArray())
}
if (X.item) {
var W = X.length || 0,
V = new Array(W);
while (W--) {
V[W] = X[W]
}
return L.$(V)
}
return L.$(Array.prototype.slice.call(X))
},
now: function() {
return new Date().getTime()
},
detach: function(Z) {
var X;
switch (L.jTypeOf(Z)) {
case "object":
X = {};
for (var Y in Z) {
X[Y] = L.detach(Z[Y])
}
break;
case "array":
X = [];
for (var W = 0, V = Z.length; W < V; W++) {
X[W] = L.detach(Z[W])
}
break;
default:
return Z
}
return L.$(X)
},
$: function(X) {
var V = true;
if (!L.defined(X)) {
return null
}
if (X.$J_EXT) {
return X
}
switch (L.jTypeOf(X)) {
case "array":
X = L.nativize(X, L.extend(L.Array, {
$J_EXT: L.$F
}));
X.jEach = X.forEach;
return X;
break;
case "string":
var W = document.getElementById(X);
if (L.defined(W)) {
return L.$(W)
}
return null;
break;
case "window":
case "document":
L.$uuid(X);
X = L.extend(X, L.Doc);
break;
case "element":
L.$uuid(X);
X = L.extend(X, L.Element);
break;
case "event":
X = L.extend(X, L.Event);
break;
case "textnode":
case "function":
case "array":
case "date":
default:
V = false;
break
}
if (V) {
return L.extend(X, {
$J_EXT: L.$F
})
} else {
return X
}
},
$new: function(V, X, W) {
return L.$(L.doc.createElement(V)).setProps(X || {}).jSetCss(W || {})
},
addCSS: function(Y, Z, W) {
var V, ab, X, ad = [],
ac = -1;
W || (W = L.stylesId);
V = L.$(W) || L.$new("style", {
id: W,
type: "text/css"
}).jAppendTo((document.head || document.body), "top");
ab = V.sheet || V.styleSheet;
if ("string" != L.jTypeOf(Z)) {
for (var X in Z) {
ad.push(X + ":" + Z[X])
}
Z = ad.join(";")
}
if (ab.insertRule) {
ac = ab.insertRule(Y + " {" + Z + "}", ab.cssRules.length)
} else {
try {
ac = ab.addRule(Y, Z, ab.rules.length)
} catch (aa) {}
}
return ac
},
removeCSS: function(Y, V) {
var X, W;
X = L.$(Y);
if ("element" !== L.jTypeOf(X)) {
return
}
W = X.sheet || X.styleSheet;
if (W.deleteRule) {
W.deleteRule(V)
} else {
if (W.removeRule) {
W.removeRule(V)
}
}
},
generateUUID: function() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(X) {
var W = Math.random() * 16 | 0,
V = X == "x" ? W : (W & 3 | 8);
return V.toString(16)
}).toUpperCase()
},
getAbsoluteURL: (function() {
var V;
return function(W) {
if (!V) {
V = document.createElement("a")
}
V.setAttribute("href", W);
return ("!!" + V.href).replace("!!", "")
}
})(),
getHashCode: function(X) {
var Y = 0,
V = X.length;
for (var W = 0; W < V; ++W) {
Y = 31 * Y + X.charCodeAt(W);
Y %= 4294967296
}
return Y
}
};
var L = R;
var M = R.$;
if (!window.magicJS) {
window.magicJS = R;
window.$mjs = R.$
}
L.Array = {
$J_TYPE: "array",
indexOf: function(Y, Z) {
var V = this.length;
for (var W = this.length, X = (Z < 0) ? Math.max(0, W + Z) : Z || 0; X < W; X++) {
if (this[X] === Y) {
return X
}
}
return -1
},
contains: function(V, W) {
return this.indexOf(V, W) != -1
},
forEach: function(V, Y) {
for (var X = 0, W = this.length; X < W; X++) {
if (X in this) {
V.call(Y, this[X], X, this)
}
}
},
filter: function(V, aa) {
var Z = [];
for (var Y = 0, W = this.length; Y < W; Y++) {
if (Y in this) {
var X = this[Y];
if (V.call(aa, this[Y], Y, this)) {
Z.push(X)
}
}
}
return Z
},
map: function(V, Z) {
var Y = [];
for (var X = 0, W = this.length; X < W; X++) {
if (X in this) {
Y[X] = V.call(Z, this[X], X, this)
}
}
return Y
}
};
L.implement(String, {
$J_TYPE: "string",
jTrim: function() {
return this.replace(/^\s+|\s+$/g, "")
},
eq: function(V, W) {
return (W || false) ? (this.toString() === V.toString()) : (this.toLowerCase().toString() === V.toLowerCase().toString())
},
jCamelize: function() {
return this.replace(/-\D/g, function(V) {
return V.charAt(1).toUpperCase()
})
},
dashize: function() {
return this.replace(/[A-Z]/g, function(V) {
return ("-" + V.charAt(0).toLowerCase())
})
},
jToInt: function(V) {
return parseInt(this, V || 10)
},
toFloat: function() {
return parseFloat(this)
},
jToBool: function() {
return !this.replace(/true/i, "").jTrim()
},
has: function(W, V) {
V = V || "";
return (V + this + V).indexOf(V + W + V) > -1
}
});
R.implement(Function, {
$J_TYPE: "function",
jBind: function() {
var W = L.$A(arguments),
V = this,
X = W.shift();
return function() {
return V.apply(X || null, W.concat(L.$A(arguments)))
}
},
jBindAsEvent: function() {
var W = L.$A(arguments),
V = this,
X = W.shift();
return function(Y) {
return V.apply(X || null, L.$([Y || (L.browser.ieMode ? window.event : null)]).concat(W))
}
},
jDelay: function() {
var W = L.$A(arguments),
V = this,
X = W.shift();
return window.setTimeout(function() {
return V.apply(V, W)
}, X || 0)
},
jDefer: function() {
var W = L.$A(arguments),
V = this;
return function() {
return V.jDelay.apply(V, W)
}
},
interval: function() {
var W = L.$A(arguments),
V = this,
X = W.shift();
return window.setInterval(function() {
return V.apply(V, W)
}, X || 0)
}
});
var S = {};
var K = navigator.userAgent.toLowerCase();
var J = K.match(/(webkit|gecko|trident|presto)\/(\d+\.?\d*)/i);
var O = K.match(/(edge|opr)\/(\d+\.?\d*)/i) || K.match(/(crios|chrome|safari|firefox|opera|opr)\/(\d+\.?\d*)/i);
var Q = K.match(/version\/(\d+\.?\d*)/i);
var F = document.documentElement.style;
function G(W) {
var V = W.charAt(0).toUpperCase() + W.slice(1);
return W in F || ("Webkit" + V) in F || ("Moz" + V) in F || ("ms" + V) in F || ("O" + V) in F
}
L.browser = {
features: {
xpath: !!(document.evaluate),
air: !!(window.runtime),
query: !!(document.querySelector),
fullScreen: !!(document.fullscreenEnabled || document.msFullscreenEnabled || document.exitFullscreen || document.cancelFullScreen || document.webkitexitFullscreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.oCancelFullScreen || document.msCancelFullScreen),
xhr2: !!(window.ProgressEvent) && !!(window.FormData) && (window.XMLHttpRequest && "withCredentials" in new XMLHttpRequest),
transition: G("transition"),
transform: G("transform"),
perspective: G("perspective"),
animation: G("animation"),
requestAnimationFrame: false,
multibackground: false,
cssFilters: false,
canvas: false,
svg: (function() {
return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1")
}())
},
touchScreen: (function() {
return "ontouchstart" in window || (window.DocumentTouch && document instanceof DocumentTouch) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)
}()),
mobile: !!K.match(/(android|bb\d+|meego).+|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/),
engine: (J && J[1]) ? J[1].toLowerCase() : (window.opera) ? "presto" : !!(window.ActiveXObject) ? "trident" : (document.getBoxObjectFor !== undefined || window.mozInnerScreenY !== null) ? "gecko" : (window.WebKitPoint !== null || !navigator.taintEnabled) ? "webkit" : "unknown",
version: (J && J[2]) ? parseFloat(J[2]) : 0,
uaName: (O && O[1]) ? O[1].toLowerCase() : "",
uaVersion: (O && O[2]) ? parseFloat(O[2]) : 0,
cssPrefix: "",
cssDomPrefix: "",
domPrefix: "",
ieMode: 0,
platform: K.match(/ip(?:ad|od|hone)/) ? "ios" : (K.match(/(?:webos|android)/) || navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(),
backCompat: document.compatMode && document.compatMode.toLowerCase() === "backcompat",
scrollbarsWidth: 0,
getDoc: function() {
return (document.compatMode && document.compatMode.toLowerCase() === "backcompat") ? document.body : document.documentElement
},
requestAnimationFrame: window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || undefined,
cancelAnimationFrame: window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || undefined,
ready: false,
onready: function() {
if (L.browser.ready) {
return
}
var Y;
var X;
L.browser.ready = true;
L.body = L.$(document.body);
L.win = L.$(window);
try {
var W = L.$new("div").jSetCss({
width: 100,
height: 100,
overflow: "scroll",
position: "absolute",
top: -9999
}).jAppendTo(document.body);
L.browser.scrollbarsWidth = W.offsetWidth - W.clientWidth;
W.jRemove()
} catch (V) {}
try {
Y = L.$new("div");
X = Y.style;
X.cssText = "background:url(https://),url(https://),red url(https://)";
L.browser.features.multibackground = (/(url\s*\(.*?){3}/).test(X.background);
X = null;
Y = null
} catch (V) {}
if (!L.browser.cssTransformProp) {
L.browser.cssTransformProp = L.normalizeCSS("transform").dashize()
}
try {
Y = L.$new("div");
Y.style.cssText = L.normalizeCSS("filter").dashize() + ":blur(2px);";
L.browser.features.cssFilters = !!Y.style.length && (!L.browser.ieMode || L.browser.ieMode > 9);
Y = null
} catch (V) {}
if (!L.browser.features.cssFilters) {
L.$(document.documentElement).jAddClass("no-cssfilters-magic")
}
try {
L.browser.features.canvas = (function() {
var Z = L.$new("canvas");
return !!(Z.getContext && Z.getContext("2d"))
}())
} catch (V) {}
if (window.TransitionEvent === undefined && window.WebKitTransitionEvent !== undefined) {
S.transitionend = "webkitTransitionEnd"
}
L.Doc.jCallEvent.call(L.$(document), "domready")
}
};
(function() {
var W = [],
Z, Y, aa;
function V() {
return !!(arguments.callee.caller)
}
switch (L.browser.engine) {
case "trident":
if (!L.browser.version) {
L.browser.version = !!(window.XMLHttpRequest) ? 3 : 2
}
break;
case "gecko":
L.browser.version = (O && O[2]) ? parseFloat(O[2]) : 0;
break
}
L.browser[L.browser.engine] = true;
if (O && O[1] === "crios") {
L.browser.uaName = "chrome"
}
if (!!window.chrome) {
L.browser.chrome = true
}
if (O && O[1] === "opr") {
L.browser.uaName = "opera";
L.browser.opera = true
}
if (L.browser.uaName === "safari" && (Q && Q[1])) {
L.browser.uaVersion = parseFloat(Q[1])
}
if (L.browser.platform === "android" && L.browser.webkit && (Q && Q[1])) {
L.browser.androidBrowser = true
}
Z = ({
gecko: ["-moz-", "Moz", "moz"],
webkit: ["-webkit-", "Webkit", "webkit"],
trident: ["-ms-", "ms", "ms"],
presto: ["-o-", "O", "o"]
})[L.browser.engine] || ["", "", ""];
L.browser.cssPrefix = Z[0];
L.browser.cssDomPrefix = Z[1];
L.browser.domPrefix = Z[2];
L.browser.ieMode = !L.browser.trident ? undefined : (document.documentMode) ? document.documentMode : (function() {
var ab = 0;
if (L.browser.backCompat) {
return 5
}
switch (L.browser.version) {
case 2:
ab = 6;
break;
case 3:
ab = 7;
break
}
return ab
}());
W.push(L.browser.platform + "-magic");
if (L.browser.mobile) {
W.push("mobile-magic")
}
if (L.browser.androidBrowser) {
W.push("android-browser-magic")
}
if (L.browser.ieMode) {
L.browser.uaName = "ie";
L.browser.uaVersion = L.browser.ieMode;
W.push("ie" + L.browser.ieMode + "-magic");
for (Y = 11; Y > L.browser.ieMode; Y--) {
W.push("lt-ie" + Y + "-magic")
}
}
if (L.browser.webkit && L.browser.version < 536) {
L.browser.features.fullScreen = false
}
if (L.browser.requestAnimationFrame) {
L.browser.requestAnimationFrame.call(window, function() {
L.browser.features.requestAnimationFrame = true
})
}
if (L.browser.features.svg) {
W.push("svg-magic")
} else {
W.push("no-svg-magic")
}
aa = (document.documentElement.className || "").match(/\S+/g) || [];
document.documentElement.className = L.$(aa).concat(W).join(" ");
try {
document.documentElement.setAttribute("data-magic-ua", L.browser.uaName);
document.documentElement.setAttribute("data-magic-ua-ver", L.browser.uaVersion)
} catch (X) {}
if (L.browser.ieMode && L.browser.ieMode < 9) {
document.createElement("figure");
document.createElement("figcaption")
}
if (!window.navigator.pointerEnabled) {
L.$(["Down", "Up", "Move", "Over", "Out"]).jEach(function(ab) {
S["pointer" + ab.toLowerCase()] = window.navigator.msPointerEnabled ? "MSPointer" + ab : -1
})
}
}());
(function() {
L.browser.fullScreen = {
capable: L.browser.features.fullScreen,
enabled: function() {
return !!(document.fullscreenElement || document[L.browser.domPrefix + "FullscreenElement"] || document.fullScreen || document.webkitIsFullScreen || document[L.browser.domPrefix + "FullScreen"])
},
request: function(V, W) {
if (!W) {
W = {}
}
if (this.capable) {
L.$(document).jAddEvent(this.changeEventName, this.onchange = function(X) {
if (this.enabled()) {
if (W.onEnter) {
W.onEnter()
}
} else {
L.$(document).jRemoveEvent(this.changeEventName, this.onchange);
if (W.onExit) {
W.onExit()
}
}
}.jBindAsEvent(this));
L.$(document).jAddEvent(this.errorEventName, this.onerror = function(X) {
if (W.fallback) {
W.fallback()
}
L.$(document).jRemoveEvent(this.errorEventName, this.onerror)
}.jBindAsEvent(this));
(V.requestFullscreen || V[L.browser.domPrefix + "RequestFullscreen"] || V[L.browser.domPrefix + "RequestFullScreen"] || function() {}).call(V)
} else {
if (W.fallback) {
W.fallback()
}
}
},
cancel: (document.exitFullscreen || document.cancelFullScreen || document[L.browser.domPrefix + "ExitFullscreen"] || document[L.browser.domPrefix + "CancelFullScreen"] || function() {}).jBind(document),
changeEventName: document.msExitFullscreen ? "MSFullscreenChange" : (document.exitFullscreen ? "" : L.browser.domPrefix) + "fullscreenchange",
errorEventName: document.msExitFullscreen ? "MSFullscreenError" : (document.exitFullscreen ? "" : L.browser.domPrefix) + "fullscreenerror",
prefix: L.browser.domPrefix,
activeElement: null
}
}());
var U = /\S+/g,
I = /^(border(Top|Bottom|Left|Right)Width)|((padding|margin)(Top|Bottom|Left|Right))$/,
N = {
"float": ("undefined" === typeof(F.styleFloat)) ? "cssFloat" : "styleFloat"
},
P = {
fontWeight: true,
lineHeight: true,
opacity: true,
zIndex: true,
zoom: true
},
H = (window.getComputedStyle) ? function(X, V) {
var W = window.getComputedStyle(X, null);
return W ? W.getPropertyValue(V) || W[V] : null
} : function(Y, W) {
var X = Y.currentStyle,
V = null;
V = X ? X[W] : null;
if (null == V && Y.style && Y.style[W]) {
V = Y.style[W]
}
return V
};
function T(X) {
var V, W;
W = (L.browser.webkit && "filter" == X) ? false : (X in F);
if (!W) {
V = L.browser.cssDomPrefix + X.charAt(0).toUpperCase() + X.slice(1);
if (V in F) {
return V
}
}
return X
}
L.normalizeCSS = T;
L.Element = {
jHasClass: function(V) {
return !(V || "").has(" ") && (this.className || "").has(V, " ")
},
jAddClass: function(Z) {
var W = (this.className || "").match(U) || [],
Y = (Z || "").match(U) || [],
V = Y.length,
X = 0;
for (; X < V; X++) {
if (!L.$(W).contains(Y[X])) {
W.push(Y[X])
}
}
this.className = W.join(" ");
return this
},
jRemoveClass: function(aa) {
var W = (this.className || "").match(U) || [],
Z = (aa || "").match(U) || [],
V = Z.length,
Y = 0,
X;
for (; Y < V; Y++) {
if ((X = L.$(W).indexOf(Z[Y])) > -1) {
W.splice(X, 1)
}
}
this.className = aa ? W.join(" ") : "";
return this
},
jToggleClass: function(V) {
return this.jHasClass(V) ? this.jRemoveClass(V) : this.jAddClass(V)
},
jGetCss: function(W) {
var X = W.jCamelize(),
V = null;
W = N[X] || (N[X] = T(X));
V = H(this, W);
if ("auto" === V) {
V = null
}
if (null !== V) {
if ("opacity" == W) {
return L.defined(V) ? parseFloat(V) : 1
}
if (I.test(W)) {
V = parseInt(V, 10) ? V : "0px"
}
}
return V
},
jSetCssProp: function(W, V) {
var Y = W.jCamelize();
try {
if ("opacity" == W) {
this.jSetOpacity(V);
return this
}
W = N[Y] || (N[Y] = T(Y));
this.style[W] = V + (("number" == L.jTypeOf(V) && !P[Y]) ? "px" : "")
} catch (X) {}
return this
},
jSetCss: function(W) {
for (var V in W) {
this.jSetCssProp(V, W[V])
}
return this
},
jGetStyles: function() {
var V = {};
L.$A(arguments).jEach(function(W) {
V[W] = this.jGetCss(W)
}, this);
return V
},
jSetOpacity: function(X, V) {
var W;
V = V || false;
this.style.opacity = X;
X = parseInt(parseFloat(X) * 100);
if (V) {
if (0 === X) {
if ("hidden" != this.style.visibility) {
this.style.visibility = "hidden"
}
} else {
if ("visible" != this.style.visibility) {
this.style.visibility = "visible"
}
}
}
if (L.browser.ieMode && L.browser.ieMode < 9) {
if (!isNaN(X)) {
if (!~this.style.filter.indexOf("Alpha")) {
this.style.filter += " progid:DXImageTransform.Microsoft.Alpha(Opacity=" + X + ")"
} else {
this.style.filter = this.style.filter.replace(/Opacity=\d*/i, "Opacity=" + X)
}
} else {
this.style.filter = this.style.filter.replace(/progid:DXImageTransform.Microsoft.Alpha\(Opacity=\d*\)/i, "").jTrim();
if ("" === this.style.filter) {
this.style.removeAttribute("filter")
}
}
}
return this
},
setProps: function(V) {
for (var W in V) {
if ("class" === W) {
this.jAddClass("" + V[W])
} else {
this.setAttribute(W, "" + V[W])
}
}
return this
},
jGetTransitionDuration: function() {
var W = 0,
V = 0;
W = this.jGetCss("transition-duration");
V = this.jGetCss("transition-delay");
W = W.indexOf("ms") > -1 ? parseFloat(W) : W.indexOf("s") > -1 ? parseFloat(W) * 1000 : 0;
V = V.indexOf("ms") > -1 ? parseFloat(V) : V.indexOf("s") > -1 ? parseFloat(V) * 1000 : 0;
return W + V
},
hide: function() {
return this.jSetCss({
display: "none",
visibility: "hidden"
})
},
show: function() {
return this.jSetCss({
display: "",
visibility: "visible"
})
},
jGetSize: function() {
return {
width: this.offsetWidth,
height: this.offsetHeight
}
},
getInnerSize: function(W) {
var V = this.jGetSize();
V.width -= (parseFloat(this.jGetCss("border-left-width") || 0) + parseFloat(this.jGetCss("border-right-width") || 0));
V.height -= (parseFloat(this.jGetCss("border-top-width") || 0) + parseFloat(this.jGetCss("border-bottom-width") || 0));
if (!W) {
V.width -= (parseFloat(this.jGetCss("padding-left") || 0) + parseFloat(this.jGetCss("padding-right") || 0));
V.height -= (parseFloat(this.jGetCss("padding-top") || 0) + parseFloat(this.jGetCss("padding-bottom") || 0))
}
return V
},
jGetScroll: function() {
return {
top: this.scrollTop,
left: this.scrollLeft
}
},
jGetFullScroll: function() {
var V = this,
W = {
top: 0,
left: 0
};
do {
W.left += V.scrollLeft || 0;
W.top += V.scrollTop || 0;
V = V.parentNode
} while (V);
return W
},
jGetPosition: function() {
var Z = this,
W = 0,
Y = 0;
if (L.defined(document.documentElement.getBoundingClientRect)) {
var V = this.getBoundingClientRect(),
X = L.$(document).jGetScroll(),
aa = L.browser.getDoc();
return {
top: V.top + X.y - aa.clientTop,
left: V.left + X.x - aa.clientLeft
}
}
do {
W += Z.offsetLeft || 0;
Y += Z.offsetTop || 0;
Z = Z.offsetParent
} while (Z && !(/^(?:body|html)$/i).test(Z.tagName));
return {
top: Y,
left: W
}
},
jGetRect: function() {
var W = this.jGetPosition();
var V = this.jGetSize();
return {
top: W.top,
bottom: W.top + V.height,
left: W.left,
right: W.left + V.width
}
},
changeContent: function(W) {
try {
this.innerHTML = W
} catch (V) {
this.innerText = W
}
return this
},
jRemove: function() {
return (this.parentNode) ? this.parentNode.removeChild(this) : this
},
kill: function() {
L.$A(this.childNodes).jEach(function(V) {
if (3 == V.nodeType || 8 == V.nodeType) {
return
}
L.$(V).kill()
});
this.jRemove();
this.jClearEvents();
if (this.$J_UUID) {
L.storage[this.$J_UUID] = null;
delete L.storage[this.$J_UUID]
}
return null
},
append: function(X, W) {
W = W || "bottom";
var V = this.firstChild;
("top" == W && V) ? this.insertBefore(X, V): this.appendChild(X);
return this
},
jAppendTo: function(X, W) {
var V = L.$(X).append(this, W);
return this
},
enclose: function(V) {
this.append(V.parentNode.replaceChild(this, V));
return this
},
hasChild: function(V) {
if ("element" !== L.jTypeOf("string" == L.jTypeOf(V) ? V = document.getElementById(V) : V)) {
return false
}
return (this == V) ? false : (this.contains && !(L.browser.webkit419)) ? (this.contains(V)) : (this.compareDocumentPosition) ? !!(this.compareDocumentPosition(V) & 16) : L.$A(this.byTag(V.tagName)).contains(V)
}
};
L.Element.jGetStyle = L.Element.jGetCss;
L.Element.jSetStyle = L.Element.jSetCss;
if (!window.Element) {
window.Element = L.$F;
if (L.browser.engine.webkit) {
window.document.createElement("iframe")
}
window.Element.prototype = (L.browser.engine.webkit) ? window["[[DOMElement.prototype]]"] : {}
}
L.implement(window.Element, {
$J_TYPE: "element"
});
L.Doc = {
jGetSize: function() {
if (L.browser.touchScreen || L.browser.presto925 || L.browser.webkit419) {
return {
width: window.innerWidth,
height: window.innerHeight
}
}
return {
width: L.browser.getDoc().clientWidth,
height: L.browser.getDoc().clientHeight
}
},
jGetScroll: function() {
return {
x: window.pageXOffset || L.browser.getDoc().scrollLeft,
y: window.pageYOffset || L.browser.getDoc().scrollTop
}
},
jGetFullSize: function() {
var V = this.jGetSize();
return {
width: Math.max(L.browser.getDoc().scrollWidth, V.width),
height: Math.max(L.browser.getDoc().scrollHeight, V.height)
}
}
};
L.extend(document, {
$J_TYPE: "document"
});
L.extend(window, {
$J_TYPE: "window"
});
L.extend([L.Element, L.Doc], {
jFetch: function(Y, W) {
var V = L.getStorage(this.$J_UUID),
X = V[Y];
if (undefined !== W && undefined === X) {
X = V[Y] = W
}
return (L.defined(X) ? X : null)
},
jStore: function(X, W) {
var V = L.getStorage(this.$J_UUID);
V[X] = W;
return this
},
jDel: function(W) {
var V = L.getStorage(this.$J_UUID);
delete V[W];
return this
}
});
if (!(window.HTMLElement && window.HTMLElement.prototype && window.HTMLElement.prototype.getElementsByClassName)) {
L.extend([L.Element, L.Doc], {
getElementsByClassName: function(V) {
return L.$A(this.getElementsByTagName("*")).filter(function(X) {
try {
return (1 == X.nodeType && X.className.has(V, " "))
} catch (W) {}
})
}
})
}
L.extend([L.Element, L.Doc], {
byClass: function() {
return this.getElementsByClassName(arguments[0])
},
byTag: function() {
return this.getElementsByTagName(arguments[0])
}
});
if (L.browser.fullScreen.capable && !document.requestFullScreen) {
L.Element.requestFullScreen = function() {
L.browser.fullScreen.request(this)
}
}
L.Event = {
$J_TYPE: "event",
isQueueStopped: L.$false,
stop: function() {
return this.stopDistribution().stopDefaults()
},
stopDistribution: function() {
if (this.stopPropagation) {
this.stopPropagation()
} else {
this.cancelBubble = true
}
return this
},
stopDefaults: function() {
if (this.preventDefault) {
this.preventDefault()
} else {
this.returnValue = false
}
return this
},
stopQueue: function() {
this.isQueueStopped = L.$true;
return this
},
getClientXY: function() {
var V = (/touch/i).test(this.type) ? this.changedTouches[0] : this;
return !L.defined(V) ? {
x: 0,
y: 0
} : {
x: V.clientX,
y: V.clientY
}
},
jGetPageXY: function() {
var V = (/touch/i).test(this.type) ? this.changedTouches[0] : this;
return !L.defined(V) ? {
x: 0,
y: 0
} : {
x: V.pageX || V.clientX + L.browser.getDoc().scrollLeft,
y: V.pageY || V.clientY + L.browser.getDoc().scrollTop
}
},
getTarget: function() {
var V = this.target || this.srcElement;
while (V && V.nodeType === 3) {
V = V.parentNode
}
return V
},
getRelated: function() {
var W = null;
switch (this.type) {
case "mouseover":
case "pointerover":
case "MSPointerOver":
W = this.relatedTarget || this.fromElement;
break;
case "mouseout":
case "pointerout":
case "MSPointerOut":
W = this.relatedTarget || this.toElement;
break;
default:
return W
}
try {
while (W && W.nodeType === 3) {
W = W.parentNode
}
} catch (V) {
W = null
}
return W
},
getButton: function() {
if (!this.which && this.button !== undefined) {
return (this.button & 1 ? 1 : (this.button & 2 ? 3 : (this.button & 4 ? 2 : 0)))
}
return this.which
},
isTouchEvent: function() {
return (this.pointerType && (this.pointerType === "touch" || this.pointerType === this.MSPOINTER_TYPE_TOUCH)) || (/touch/i).test(this.type)
},
isPrimaryTouch: function() {
if (this.pointerType) {
return (this.pointerType === "touch" || this.MSPOINTER_TYPE_TOUCH === this.pointerType) && this.isPrimary
} else {
if (this instanceof window.TouchEvent) {
return this.changedTouches.length === 1 && (this.targetTouches.length ? this.targetTouches[0].identifier === this.changedTouches[0].identifier : true)
}
}
return false
},
getPrimaryTouch: function() {
if (this.pointerType) {
return this.isPrimary && (this.pointerType === "touch" || this.MSPOINTER_TYPE_TOUCH === this.pointerType) ? this : null
} else {
if (this instanceof window.TouchEvent) {
return this.changedTouches[0]
}
}
return null
},
getPrimaryTouchId: function() {
if (this.pointerType) {
return this.isPrimary && (this.pointerType === "touch" || this.MSPOINTER_TYPE_TOUCH === this.pointerType) ? this.pointerId : null
} else {
if (this instanceof window.TouchEvent) {
return this.changedTouches[0].identifier
}
}
return null
}
};
L._event_add_ = "addEventListener";
L._event_del_ = "removeEventListener";
L._event_prefix_ = "";
if (!document.addEventListener) {
L._event_add_ = "attachEvent";
L._event_del_ = "detachEvent";
L._event_prefix_ = "on"
}
L.Event.Custom = {
type: "",
x: null,
y: null,
timeStamp: null,
button: null,
target: null,
relatedTarget: null,
$J_TYPE: "event.custom",
isQueueStopped: L.$false,
events: L.$([]),
pushToEvents: function(V) {
var W = V;
this.events.push(W)
},
stop: function() {
return this.stopDistribution().stopDefaults()
},
stopDistribution: function() {
this.events.jEach(function(W) {
try {
W.stopDistribution()
} catch (V) {}
});
return this
},
stopDefaults: function() {
this.events.jEach(function(W) {
try {
W.stopDefaults()
} catch (V) {}
});
return this
},
stopQueue: function() {
this.isQueueStopped = L.$true;
return this
},
getClientXY: function() {
return {
x: this.clientX,
y: this.clientY
}
},
jGetPageXY: function() {
return {
x: this.x,
y: this.y
}
},
getTarget: function() {
return this.target
},
getRelated: function() {
return this.relatedTarget
},
getButton: function() {
return this.button
},
getOriginalTarget: function() {
return this.events.length > 0 ? this.events[0].getTarget() : undefined
},
isTouchEvent: function() {
return (this.pointerType && (this.pointerType === "touch" || this.pointerType === this.MSPOINTER_TYPE_TOUCH)) || (/touch/i).test(this.type)
},
isPrimaryTouch: function() {
if (this.pointerType) {
return (this.pointerType === "touch" || this.MSPOINTER_TYPE_TOUCH === this.pointerType) && this.isPrimary
} else {
if (this instanceof window.TouchEvent) {
return this.changedTouches.length === 1 && (this.targetTouches.length ? this.targetTouches[0].identifier === this.changedTouches[0].identifier : true)
}
}
return false
},
getPrimaryTouch: function() {
if (this.pointerType) {
return this.isPrimary && (this.pointerType === "touch" || this.MSPOINTER_TYPE_TOUCH === this.pointerType) ? this : null
} else {
if (this instanceof window.TouchEvent) {
return this.changedTouches[0]
}
}
return null
},
getPrimaryTouchId: function() {
if (this.pointerType) {
return this.isPrimary && (this.pointerType === "touch" || this.MSPOINTER_TYPE_TOUCH === this.pointerType) ? this.pointerId : null
} else {
if (this instanceof window.TouchEvent) {
return this.changedTouches[0].identifier
}
}
return null
}
};
L.extend([L.Element, L.Doc], {
jAddEvent: function(X, Z, aa, ad) {
var ac, V, Y, ab, W;
if (L.jTypeOf(X) === "string") {
W = X.split(" ");
if (W.length > 1) {
X = W
}
}
if (L.jTypeOf(X) === "array") {
L.$(X).jEach(this.jAddEvent.jBindAsEvent(this, Z, aa, ad));
return this
}
X = S[X] || X;
if (!X || !Z || L.jTypeOf(X) !== "string" || L.jTypeOf(Z) !== "function") {
return this
}
if (X === "domready" && L.browser.ready) {
Z.call(this);
return this
}
aa = parseInt(aa || 50, 10);
if (!Z.$J_EUID) {
Z.$J_EUID = Math.floor(Math.random() * L.now())
}
ac = L.Doc.jFetch.call(this, "_EVENTS_", {});
V = ac[X];
if (!V) {
ac[X] = V = L.$([]);
Y = this;
if (L.Event.Custom[X]) {
L.Event.Custom[X].handler.add.call(this, ad)
} else {
V.handle = function(ae) {
ae = L.extend(ae || window.e, {
$J_TYPE: "event"
});
L.Doc.jCallEvent.call(Y, X, L.$(ae))
};
this[L._event_add_](L._event_prefix_ + X, V.handle, false)
}
}
ab = {
type: X,
fn: Z,
priority: aa,
euid: Z.$J_EUID
};
V.push(ab);
V.sort(function(af, ae) {
return af.priority - ae.priority
});
return this
},
jRemoveEvent: function(ab) {
var Z = L.Doc.jFetch.call(this, "_EVENTS_", {});
var X;
var V;
var W;
var ac;
var aa;
var Y;
aa = arguments.length > 1 ? arguments[1] : -100;
if (L.jTypeOf(ab) === "string") {
Y = ab.split(" ");
if (Y.length > 1) {
ab = Y
}
}
if (L.jTypeOf(ab) === "array") {
L.$(ab).jEach(this.jRemoveEvent.jBindAsEvent(this, aa));
return this
}
ab = S[ab] || ab;
if (!ab || L.jTypeOf(ab) !== "string" || !Z || !Z[ab]) {
return this
}
X = Z[ab] || [];
for (W = 0; W < X.length; W++) {
V = X[W];
if (aa === -100 || !!aa && aa.$J_EUID === V.euid) {
ac = X.splice(W--, 1)
}
}
if (X.length === 0) {
if (L.Event.Custom[ab]) {
L.Event.Custom[ab].handler.jRemove.call(this)
} else {
this[L._event_del_](L._event_prefix_ + ab, X.handle, false)
}
delete Z[ab]
}
return this
},
jCallEvent: function(Y, aa) {
var X = L.Doc.jFetch.call(this, "_EVENTS_", {});
var W;
var V;
Y = S[Y] || Y;
if (!Y || L.jTypeOf(Y) !== "string" || !X || !X[Y]) {
return this
}
try {
aa = L.extend(aa || {}, {
type: Y
})
} catch (Z) {}
if (aa.timeStamp === undefined) {
aa.timeStamp = L.now()
}
W = X[Y] || [];
for (V = 0; V < W.length && !(aa.isQueueStopped && aa.isQueueStopped()); V++) {
W[V].fn.call(this, aa)
}
},
jRaiseEvent: function(W, V) {
var Z = (W !== "domready");
var Y = this;
var X;
W = S[W] || W;
if (!Z) {
L.Doc.jCallEvent.call(this, W);
return this
}
if (Y === document && document.createEvent && !Y.dispatchEvent) {
Y = document.documentElement
}
if (document.createEvent) {
X = document.createEvent(W);
X.initEvent(V, true, true)
} else {
X = document.createEventObject();
X.eventType = W
}
if (document.createEvent) {
Y.dispatchEvent(X)
} else {
Y.fireEvent("on" + V, X)
}
return X
},
jClearEvents: function() {
var W = L.Doc.jFetch.call(this, "_EVENTS_");
if (!W) {
return this
}
for (var V in W) {
L.Doc.jRemoveEvent.call(this, V)
}
L.Doc.jDel.call(this, "_EVENTS_");
return this
}
});
(function(V) {
if (document.readyState === "complete") {
return V.browser.onready.jDelay(1)
}
if (V.browser.webkit && V.browser.version < 420) {
(function() {
if (V.$(["loaded", "complete"]).contains(document.readyState)) {
V.browser.onready()
} else {
arguments.callee.jDelay(50)
}
}())
} else {
if (V.browser.trident && V.browser.ieMode < 9 && window === top) {
(function() {
if (V.$try(function() {
V.browser.getDoc().doScroll("left");
return true
})) {
V.browser.onready()
} else {
arguments.callee.jDelay(50)
}
}())
} else {
V.Doc.jAddEvent.call(V.$(document), "DOMContentLoaded", V.browser.onready);
V.Doc.jAddEvent.call(V.$(window), "load", V.browser.onready)
}
}
}(R));
L.Class = function() {
var Z = null,
W = L.$A(arguments);
if ("class" == L.jTypeOf(W[0])) {
Z = W.shift()
}
var V = function() {
for (var ac in this) {
this[ac] = L.detach(this[ac])
}
if (this.constructor.$parent) {
this.$parent = {};
var ae = this.constructor.$parent;
for (var ad in ae) {
var ab = ae[ad];
switch (L.jTypeOf(ab)) {
case "function":
this.$parent[ad] = L.Class.wrap(this, ab);
break;
case "object":
this.$parent[ad] = L.detach(ab);
break;
case "array":
this.$parent[ad] = L.detach(ab);
break
}
}
}
var aa = (this.init) ? this.init.apply(this, arguments) : this;
delete this.caller;
return aa
};
if (!V.prototype.init) {
V.prototype.init = L.$F
}
if (Z) {
var Y = function() {};
Y.prototype = Z.prototype;
V.prototype = new Y;
V.$parent = {};
for (var X in Z.prototype) {
V.$parent[X] = Z.prototype[X]
}
} else {
V.$parent = null
}
V.constructor = L.Class;
V.prototype.constructor = V;
L.extend(V.prototype, W[0]);
L.extend(V, {
$J_TYPE: "class"
});
return V
};
R.Class.wrap = function(V, W) {
return function() {
var Y = this.caller;
var X = W.apply(V, arguments);
return X
}
};
(function(Y) {
var X = Y.$;
var V = 5,
W = 300;
Y.Event.Custom.btnclick = new Y.Class(Y.extend(Y.Event.Custom, {
type: "btnclick",
init: function(ab, aa) {
var Z = aa.jGetPageXY();
this.x = Z.x;
this.y = Z.y;
this.clientX = aa.clientX;
this.clientY = aa.clientY;
this.timeStamp = aa.timeStamp;
this.button = aa.getButton();
this.target = ab;
this.pushToEvents(aa)
}
}));
Y.Event.Custom.btnclick.handler = {
options: {
threshold: W,
button: 1
},
add: function(Z) {
this.jStore("event:btnclick:options", Y.extend(Y.detach(Y.Event.Custom.btnclick.handler.options), Z || {}));
this.jAddEvent("mousedown", Y.Event.Custom.btnclick.handler.handle, 1);
this.jAddEvent("mouseup", Y.Event.Custom.btnclick.handler.handle, 1);
this.jAddEvent("click", Y.Event.Custom.btnclick.handler.onclick, 1);
if (Y.browser.trident && Y.browser.ieMode < 9) {
this.jAddEvent("dblclick", Y.Event.Custom.btnclick.handler.handle, 1)
}
},
jRemove: function() {
this.jRemoveEvent("mousedown", Y.Event.Custom.btnclick.handler.handle);
this.jRemoveEvent("mouseup", Y.Event.Custom.btnclick.handler.handle);
this.jRemoveEvent("click", Y.Event.Custom.btnclick.handler.onclick);
if (Y.browser.trident && Y.browser.ieMode < 9) {
this.jRemoveEvent("dblclick", Y.Event.Custom.btnclick.handler.handle)
}
},
onclick: function(Z) {
Z.stopDefaults()
},
handle: function(ac) {
var ab, Z, aa;
Z = this.jFetch("event:btnclick:options");
if (ac.type != "dblclick" && ac.getButton() != Z.button) {
return
}
if (this.jFetch("event:btnclick:ignore")) {
this.jDel("event:btnclick:ignore");
return
}
if ("mousedown" == ac.type) {
ab = new Y.Event.Custom.btnclick(this, ac);
this.jStore("event:btnclick:btnclickEvent", ab)
} else {
if ("mouseup" == ac.type) {
ab = this.jFetch("event:btnclick:btnclickEvent");
if (!ab) {
return
}
aa = ac.jGetPageXY();
this.jDel("event:btnclick:btnclickEvent");
ab.pushToEvents(ac);
if (ac.timeStamp - ab.timeStamp <= Z.threshold && Math.sqrt(Math.pow(aa.x - ab.x, 2) + Math.pow(aa.y - ab.y, 2)) <= V) {
this.jCallEvent("btnclick", ab)
}
document.jCallEvent("mouseup", ac)
} else {
if (ac.type == "dblclick") {
ab = new Y.Event.Custom.btnclick(this, ac);
this.jCallEvent("btnclick", ab)
}
}
}
}
}
})(R);
(function(W) {
var V = W.$;
W.Event.Custom.mousedrag = new W.Class(W.extend(W.Event.Custom, {
type: "mousedrag",
state: "dragstart",
dragged: false,
init: function(aa, Z, Y) {
var X = Z.jGetPageXY();
this.x = X.x;
this.y = X.y;
this.clientX = Z.clientX;
this.clientY = Z.clientY;
this.timeStamp = Z.timeStamp;
this.button = Z.getButton();
this.target = aa;
this.pushToEvents(Z);
this.state = Y
}
}));
W.Event.Custom.mousedrag.handler = {
add: function() {
var Y = W.Event.Custom.mousedrag.handler.handleMouseMove.jBindAsEvent(this),
X = W.Event.Custom.mousedrag.handler.handleMouseUp.jBindAsEvent(this);
this.jAddEvent("mousedown", W.Event.Custom.mousedrag.handler.handleMouseDown, 1);
this.jAddEvent("mouseup", W.Event.Custom.mousedrag.handler.handleMouseUp, 1);
document.jAddEvent("mousemove", Y, 1);
document.jAddEvent("mouseup", X, 1);
this.jStore("event:mousedrag:listeners:document:move", Y);
this.jStore("event:mousedrag:listeners:document:end", X)
},
jRemove: function() {
this.jRemoveEvent("mousedown", W.Event.Custom.mousedrag.handler.handleMouseDown);
this.jRemoveEvent("mouseup", W.Event.Custom.mousedrag.handler.handleMouseUp);
V(document).jRemoveEvent("mousemove", this.jFetch("event:mousedrag:listeners:document:move") || W.$F);
V(document).jRemoveEvent("mouseup", this.jFetch("event:mousedrag:listeners:document:end") || W.$F);
this.jDel("event:mousedrag:listeners:document:move");
this.jDel("event:mousedrag:listeners:document:end")
},
handleMouseDown: function(Y) {
var X;
if (1 != Y.getButton()) {
return
}
X = new W.Event.Custom.mousedrag(this, Y, "dragstart");
this.jStore("event:mousedrag:dragstart", X)
},
handleMouseUp: function(Y) {
var X;
X = this.jFetch("event:mousedrag:dragstart");
if (!X) {
return
}
Y.stopDefaults();
X = new W.Event.Custom.mousedrag(this, Y, "dragend");
this.jDel("event:mousedrag:dragstart");
this.jCallEvent("mousedrag", X)
},
handleMouseMove: function(Y) {
var X;
X = this.jFetch("event:mousedrag:dragstart");
if (!X) {
return
}
Y.stopDefaults();
if (!X.dragged) {
X.dragged = true;
this.jCallEvent("mousedrag", X)
}
X = new W.Event.Custom.mousedrag(this, Y, "dragmove");
this.jCallEvent("mousedrag", X)
}
}
})(R);
(function(W) {
var V = W.$;
W.Event.Custom.dblbtnclick = new W.Class(W.extend(W.Event.Custom, {
type: "dblbtnclick",
timedout: false,
tm: null,
init: function(Z, Y) {
var X = Y.jGetPageXY();
this.x = X.x;
this.y = X.y;
this.clientX = Y.clientX;
this.clientY = Y.clientY;
this.timeStamp = Y.timeStamp;
this.button = Y.getButton();
this.target = Z;
this.pushToEvents(Y)
}
}));
W.Event.Custom.dblbtnclick.handler = {
options: {
threshold: 200
},
add: function(X) {
this.jStore("event:dblbtnclick:options", W.extend(W.detach(W.Event.Custom.dblbtnclick.handler.options), X || {}));
this.jAddEvent("btnclick", W.Event.Custom.dblbtnclick.handler.handle, 1)
},
jRemove: function() {
this.jRemoveEvent("btnclick", W.Event.Custom.dblbtnclick.handler.handle)
},
handle: function(Z) {
var Y, X;
Y = this.jFetch("event:dblbtnclick:event");
X = this.jFetch("event:dblbtnclick:options");
if (!Y) {
Y = new W.Event.Custom.dblbtnclick(this, Z);
Y.tm = setTimeout(function() {
Y.timedout = true;
Z.isQueueStopped = W.$false;
this.jCallEvent("btnclick", Z);
this.jDel("event:dblbtnclick:event")
}.jBind(this), X.threshold + 10);
this.jStore("event:dblbtnclick:event", Y);
Z.stopQueue()
} else {
clearTimeout(Y.tm);
this.jDel("event:dblbtnclick:event");
if (!Y.timedout) {
Y.pushToEvents(Z);
Z.stopQueue().stop();
this.jCallEvent("dblbtnclick", Y)
} else {}
}
}
}
})(R);
(function(Y) {
var X = Y.$;
var V = 10;
var W = 200;
Y.Event.Custom.tap = new Y.Class(Y.extend(Y.Event.Custom, {
type: "tap",
id: null,
init: function(aa, Z) {
var ab = Z.getPrimaryTouch();
this.id = ab.pointerId || ab.identifier;
this.x = ab.pageX;
this.y = ab.pageY;
this.pageX = ab.pageX;
this.pageY = ab.pageY;
this.clientX = ab.clientX;
this.clientY = ab.clientY;
this.timeStamp = Z.timeStamp;
this.button = 0;
this.target = aa;
this.pushToEvents(Z)
}
}));
Y.Event.Custom.tap.handler = {
add: function(Z) {
this.jAddEvent(["touchstart", "pointerdown"], Y.Event.Custom.tap.handler.onTouchStart, 1);
this.jAddEvent(["touchend", "pointerup"], Y.Event.Custom.tap.handler.onTouchEnd, 1);
this.jAddEvent("click", Y.Event.Custom.tap.handler.onClick, 1)
},
jRemove: function() {
this.jRemoveEvent(["touchstart", "pointerdown"], Y.Event.Custom.tap.handler.onTouchStart);
this.jRemoveEvent(["touchend", "pointerup"], Y.Event.Custom.tap.handler.onTouchEnd);
this.jRemoveEvent("click", Y.Event.Custom.tap.handler.onClick)
},
onClick: function(Z) {
Z.stopDefaults()
},
onTouchStart: function(Z) {
if (!Z.isPrimaryTouch()) {
this.jDel("event:tap:event");
return
}
this.jStore("event:tap:event", new Y.Event.Custom.tap(this, Z));
this.jStore("event:btnclick:ignore", true)
},
onTouchEnd: function(ac) {
var aa = Y.now();
var ab = this.jFetch("event:tap:event");
var Z = this.jFetch("event:tap:options");
if (!ab || !ac.isPrimaryTouch()) {
return
}
this.jDel("event:tap:event");
if (ab.id === ac.getPrimaryTouchId() && ac.timeStamp - ab.timeStamp <= W && Math.sqrt(Math.pow(ac.getPrimaryTouch().pageX - ab.x, 2) + Math.pow(ac.getPrimaryTouch().pageY - ab.y, 2)) <= V) {
this.jDel("event:btnclick:btnclickEvent");
ac.stop();
ab.pushToEvents(ac);
this.jCallEvent("tap", ab)
}
}
}
}(R));
L.Event.Custom.dbltap = new L.Class(L.extend(L.Event.Custom, {
type: "dbltap",
timedout: false,
tm: null,
init: function(W, V) {
this.x = V.x;
this.y = V.y;
this.clientX = V.clientX;
this.clientY = V.clientY;
this.timeStamp = V.timeStamp;
this.button = 0;
this.target = W;
this.pushToEvents(V)
}
}));
L.Event.Custom.dbltap.handler = {
options: {
threshold: 300
},
add: function(V) {
this.jStore("event:dbltap:options", L.extend(L.detach(L.Event.Custom.dbltap.handler.options), V || {}));
this.jAddEvent("tap", L.Event.Custom.dbltap.handler.handle, 1)
},
jRemove: function() {
this.jRemoveEvent("tap", L.Event.Custom.dbltap.handler.handle)
},
handle: function(X) {
var W, V;
W = this.jFetch("event:dbltap:event");
V = this.jFetch("event:dbltap:options");
if (!W) {
W = new L.Event.Custom.dbltap(this, X);
W.tm = setTimeout(function() {
W.timedout = true;
X.isQueueStopped = L.$false;
this.jCallEvent("tap", X)
}.jBind(this), V.threshold + 10);
this.jStore("event:dbltap:event", W);
X.stopQueue()
} else {
clearTimeout(W.tm);
this.jDel("event:dbltap:event");
if (!W.timedout) {
W.pushToEvents(X);
X.stopQueue().stop();
this.jCallEvent("dbltap", W)
} else {}
}
}
};
(function(X) {
var W = X.$;
var V = 10;
X.Event.Custom.touchdrag = new X.Class(X.extend(X.Event.Custom, {
type: "touchdrag",
state: "dragstart",
id: null,
dragged: false,
init: function(aa, Z, Y) {
var ab = Z.getPrimaryTouch();
this.id = ab.pointerId || ab.identifier;
this.clientX = ab.clientX;
this.clientY = ab.clientY;
this.pageX = ab.pageX;
this.pageY = ab.pageY;
this.x = ab.pageX;
this.y = ab.pageY;
this.timeStamp = Z.timeStamp;
this.button = 0;
this.target = aa;
this.pushToEvents(Z);
this.state = Y
}
}));
X.Event.Custom.touchdrag.handler = {
add: function() {
var Z = X.Event.Custom.touchdrag.handler.onTouchMove.jBind(this);
var Y = X.Event.Custom.touchdrag.handler.onTouchEnd.jBind(this);
this.jAddEvent(["touchstart", "pointerdown"], X.Event.Custom.touchdrag.handler.onTouchStart, 1);
this.jAddEvent(["touchend", "pointerup"], X.Event.Custom.touchdrag.handler.onTouchEnd, 1);
this.jAddEvent(["touchmove", "pointermove"], X.Event.Custom.touchdrag.handler.onTouchMove, 1);
this.jStore("event:touchdrag:listeners:document:move", Z);
this.jStore("event:touchdrag:listeners:document:end", Y);
W(document).jAddEvent("pointermove", Z, 1);
W(document).jAddEvent("pointerup", Y, 1)
},
jRemove: function() {
this.jRemoveEvent(["touchstart", "pointerdown"], X.Event.Custom.touchdrag.handler.onTouchStart);
this.jRemoveEvent(["touchend", "pointerup"], X.Event.Custom.touchdrag.handler.onTouchEnd);
this.jRemoveEvent(["touchmove", "pointermove"], X.Event.Custom.touchdrag.handler.onTouchMove);
W(document).jRemoveEvent("pointermove", this.jFetch("event:touchdrag:listeners:document:move") || X.$F, 1);
W(document).jRemoveEvent("pointerup", this.jFetch("event:touchdrag:listeners:document:end") || X.$F, 1);
this.jDel("event:touchdrag:listeners:document:move");
this.jDel("event:touchdrag:listeners:document:end")
},
onTouchStart: function(Z) {
var Y;
if (!Z.isPrimaryTouch()) {
return
}
Y = new X.Event.Custom.touchdrag(this, Z, "dragstart");
this.jStore("event:touchdrag:dragstart", Y)
},
onTouchEnd: function(Z) {
var Y;
Y = this.jFetch("event:touchdrag:dragstart");
if (!Y || !Y.dragged || Y.id !== Z.getPrimaryTouchId()) {
return
}
Y = new X.Event.Custom.touchdrag(this, Z, "dragend");
this.jDel("event:touchdrag:dragstart");
this.jCallEvent("touchdrag", Y)
},
onTouchMove: function(Z) {
var Y;
Y = this.jFetch("event:touchdrag:dragstart");
if (!Y || !Z.isPrimaryTouch()) {
return
}
if (Y.id !== Z.getPrimaryTouchId()) {
this.jDel("event:touchdrag:dragstart");
return
}
if (!Y.dragged && Math.sqrt(Math.pow(Z.getPrimaryTouch().pageX - Y.x, 2) + Math.pow(Z.getPrimaryTouch().pageY - Y.y, 2)) > V) {
Y.dragged = true;
this.jCallEvent("touchdrag", Y)
}
if (!Y.dragged) {
return
}
Y = new X.Event.Custom.touchdrag(this, Z, "dragmove");
this.jCallEvent("touchdrag", Y)
}
}
}(R));
L.Event.Custom.touchpinch = new L.Class(L.extend(L.Event.Custom, {
type: "touchpinch",
scale: 1,
previousScale: 1,
curScale: 1,
state: "pinchstart",
init: function(W, V) {
this.timeStamp = V.timeStamp;
this.button = 0;
this.target = W;
this.x = V.touches[0].clientX + (V.touches[1].clientX - V.touches[0].clientX) / 2;
this.y = V.touches[0].clientY + (V.touches[1].clientY - V.touches[0].clientY) / 2;
this._initialDistance = Math.sqrt(Math.pow(V.touches[0].clientX - V.touches[1].clientX, 2) + Math.pow(V.touches[0].clientY - V.touches[1].clientY, 2));
this.pushToEvents(V)
},
update: function(V) {
var W;
this.state = "pinchupdate";
if (V.changedTouches[0].identifier != this.events[0].touches[0].identifier || V.changedTouches[1].identifier != this.events[0].touches[1].identifier) {
return
}
W = Math.sqrt(Math.pow(V.changedTouches[0].clientX - V.changedTouches[1].clientX, 2) + Math.pow(V.changedTouches[0].clientY - V.changedTouches[1].clientY, 2));
this.previousScale = this.scale;
this.scale = W / this._initialDistance;
this.curScale = this.scale / this.previousScale;
this.x = V.changedTouches[0].clientX + (V.changedTouches[1].clientX - V.changedTouches[0].clientX) / 2;
this.y = V.changedTouches[0].clientY + (V.changedTouches[1].clientY - V.changedTouches[0].clientY) / 2;
this.pushToEvents(V)
}
}));
L.Event.Custom.touchpinch.handler = {
add: function() {
this.jAddEvent("touchstart", L.Event.Custom.touchpinch.handler.handleTouchStart, 1);
this.jAddEvent("touchend", L.Event.Custom.touchpinch.handler.handleTouchEnd, 1);
this.jAddEvent("touchmove", L.Event.Custom.touchpinch.handler.handleTouchMove, 1)
},
jRemove: function() {
this.jRemoveEvent("touchstart", L.Event.Custom.touchpinch.handler.handleTouchStart);
this.jRemoveEvent("touchend", L.Event.Custom.touchpinch.handler.handleTouchEnd);
this.jRemoveEvent("touchmove", L.Event.Custom.touchpinch.handler.handleTouchMove)
},
handleTouchStart: function(W) {
var V;
if (W.touches.length != 2) {
return
}
W.stopDefaults();
V = new L.Event.Custom.touchpinch(this, W);
this.jStore("event:touchpinch:event", V)
},
handleTouchEnd: function(W) {
var V;
V = this.jFetch("event:touchpinch:event");
if (!V) {
return
}
W.stopDefaults();
this.jDel("event:touchpinch:event")
},
handleTouchMove: function(W) {
var V;
V = this.jFetch("event:touchpinch:event");
if (!V) {
return
}
W.stopDefaults();
V.update(W);
this.jCallEvent("touchpinch", V)
}
};
(function(aa) {
var Y = aa.$;
aa.Event.Custom.mousescroll = new aa.Class(aa.extend(aa.Event.Custom, {
type: "mousescroll",
init: function(ag, af, ai, ac, ab, ah, ad) {
var ae = af.jGetPageXY();
this.x = ae.x;
this.y = ae.y;
this.timeStamp = af.timeStamp;
this.target = ag;
this.delta = ai || 0;
this.deltaX = ac || 0;
this.deltaY = ab || 0;
this.deltaZ = ah || 0;
this.deltaFactor = ad || 0;
this.deltaMode = af.deltaMode || 0;
this.isMouse = false;
this.pushToEvents(af)
}
}));
var Z, W;
function V() {
Z = null
}
function X(ab, ac) {
return (ab > 50) || (1 === ac && !("win" == aa.browser.platform && ab < 1)) || (0 === ab % 12) || (0 == ab % 4.000244140625)
}
aa.Event.Custom.mousescroll.handler = {
eventType: "onwheel" in document || aa.browser.ieMode > 8 ? "wheel" : "mousewheel",
add: function() {
this.jAddEvent(aa.Event.Custom.mousescroll.handler.eventType, aa.Event.Custom.mousescroll.handler.handle, 1)
},
jRemove: function() {
this.jRemoveEvent(aa.Event.Custom.mousescroll.handler.eventType, aa.Event.Custom.mousescroll.handler.handle, 1)
},
handle: function(ag) {
var ah = 0,
ae = 0,
ac = 0,
ab = 0,
af, ad;
if (ag.detail) {
ac = ag.detail * -1
}
if (ag.wheelDelta !== undefined) {
ac = ag.wheelDelta
}
if (ag.wheelDeltaY !== undefined) {
ac = ag.wheelDeltaY
}
if (ag.wheelDeltaX !== undefined) {
ae = ag.wheelDeltaX * -1
}
if (ag.deltaY) {
ac = -1 * ag.deltaY
}
if (ag.deltaX) {
ae = ag.deltaX
}
if (0 === ac && 0 === ae) {
return
}
ah = 0 === ac ? ae : ac;
ab = Math.max(Math.abs(ac), Math.abs(ae));
if (!Z || ab < Z) {
Z = ab
}
af = ah > 0 ? "floor" : "ceil";
ah = Math[af](ah / Z);
ae = Math[af](ae / Z);
ac = Math[af](ac / Z);
if (W) {
clearTimeout(W)
}
W = setTimeout(V, 200);
ad = new aa.Event.Custom.mousescroll(this, ag, ah, ae, ac, 0, Z);
ad.isMouse = X(Z, ag.deltaMode || 0);
this.jCallEvent("mousescroll", ad)
}
}
})(R);
L.win = L.$(window);
L.doc = L.$(document);
return R
})();
(function(H) {
if (!H) {
throw "MagicJS not found"
}
var G = H.$;
var F = window.URL || window.webkitURL || null;
u.ImageLoader = new H.Class({
img: null,
ready: false,
options: {
onprogress: H.$F,
onload: H.$F,
onabort: H.$F,
onerror: H.$F,
oncomplete: H.$F,
onxhrerror: H.$F,
xhr: false,
progressiveLoad: true
},
size: null,
_timer: null,
loadedBytes: 0,
_handlers: {
onprogress: function(I) {
if (I.target && (200 === I.target.status || 304 === I.target.status) && I.lengthComputable) {
this.options.onprogress.jBind(null, (I.loaded - (this.options.progressiveLoad ? this.loadedBytes : 0)) / I.total).jDelay(1);
this.loadedBytes = I.loaded
}
},
onload: function(I) {
if (I) {
G(I).stop()
}
this._unbind();
if (this.ready) {
return
}
this.ready = true;
this._cleanup();
!this.options.xhr && this.options.onprogress.jBind(null, 1).jDelay(1);
this.options.onload.jBind(null, this).jDelay(1);
this.options.oncomplete.jBind(null, this).jDelay(1)
},
onabort: function(I) {
if (I) {
G(I).stop()
}
this._unbind();
this.ready = false;
this._cleanup();
this.options.onabort.jBind(null, this).jDelay(1);
this.options.oncomplete.jBind(null, this).jDelay(1)
},
onerror: function(I) {
if (I) {
G(I).stop()
}
this._unbind();
this.ready = false;
this._cleanup();
this.options.onerror.jBind(null, this).jDelay(1);
this.options.oncomplete.jBind(null, this).jDelay(1)
}
},
_bind: function() {
G(["load", "abort", "error"]).jEach(function(I) {
this.img.jAddEvent(I, this._handlers["on" + I].jBindAsEvent(this).jDefer(1))
}, this)
},
_unbind: function() {
if (this._timer) {
try {
clearTimeout(this._timer)
} catch (I) {}
this._timer = null
}
G(["load", "abort", "error"]).jEach(function(J) {
this.img.jRemoveEvent(J)
}, this)
},
_cleanup: function() {
this.jGetSize();
if (this.img.jFetch("new")) {
var I = this.img.parentNode;
this.img.jRemove().jDel("new").jSetCss({
position: "static",
top: "auto"
});
I.kill()
}
},
loadBlob: function(J) {
var K = new XMLHttpRequest(),
I;
G(["abort", "progress"]).jEach(function(L) {
K["on" + L] = G(function(M) {
this._handlers["on" + L].call(this, M)
}).jBind(this)
}, this);
K.onerror = G(function() {
this.options.onxhrerror.jBind(null, this).jDelay(1);
this.options.xhr = false;
this._bind();
this.img.src = J
}).jBind(this);
K.onload = G(function() {
if (200 !== K.status && 304 !== K.status) {
this._handlers.onerror.call(this);
return
}
I = K.response;
this._bind();
if (F && !H.browser.trident && !("ios" === H.browser.platform && H.browser.version < 537)) {
this.img.setAttribute("src", F.createObjectURL(I))
} else {
this.img.src = J
}
}).jBind(this);
K.open("GET", J);
K.responseType = "blob";
K.send()
},
init: function(J, I) {
this.options = H.extend(this.options, I);
this.img = G(J) || H.$new("img", {}, {
"max-width": "none",
"max-height": "none"
}).jAppendTo(H.$new("div").jAddClass("magic-temporary-img").jSetCss({
position: "absolute",
top: -10000,
width: 10,
height: 10,
overflow: "hidden"
}).jAppendTo(document.body)).jStore("new", true);
if (H.browser.features.xhr2 && this.options.xhr && "string" == H.jTypeOf(J)) {
this.loadBlob(J);
return
}
var K = function() {
if (this.isReady()) {
this._handlers.onload.call(this)
} else {
this._handlers.onerror.call(this)
}
K = null
}.jBind(this);
this._bind();
if ("string" == H.jTypeOf(J)) {
this.img.src = J
} else {
if (H.browser.trident && 5 == H.browser.version && H.browser.ieMode < 9) {
this.img.onreadystatechange = function() {
if (/loaded|complete/.test(this.img.readyState)) {
this.img.onreadystatechange = null;
K && K()
}
}.jBind(this)
}
this.img.src = J.getAttribute("src")
}
this.img && this.img.complete && K && (this._timer = K.jDelay(100))
},
destroy: function() {
this._unbind();
this._cleanup();
this.ready = false;
return this
},
isReady: function() {
var I = this.img;
return (I.naturalWidth) ? (I.naturalWidth > 0) : (I.readyState) ? ("complete" == I.readyState) : I.width > 0
},
jGetSize: function() {
return this.size || (this.size = {
width: this.img.naturalWidth || this.img.width,
height: this.img.naturalHeight || this.img.height
})
}
})
})(u);
(function(G) {
if (!G) {
throw "MagicJS not found"
}
if (G.FX) {
return
}
var F = G.$;
G.FX = new G.Class({
init: function(I, H) {
var J;
this.el = G.$(I);
this.options = G.extend(this.options, H);
this.timer = false;
this.easeFn = this.cubicBezierAtTime;
J = G.FX.Transition[this.options.transition] || this.options.transition;
if ("function" === G.jTypeOf(J)) {
this.easeFn = J
} else {
this.cubicBezier = this.parseCubicBezier(J) || this.parseCubicBezier("ease")
}
if ("string" == G.jTypeOf(this.options.cycles)) {
this.options.cycles = "infinite" === this.options.cycles ? Infinity : parseInt(this.options.cycles) || 1
}
},
options: {
fps: 60,
duration: 600,
transition: "ease",
cycles: 1,
direction: "normal",
onStart: G.$F,
onComplete: G.$F,
onBeforeRender: G.$F,
onAfterRender: G.$F,
forceAnimation: false,
roundCss: false
},
styles: null,
cubicBezier: null,
easeFn: null,
setTransition: function(H) {
this.options.transition = H;
H = G.FX.Transition[this.options.transition] || this.options.transition;
if ("function" === G.jTypeOf(H)) {
this.easeFn = H
} else {
this.easeFn = this.cubicBezierAtTime;
this.cubicBezier = this.parseCubicBezier(H) || this.parseCubicBezier("ease")
}
},
start: function(J) {
var H = /\%$/,
I;
this.styles = J || {};
this.cycle = 0;
this.state = 0;
this.curFrame = 0;
this.pStyles = {};
this.alternate = "alternate" === this.options.direction || "alternate-reverse" === this.options.direction;
this.continuous = "continuous" === this.options.direction || "continuous-reverse" === this.options.direction;
for (I in this.styles) {
H.test(this.styles[I][0]) && (this.pStyles[I] = true);
if ("reverse" === this.options.direction || "alternate-reverse" === this.options.direction || "continuous-reverse" === this.options.direction) {
this.styles[I].reverse()
}
}
this.startTime = G.now();
this.finishTime = this.startTime + this.options.duration;
this.options.onStart.call();
if (0 === this.options.duration) {
this.render(1);
this.options.onComplete.call()
} else {
this.loopBind = this.loop.jBind(this);
if (!this.options.forceAnimation && G.browser.features.requestAnimationFrame) {
this.timer = G.browser.requestAnimationFrame.call(window, this.loopBind)
} else {
this.timer = this.loopBind.interval(Math.round(1000 / this.options.fps))
}
}
return this
},
stopAnimation: function() {
if (this.timer) {
if (!this.options.forceAnimation && G.browser.features.requestAnimationFrame && G.browser.cancelAnimationFrame) {
G.browser.cancelAnimationFrame.call(window, this.timer)
} else {
clearInterval(this.timer)
}
this.timer = false
}
},
stop: function(H) {
H = G.defined(H) ? H : false;
this.stopAnimation();
if (H) {
this.render(1);
this.options.onComplete.jDelay(10)
}
return this
},
calc: function(J, I, H) {
J = parseFloat(J);
I = parseFloat(I);
return (I - J) * H + J
},
loop: function() {
var I = G.now(),
H = (I - this.startTime) / this.options.duration,
J = Math.floor(H);
if (I >= this.finishTime && J >= this.options.cycles) {
this.stopAnimation();
this.render(1);
this.options.onComplete.jDelay(10);
return this
}
if (this.alternate && this.cycle < J) {
for (var K in this.styles) {
this.styles[K].reverse()
}
}
this.cycle = J;
if (!this.options.forceAnimation && G.browser.features.requestAnimationFrame) {
this.timer = G.browser.requestAnimationFrame.call(window, this.loopBind)
}
this.render((this.continuous ? J : 0) + this.easeFn(H % 1))
},
render: function(H) {
var I = {},
K = H;
for (var J in this.styles) {
if ("opacity" === J) {
I[J] = Math.round(this.calc(this.styles[J][0], this.styles[J][1], H) * 100) / 100
} else {
I[J] = this.calc(this.styles[J][0], this.styles[J][1], H);
this.pStyles[J] && (I[J] += "%")
}
}
this.options.onBeforeRender(I, this.el);
this.set(I);
this.options.onAfterRender(I, this.el)
},
set: function(H) {
return this.el.jSetCss(H)
},
parseCubicBezier: function(H) {
var I, J = null;
if ("string" !== G.jTypeOf(H)) {
return null
}
switch (H) {
case "linear":
J = F([0, 0, 1, 1]);
break;
case "ease":
J = F([0.25, 0.1, 0.25, 1]);
break;
case "ease-in":
J = F([0.42, 0, 1, 1]);
break;
case "ease-out":
J = F([0, 0, 0.58, 1]);
break;
case "ease-in-out":
J = F([0.42, 0, 0.58, 1]);
break;
case "easeInSine":
J = F([0.47, 0, 0.745, 0.715]);
break;
case "easeOutSine":
J = F([0.39, 0.575, 0.565, 1]);
break;
case "easeInOutSine":
J = F([0.445, 0.05, 0.55, 0.95]);
break;
case "easeInQuad":
J = F([0.55, 0.085, 0.68, 0.53]);
break;
case "easeOutQuad":
J = F([0.25, 0.46, 0.45, 0.94]);
break;
case "easeInOutQuad":
J = F([0.455, 0.03, 0.515, 0.955]);
break;
case "easeInCubic":
J = F([0.55, 0.055, 0.675, 0.19]);
break;
case "easeOutCubic":
J = F([0.215, 0.61, 0.355, 1]);
break;
case "easeInOutCubic":
J = F([0.645, 0.045, 0.355, 1]);
break;
case "easeInQuart":
J = F([0.895, 0.03, 0.685, 0.22]);
break;
case "easeOutQuart":
J = F([0.165, 0.84, 0.44, 1]);
break;
case "easeInOutQuart":
J = F([0.77, 0, 0.175, 1]);
break;
case "easeInQuint":
J = F([0.755, 0.05, 0.855, 0.06]);
break;
case "easeOutQuint":
J = F([0.23, 1, 0.32, 1]);
break;
case "easeInOutQuint":
J = F([0.86, 0, 0.07, 1]);
break;
case "easeInExpo":
J = F([0.95, 0.05, 0.795, 0.035]);
break;
case "easeOutExpo":
J = F([0.19, 1, 0.22, 1]);
break;
case "easeInOutExpo":
J = F([1, 0, 0, 1]);
break;
case "easeInCirc":
J = F([0.6, 0.04, 0.98, 0.335]);
break;
case "easeOutCirc":
J = F([0.075, 0.82, 0.165, 1]);
break;
case "easeInOutCirc":
J = F([0.785, 0.135, 0.15, 0.86]);
break;
case "easeInBack":
J = F([0.6, -0.28, 0.735, 0.045]);
break;
case "easeOutBack":
J = F([0.175, 0.885, 0.32, 1.275]);
break;
case "easeInOutBack":
J = F([0.68, -0.55, 0.265, 1.55]);
break;
default:
H = H.replace(/\s/g, "");
if (H.match(/^cubic-bezier\((?:-?[0-9\.]{0,}[0-9]{1,},){3}(?:-?[0-9\.]{0,}[0-9]{1,})\)$/)) {
J = H.replace(/^cubic-bezier\s*\(|\)$/g, "").split(",");
for (I = J.length - 1; I >= 0; I--) {
J[I] = parseFloat(J[I])
}
}
}
return F(J)
},
cubicBezierAtTime: function(T) {
var H = 0,
S = 0,
P = 0,
U = 0,
R = 0,
N = 0,
O = this.options.duration;
function M(V) {
return ((H * V + S) * V + P) * V
}
function L(V) {
return ((U * V + R) * V + N) * V
}
function J(V) {
return (3 * H * V + 2 * S) * V + P
}
function Q(V) {
return 1 / (200 * V)
}
function I(V, W) {
return L(K(V, W))
}
function K(ac, ad) {
var ab, aa, Z, W, V, Y;
function X(ae) {
if (ae >= 0) {
return ae
} else {
return 0 - ae
}
}
for (Z = ac, Y = 0; Y < 8; Y++) {
W = M(Z) - ac;
if (X(W) < ad) {
return Z
}
V = J(Z);
if (X(V) < 0.000001) {
break
}
Z = Z - W / V
}
ab = 0;
aa = 1;
Z = ac;
if (Z < ab) {
return ab
}
if (Z > aa) {
return aa
}
while (ab < aa) {
W = M(Z);
if (X(W - ac) < ad) {
return Z
}
if (ac > W) {
ab = Z
} else {
aa = Z
}
Z = (aa - ab) * 0.5 + ab
}
return Z
}
P = 3 * this.cubicBezier[0];
S = 3 * (this.cubicBezier[2] - this.cubicBezier[0]) - P;
H = 1 - P - S;
N = 3 * this.cubicBezier[1];
R = 3 * (this.cubicBezier[3] - this.cubicBezier[1]) - N;
U = 1 - N - R;
return I(T, Q(O))
}
});
G.FX.Transition = {
linear: "linear",
sineIn: "easeInSine",
sineOut: "easeOutSine",
expoIn: "easeInExpo",
expoOut: "easeOutExpo",
quadIn: "easeInQuad",
quadOut: "easeOutQuad",
cubicIn: "easeInCubic",
cubicOut: "easeOutCubic",
backIn: "easeInBack",
backOut: "easeOutBack",
elasticIn: function(I, H) {
H = H || [];
return Math.pow(2, 10 * --I) * Math.cos(20 * I * Math.PI * (H[0] || 1) / 3)
},
elasticOut: function(I, H) {
return 1 - G.FX.Transition.elasticIn(1 - I, H)
},
bounceIn: function(J) {
for (var I = 0, H = 1; 1; I += H, H /= 2) {
if (J >= (7 - 4 * I) / 11) {
return H * H - Math.pow((11 - 6 * I - 11 * J) / 4, 2)
}
}
},
bounceOut: function(H) {
return 1 - G.FX.Transition.bounceIn(1 - H)
},
none: function(H) {
return 0
}
}
})(u);
(function(G) {
if (!G) {
throw "MagicJS not found"
}
if (G.PFX) {
return
}
var F = G.$;
G.PFX = new G.Class(G.FX, {
init: function(H, I) {
this.el_arr = H;
this.options = G.extend(this.options, I);
this.timer = false;
this.$parent.init()
},
start: function(L) {
var H = /\%$/,
K, J, I = L.length;
this.styles_arr = L;
this.pStyles_arr = new Array(I);
for (J = 0; J < I; J++) {
this.pStyles_arr[J] = {};
for (K in L[J]) {
H.test(L[J][K][0]) && (this.pStyles_arr[J][K] = true);
if ("reverse" === this.options.direction || "alternate-reverse" === this.options.direction || "continuous-reverse" === this.options.direction) {
this.styles_arr[J][K].reverse()
}
}
}
this.$parent.start({});
return this
},
render: function(H) {
for (var I = 0; I < this.el_arr.length; I++) {
this.el = G.$(this.el_arr[I]);
this.styles = this.styles_arr[I];
this.pStyles = this.pStyles_arr[I];
this.$parent.render(H)
}
}
})
})(u);
(function(G) {
if (!G) {
throw "MagicJS not found";
return
}
if (G.Tooltip) {
return
}
var F = G.$;
G.Tooltip = function(I, J) {
var H = this.tooltip = G.$new("div", null, {
position: "absolute",
"z-index": 999
}).jAddClass("MagicToolboxTooltip");
G.$(I).jAddEvent("mouseover", function() {
H.jAppendTo(document.body)
});
G.$(I).jAddEvent("mouseout", function() {
H.jRemove()
});
G.$(I).jAddEvent("mousemove", function(O) {
var Q = 20,
N = G.$(O).jGetPageXY(),
M = H.jGetSize(),
L = G.$(window).jGetSize(),
P = G.$(window).jGetScroll();
function K(T, R, S) {
return (S < (T - R) / 2) ? S : ((S > (T + R) / 2) ? (S - R) : (T - R) / 2)
}
H.jSetCss({
left: P.x + K(L.width, M.width + 2 * Q, N.x - P.x) + Q,
top: P.y + K(L.height, M.height + 2 * Q, N.y - P.y) + Q
})
});
this.text(J)
};
G.Tooltip.prototype.text = function(H) {
this.tooltip.firstChild && this.tooltip.removeChild(this.tooltip.firstChild);
this.tooltip.append(document.createTextNode(H))
}
})(u);
(function(G) {
if (!G) {
throw "MagicJS not found";
return
}
if (G.MessageBox) {
return
}
var F = G.$;
G.Message = function(K, J, I, H) {
this.hideTimer = null;
this.messageBox = G.$new("span", null, {
position: "absolute",
"z-index": 999,
visibility: "hidden",
opacity: 0.8
}).jAddClass(H || "").jAppendTo(I || document.body);
this.setMessage(K);
this.show(J)
};
G.Message.prototype.show = function(H) {
this.messageBox.show();
this.hideTimer = this.hide.jBind(this).jDelay(G.ifndef(H, 5000))
};
G.Message.prototype.hide = function(H) {
clearTimeout(this.hideTimer);
this.hideTimer = null;
if (this.messageBox && !this.hideFX) {
this.hideFX = new u.FX(this.messageBox, {
duration: G.ifndef(H, 500),
onComplete: function() {
this.messageBox.kill();
delete this.messageBox;
this.hideFX = null
}.jBind(this)
}).start({
opacity: [this.messageBox.jGetCss("opacity"), 0]
})
}
};
G.Message.prototype.setMessage = function(H) {
this.messageBox.firstChild && this.tooltip.removeChild(this.messageBox.firstChild);
this.messageBox.append(document.createTextNode(H))
}
})(u);
(function(G) {
if (!G) {
throw "MagicJS not found"
}
if (G.Options) {
return
}
var J = G.$,
F = null,
N = {
"boolean": 1,
array: 2,
number: 3,
"function": 4,
string: 100
},
H = {
"boolean": function(Q, P, O) {
if ("boolean" != G.jTypeOf(P)) {
if (O || "string" != G.jTypeOf(P)) {
return false
} else {
if (!/^(true|false)$/.test(P)) {
return false
} else {
P = P.jToBool()
}
}
}
if (Q.hasOwnProperty("enum") && !J(Q["enum"]).contains(P)) {
return false
}
F = P;
return true
},
string: function(Q, P, O) {
if ("string" !== G.jTypeOf(P)) {
return false
} else {
if (Q.hasOwnProperty("enum") && !J(Q["enum"]).contains(P)) {
return false
} else {
F = "" + P;
return true
}
}
},
number: function(R, Q, P) {
var O = false,
T = /%$/,
S = (G.jTypeOf(Q) == "string" && T.test(Q));
if (P && !"number" == typeof Q) {
return false
}
Q = parseFloat(Q);
if (isNaN(Q)) {
return false
}
if (isNaN(R.minimum)) {
R.minimum = Number.NEGATIVE_INFINITY
}
if (isNaN(R.maximum)) {
R.maximum = Number.POSITIVE_INFINITY
}
if (R.hasOwnProperty("enum") && !J(R["enum"]).contains(Q)) {
return false
}
if (R.minimum > Q || Q > R.maximum) {
return false
}
F = S ? (Q + "%") : Q;
return true
},
array: function(R, P, O) {
if ("string" === G.jTypeOf(P)) {
try {
P = window.JSON.parse(P)
} catch (Q) {
return false
}
}
if (G.jTypeOf(P) === "array") {
F = P;
return true
} else {
return false
}
},
"function": function(Q, P, O) {
if (G.jTypeOf(P) === "function") {
F = P;
return true
} else {
return false
}
}
},
I = function(T, S, P) {
var R;
R = T.hasOwnProperty("oneOf") ? T.oneOf : [T];
if ("array" != G.jTypeOf(R)) {
return false
}
for (var Q = 0, O = R.length - 1; Q <= O; Q++) {
if (H[R[Q].type](R[Q], S, P)) {
return true
}
}
return false
},
L = function(T) {
var R, Q, S, O, P;
if (T.hasOwnProperty("oneOf")) {
O = T.oneOf.length;
for (R = 0; R < O; R++) {
for (Q = R + 1; Q < O; Q++) {
if (N[T.oneOf[R]["type"]] > N[T.oneOf[Q].type]) {
P = T.oneOf[R];
T.oneOf[R] = T.oneOf[Q];
T.oneOf[Q] = P
}
}
}
}
return T
},
M = function(R) {
var Q;
Q = R.hasOwnProperty("oneOf") ? R.oneOf : [R];
if ("array" != G.jTypeOf(Q)) {
return false
}
for (var P = Q.length - 1; P >= 0; P--) {
if (!Q[P].type || !N.hasOwnProperty(Q[P].type)) {
return false
}
if (G.defined(Q[P]["enum"])) {
if ("array" !== G.jTypeOf(Q[P]["enum"])) {
return false
}
for (var O = Q[P]["enum"].length - 1; O >= 0; O--) {
if (!H[Q[P].type]({
type: Q[P].type
}, Q[P]["enum"][O], true)) {
return false
}
}
}
}
if (R.hasOwnProperty("default") && !I(R, R["default"], true)) {
return false
}
return true
},
K = function(O) {
this.schema = {};
this.options = {};
this.parseSchema(O)
};
G.extend(K.prototype, {
parseSchema: function(Q) {
var P, O, R;
for (P in Q) {
if (!Q.hasOwnProperty(P)) {
continue
}
O = (P + "").jTrim().jCamelize();
if (!this.schema.hasOwnProperty(O)) {
this.schema[O] = L(Q[P]);
if (!M(this.schema[O])) {
throw "Incorrect definition of the '" + P + "' parameter in " + Q
}
this.options[O] = undefined
}
}
},
set: function(P, O) {
P = (P + "").jTrim().jCamelize();
if (G.jTypeOf(O) == "string") {
O = O.jTrim()
}
if (this.schema.hasOwnProperty(P)) {
F = O;
if (I(this.schema[P], O)) {
this.options[P] = F
}
F = null
}
},
get: function(O) {
O = (O + "").jTrim().jCamelize();
if (this.schema.hasOwnProperty(O)) {
return G.defined(this.options[O]) ? this.options[O] : this.schema[O]["default"]
}
},
fromJSON: function(P) {
for (var O in P) {
this.set(O, P[O])
}
},
getJSON: function() {
var P = G.extend({}, this.options);
for (var O in P) {
if (undefined === P[O] && undefined !== this.schema[O]["default"]) {
P[O] = this.schema[O]["default"]
}
}
return P
},
fromString: function(O) {
J(O.split(";")).jEach(J(function(P) {
P = P.split(":");
this.set(P.shift().jTrim(), P.join(":"))
}).jBind(this))
},
exists: function(O) {
O = (O + "").jTrim().jCamelize();
return this.schema.hasOwnProperty(O)
},
isset: function(O) {
O = (O + "").jTrim().jCamelize();
return this.exists(O) && G.defined(this.options[O])
},
jRemove: function(O) {
O = (O + "").jTrim().jCamelize();
if (this.exists(O)) {
delete this.options[O];
delete this.schema[O]
}
}
});
G.Options = K
}(u));
v.$AA = function(F) {
var H = [],
G;
for (G in F) {
if (!F.hasOwnProperty(G) || (G + "").substring(0, 2) == "$J") {
continue
}
H.push(F[G])
}
return v.$A(H)
};
v.nativeEvents = {
click: 2,
dblclick: 2,
mouseup: 2,
mousedown: 2,
contextmenu: 2,
mousewheel: 2,
DOMMouseScroll: 2,
mouseover: 2,
mouseout: 2,
mousemove: 2,
selectstart: 2,
selectend: 2,
keydown: 2,
keypress: 2,
keyup: 2,
focus: 2,
blur: 2,
change: 2,
reset: 2,
select: 2,
submit: 2,
load: 1,
unload: 1,
beforeunload: 2,
resize: 1,
move: 1,
DOMContentLoaded: 1,
readystatechange: 1,
error: 1,
abort: 1
};
v.customEventsAllowed = {
document: true,
element: true,
"class": true,
object: true
};
v.customEvents = {
bindEvent: function(J, I, G) {
if (v.jTypeOf(J) == "array") {
k(J).jEach(this.bindEvent.jBindAsEvent(this, I, G));
return this
}
if (!J || !I || v.jTypeOf(J) != "string" || v.jTypeOf(I) != "function") {
return this
}
if (J == "domready" && v.browser.ready) {
I.call(this);
return this
}
G = parseInt(G || 10);
if (!I.$J_EUID) {
I.$J_EUID = Math.floor(Math.random() * v.now())
}
var H = this.jFetch("_events", {});
H[J] || (H[J] = {});
H[J][G] || (H[J][G] = {});
H[J]["orders"] || (H[J]["orders"] = {});
if (H[J][G][I.$J_EUID]) {
return this
}
if (H[J]["orders"][I.$J_EUID]) {
this.unbindEvent(J, I)
}
var F = this,
K = function(L) {
return I.call(F, k(L))
};
if (v.nativeEvents[J] && !H[J]["function"]) {
if (v.nativeEvents[J] == 2) {
K = function(L) {
L = v.extend(L || window.e, {
$J_TYPE: "event"
});
return I.call(F, k(L))
}
}
H[J]["function"] = function(L) {
F.jCallEvent(J, L)
};
this[v._event_add_](v._event_prefix_ + J, H[J]["function"], false)
}
H[J][G][I.$J_EUID] = K;
H[J]["orders"][I.$J_EUID] = G;
return this
},
jCallEvent: function(G, I) {
try {
I = v.extend(I || {}, {
type: G
})
} catch (H) {}
if (!G || v.jTypeOf(G) != "string") {
return this
}
var F = this.jFetch("_events", {});
F[G] || (F[G] = {});
F[G]["orders"] || (F[G]["orders"] = {});
v.$AA(F[G]).jEach(function(J) {
if (J != F[G]["orders"] && J != F[G]["function"]) {
v.$AA(J).jEach(function(K) {
K(this)
}, this)
}
}, I);
return this
},
unbindEvent: function(I, H) {
if (!I || !H || v.jTypeOf(I) != "string" || v.jTypeOf(H) != "function") {
return this
}
if (!H.$J_EUID) {
H.$J_EUID = Math.floor(Math.random() * v.now())
}
var G = this.jFetch("_events", {});
G[I] || (G[I] = {});
G[I]["orders"] || (G[I]["orders"] = {});
order = G[I]["orders"][H.$J_EUID];
G[I][order] || (G[I][order] = {});
if (order >= 0 && G[I][order][H.$J_EUID]) {
delete G[I][order][H.$J_EUID];
delete G[I]["orders"][H.$J_EUID];
if (v.$AA(G[I][order]).length == 0) {
delete G[I][order];
if (v.nativeEvents[I] && v.$AA(G[I]).length == 0) {
var F = this;
this[v._event_del_](v._event_prefix_ + I, G[I]["function"], false)
}
}
}
return this
},
destroyEvent: function(H) {
if (!H || v.jTypeOf(H) != "string") {
return this
}
var G = this.jFetch("_events", {});
if (v.nativeEvents[H]) {
var F = this;
this[v._event_del_](v._event_prefix_ + H, G[H]["function"], false)
}
G[H] = {};
return this
},
cloneEvents: function(H, G) {
var F = this.jFetch("_events", {});
for (t in F) {
if (G && t != G) {
continue
}
for (order in F[t]) {
if (order == "orders" || order == "function") {
continue
}
for (f in F[t][order]) {
k(H).bindEvent(t, F[t][order][f], order)
}
}
}
return this
},
jCopyEvents: function(I, H) {
if (1 !== I.nodeType) {
return this
}
var G = this.jFetch("events");
if (!G) {
return this
}
for (var F in G) {
if (H && F != H) {
continue
}
for (var J in G[F]) {
k(I).bindEvent(F, G[F][J])
}
}
return this
},
jFetch: v.Element.jFetch,
jStore: v.Element.jStore
};
(function(F) {
if (!F) {
throw "MagicJS not found";
return
}
F.extend = function(N, M) {
if (!(N instanceof window.Array)) {
N = [N]
}
if (!(M instanceof window.Array)) {
M = [M]
}
for (var K = 0, H = N.length; K < H; K++) {
if (!F.defined(N[K])) {
continue
}
for (var J = 0, L = M.length; J < L; J++) {
if (!F.defined(M[J])) {
continue
}
for (var I in (M[J] || {})) {
try {
N[K][I] = M[J][I]
} catch (G) {}
}
}
}
return N[0]
};
F.inherit = function(I, H) {
function G() {}
G.prototype = H.prototype;
I.$parent = H.prototype;
I.prototype = new G();
I.prototype.constructor = I
};
F.extend([F.Element, window.magicJS.Element], {
jGetSize_: F.Element.jGetSize,
jGetSize: function(G, I) {
var H, J = {
width: 0,
height: 0
};
if (I) {
J = this.jGetSize_()
} else {
H = this.getBoundingClientRect();
J.width = H.width;
J.height = H.height
}
if (G) {
J.width += (parseInt(this.jGetCss("margin-left") || 0) + parseInt(this.jGetCss("margin-right") || 0));
J.height += (parseInt(this.jGetCss("margin-top") || 0) + ((this.jGetCss("display") != "block") ? parseInt(this.jGetCss("margin-bottom") || 0) : 0))
}
return J
}
})
})(u);
v.Modules || (v.Modules = {});
v.Modules.ArrowsPair = (function() {
var F = ["next", "prev"],
I;
function J(L, K) {
return v.$new("button", {
type: "button"
}, {
display: "inline-block"
}).jAddClass(I["class"]).jAddClass(I.orientation).jAddClass(I["class"] + "-arrow").jAddClass(I["class"] + "-arrow-" + L).jAppendTo(K)
}
function G(K, L) {
L.stopDistribution();
this.jCallEvent(K)
}
var H = function(L, K) {
v.$uuid(this);
this.options = {
"class": "",
classHidden: "",
classDisabled: "",
position: "inside",
orientation: "ms-horizontal",
form: "button"
};
I = this.o = this.options;
v.extend(this.o, L);
this.prev = J("prev", K);
this.next = J("next", K);
this.next.jAddEvent("click", function(M) {
M.stop()
}).jAddEvent("btnclick tap", G.jBind(this, "forward"));
this.prev.jAddEvent("click", function(M) {
M.stop()
}).jAddEvent("btnclick tap", G.jBind(this, "backward"))
};
H.prototype = {
disable: function(K) {
j(K && [K] || F).jEach(function(L) {
this[L].jAddClass(I.classDisabled)
}, this)
},
enable: function(K) {
j(K && [K] || F).jEach(function(L) {
this[L].jRemoveClass(I.classDisabled)
}, this)
},
hide: function(K) {
j(K && [K] || F).jEach(function(L) {
this[L].jAddClass(I.classHidden)
}, this)
},
show: function(K) {
j(K && [K] || F).jEach(function(L) {
this[L].jRemoveClass(I.classHidden)
}, this)
},
jRemove: function(K) {
j(K && [K] || F).jEach(function(L) {
this[L].kill()
}, this)
},
setOrientation: function(K) {
j(F).jEach(function(L) {
this[L].jRemoveClass("mcs-" + I.orientation);
this[L].jAddClass("mcs-" + K)
}, this);
this.o.orientation = "mcs-" + K
}
};
v.extend(H.prototype, v.customEvents);
return H
})();
v.Modules || (v.Modules = {});
v.Modules.Bullets = (function() {
var G = "active",
F = function(J, I, H) {
v.$uuid(this);
this._options = {};
this.o = this._options;
v.extend(this.o, J);
this.bullets = v.$([]);
this.callback = H;
this.activeBullet = {};
this.ban = false;
this.container = v.$new("div", {
"class": "mcs-bullets"
});
this.container.jAppendTo(I)
};
F.prototype = {
push: function(H) {
var I = j(function(K) {
var J = this.bullets.length;
this.bullets.push({
index: J,
enable: false,
jump: K,
node: v.$new("div", {
"class": "mcs-bullet mcs-bullet-" + J
})
});
if (!J) {
this.activeBullet = this.bullets[J];
this.activate(this.bullets[J]);
this.bullets[J].enable = true
}
this.bullets[J].node.jAddEvent("click", j(function(L) {
L.stop();
if (this.bullets[J].index == this.activeBullet.index) {
return
}
this.ban = this.callback();
!this.ban && this.jCallEvent("bullets-click", {
direction: this.getDirection(this.bullets[J]),
jumpIndex: this.bullets[J].jump
})
}).jBind(this));
this.bullets[J].node.jAppendTo(this.container)
}).jBind(this);
this.reset();
H.jEach(j(function(J) {
I(J)
}).jBind(this))
},
setActiveBullet: function(H, I) {
this.activate(this.getBulletIndex(H, I))
},
show: function() {
this.container.jAddClass("show")
},
update: function() {
if (this.activeBullet.node) {
this.deactivate();
this.activate(this.bullets[0])
}
},
jRemove: function() {
this.bullets.jEach(function(H) {
H.node.kill()
});
this.container.kill()
},
deactivate: function() {
this.activeBullet.enable = false;
this.activeBullet.node.jRemoveClass(G)
},
activate: function(H) {
this.deactivate();
this.activeBullet = H;
H.enable = true;
H.node.jAddClass(G)
},
getDirection: function(H) {
var I = this.activeBullet.index > H.index ? "backward" : "forward";
this.activate(H);
return I
},
getBulletIndex: function(H, K) {
var L, J = this.bullets.length - 1,
I = this.activeBullet;
for (var L = J; L >= 0; L--) {
if (this.bullets[L].jump <= H[0]) {
I = this.bullets[L];
break
}
}
if (K) {
if (this.o.items - 1 == H[H.length - 1]) {
I = this.bullets[J]
}
}
return I
},
reset: function() {
this.ban = false;
this.activeBullet = {};
this.bullets.jEach(function(H) {
H.node.kill()
});
this.bullets.length = 0
}
};
v.extend(F.prototype, v.customEvents);
return F
})();
v.Modules || (v.Modules = {});
v.Modules.Progress = (function() {
var G = 300,
F = function(H, I) {
this.flag = "none";
this.node = v.$new("div", {
"class": "mcs-loader"
});
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.node.append(v.$new("div", {
"class": "mcs-loader-text"
}).append(v.doc.createTextNode("Loading...")))
} else {
if (I) {
this.node.append(v.$new("div", {
"class": "mcs-loader-circles"
}).append(v.$new("div", {
"class": "mcs-item-loader"
}, {
"z-index": 100000
})))
} else {
this.node.append(v.$new("div", {
"class": "mcs-loader-circles"
}).append(v.$new("div", {
"class": "mcs-loader-circle mcs-loader-circle_01"
})).append(v.$new("div", {
"class": "mcs-loader-circle mcs-loader-circle_02"
})).append(v.$new("div", {
"class": "mcs-loader-circle mcs-loader-circle_03"
})).append(v.$new("div", {
"class": "mcs-loader-circle mcs-loader-circle_04"
})).append(v.$new("div", {
"class": "mcs-loader-circle mcs-loader-circle_05"
})).append(v.$new("div", {
"class": "mcs-loader-circle mcs-loader-circle_06"
})).append(v.$new("div", {
"class": "mcs-loader-circle mcs-loader-circle_07"
})).append(v.$new("div", {
"class": "mcs-loader-circle mcs-loader-circle_08"
})))
}
}
this.node.jAppendTo(H);
this.node.hide()
};
F.prototype = {
show: function() {
if (this.flag === "show") {
return
}
if (this.node) {
this.flag = "show";
this.node.jSetOpacity(1);
this.node.show()
}
},
hide: function(H) {
if (this.flag === "hide") {
return
}
if (this.node) {
this.flag = "hide";
this.node.jSetOpacity(0);
this.node.hide()
}
},
jRemove: function() {
this.node && this.node.kill()
}
};
return F
})();
v.Modules || (v.Modules = {});
v.Modules.ShowItems = (function() {
var F = function() {
var M = [],
H = 300,
J = 0,
K = 0,
N = false,
L = this;
v.$uuid(this);
function I() {
var Q;
if (M.length == 0) {
L.jCallEvent("complete");
return
}
if (!N && M.length > 0) {
N = true;
Q = M.shift();
var P = j([]);
P.push(Q.item);
if (Q.item.clone && Q.item.clone.length > 0) {
j(Q.item.clone).jEach(j(function(R) {
P.push(R)
}).jBind(this))
}
P.jEach(function(S, R) {
K += 1;
if (Q.visible) {
if (R) {
Q.visible = false
}
}
O(S, !!R, Q.visible, Q.callback, function() {
N = false;
I()
}, Q.showReflection)
})
}
}
function G(Q, S, P, R) {
if (Q.progress) {
Q.progress.hide(true)
}
J++;
if (J == K) {
K = J = 0;
P();
R()
}
}
function O(V, U, R, S, Q, P) {
var W, X, T = j(V.content);
if (V.load == "loaded") {
G(V, U, S, Q);
return
}
if (R) {
if (v.browser.ieMode && v.browser.ieMode < 10) {
X = j(T).jGetSize();
W = {
opacity: [0, 1],
top: [X.height / 2, 0],
left: [X.width / 2, 0],
width: [0, X.width],
height: [0, X.height]
};
this.itemFX = new v.FX(T, {
duration: H,
onComplete: j(function(Z, Y) {
T.jSetCss({
overflow: "",
position: "",
top: "",
left: "",
width: "",
height: ""
});
U && (V.load = "loaded");
G(V, U, Z, Y)
}).jBind(this, S, Q),
onStart: j(function() {
T.jSetCss({
position: "relative",
overflow: "hidden"
})
}).jBind(this)
});
this.itemFX.start(W)
} else {
T.jSetCssProp(g, "scale(0.2, 0.2)");
T.jSetCssProp("transition", "none");
T.jSetOpacity(0);
T.offsetHeight;
T.parentNode.offsetHeight;
T.jAddEvent("transitionend", j(function(Y) {
if (Y.target == T) {
this.jRemoveEvent(Y.type);
this.jSetCssProp(g, "");
this.jSetCssProp("transition", "")
}
}).jBind(T));
if (!U && P) {
P(V)
}
T.jSetCssProp("transition", g + " " + H + "ms cubic-bezier(.5,.5,.69,1.9), opacity " + H + "ms linear");
T.offsetHeight;
T.parentNode.offsetHeight;
T.jSetCssProp(g, "scale(1.0, 1.0)");
T.jSetOpacity(1);
U && (V.load = "loaded");
G(V, U, S, Q)
}
} else {
T.jSetOpacity(1);
if (U) {
V.load = "loaded"
} else {
P(V)
}
G(V, U, S, Q)
}
}
this.push = function(R, Q, P, S) {
M.push({
item: R,
visible: Q,
callback: P,
showReflection: S
});
I()
}
};
v.extend(F.prototype, v.customEvents);
return F
})();
(function(F) {
F.QImageLoader = function(M, H) {
var G = 0,
L = this,
K, I;
function P(Q) {
return function(R) {
(H[Q] || F.$F).call(L, R, R.origItem);
G--;
O()
}
}
function O() {
var Q;
if (!M.length) {} else {
if (G < (H.queue || 3)) {
K = M.shift();
Q = J(K.node);
if (Q) {
I = new F.ImageLoader(Q, {
onload: P("onload"),
onerror: P("onerror"),
onabort: P("onabort"),
oncomplete: P("oncomplete")
});
I.origItem = K
} else {
(H.onload || F.$F).call(L, {
size: j(K.node).jGetSize(),
img: Q
}, K);
G--;
O()
}
G++
}
}
}
function N(Q) {
var R, S;
R = (Q && Q instanceof HTMLImageElement);
if (R) {
S = Q.getAttribute("data-src") || null;
if (S) {
Q.setAttribute("src", S)
}
}
return (R && Q.getAttribute("src")) ? Q : null
}
function J(Q) {
return F.jTypeOf(K) == "string" ? Q : (F.jTypeOf(Q) == "object" ? N(Q.img) : ((Q.tagName == "A" || Q.tagName.toLowerCase() == "figure") ? N(j(Q).byTag("IMG")[0] || Q.firstChild) : (Q.tagName == "IMG" ? N(Q) : null)))
}
this.push = function(Q, R) {
M[R ? "unshift" : "push"](Q);
H.delay || O();
return this
};
this.abort = function() {
I.destroy();
count--
};
this.load = O;
H.delay || M.length && O()
}
})(u);
var m, j = v.$,
D = j,
k = j;
var o;
var p = function() {
return "mgctlbxN$MSC mgctlbxV$" + "v2.0.40".replace("v", "") + " mgctlbxL$" + "c".toUpperCase() + ((window.mgctlbx$Pltm && "string" == v.jTypeOf(window.mgctlbx$Pltm)) ? " mgctlbxP$" + window.mgctlbx$Pltm.toLowerCase() : "")
};
function c() {
v.addCSS(".msc-tmp-hdn-holder", {
display: "block !important",
"min-height": "0 !important",
"min-width": "0 !important",
"max-height": "none !important",
"max-width": "none !important",
width: "10px !important",
height: "10px !important",
position: "absolute !important",
top: "-10000px !important",
left: "0 !important",
overflow: "hidden !important",
"-webkit-transform": "none !important",
transform: "none !important",
"-webkit-transition": "none !important",
transition: "none !important"
}, "magicsroll-reset-css")
}
v.Scroll = {};
m = {
width: {
oneOf: [{
type: "number",
minimum: 1
}, {
type: "string",
"enum": ["auto"]
}],
"default": "auto"
},
height: {
oneOf: [{
type: "number",
minimum: 1
}, {
type: "string",
"enum": ["auto"]
}],
"default": "auto"
},
rwd: {
type: "boolean",
"default": false
},
items: {
oneOf: [{
type: "number",
minimum: 1
}, {
type: "array"
}, {
type: "string",
"enum": ["auto", "fit"]
}],
"default": "auto"
},
scrollOnWheel: {
oneOf: [{
type: "boolean"
}, {
type: "string",
"enum": ["auto"]
}],
"default": "auto"
},
arrows: {
oneOf: [{
type: "boolean"
}, {
type: "string",
"enum": ["inside", "outside", "off"]
}],
"default": "outside"
},
autoplay: {
type: "number",
"default": 0
},
speed: {
type: "number",
"default": 600
},
loop: {
oneOf: [{
type: "string",
"enum": ["infinite", "rewind", "off"]
}, {
type: "boolean",
"enum": [false]
}],
"default": "infinite"
},
lazyLoad: {
type: "boolean",
"default": false
},
orientation: {
type: "string",
"enum": ["horizontal", "vertical"],
"default": "horizontal"
},
step: {
oneOf: [{
type: "number",
minimum: 0
}, {
type: "string",
"enum": ["auto"]
}],
"default": "auto"
},
draggable: {
type: "boolean",
"default": true
},
mode: {
type: "string",
"enum": ["scroll", "animation", "carousel", "cover-flow"],
"default": "scroll"
},
pagination: {
type: "boolean",
"default": false
},
easing: {
type: "string",
"default": "cubic-bezier(.8, 0, .5, 1)"
},
keyboard: {
type: "boolean",
"default": false
},
autostart: {
type: "boolean",
"default": true
},
onItemHover: {
type: "function",
"default": v.$F
},
onItemOut: {
type: "function",
"default": v.$F
},
onReady: {
type: "function",
"default": v.$F
},
onStop: {
type: "function",
"default": v.$F
},
onMoveStart: {
type: "function",
"default": v.$F
},
onMoveEnd: {
type: "function",
"default": v.$F
}
};
document.createElement("figure");
document.createElement("figcaption");
var n = function(F) {
return {
width: ((parseInt(F.jGetCss("margin-left")) || 0) + (parseInt(F.jGetCss("margin-right")) || 0)),
height: ((parseInt(F.jGetCss("margin-top")) || 0) + (parseInt(F.jGetCss("margin-bottom")) || 0))
}
},
i = function(F) {
return {
width: ((parseInt(F.jGetCss("padding-left")) || 0) + (parseInt(F.jGetCss("padding-right")) || 0)),
height: ((parseInt(F.jGetCss("padding-top")) || 0) + (parseInt(F.jGetCss("padding-bottom")) || 0))
}
},
r = function(F) {
return {
width: ((parseInt(F.jGetCss("border-left-width")) || 0) + (parseInt(F.jGetCss("border-right-width")) || 0)),
height: ((parseInt(F.jGetCss("border-top-width")) || 0) + (parseInt(F.jGetCss("border-bottom-width")) || 0))
}
},
E = function(F) {
return {
width: j(F).jGetCss("width"),
height: j(F).jGetCss("height")
}
},
w = v.browser.domPrefix,
g = v.normalizeCSS("transform").dashize(),
b = function(G, H) {
var F = false,
I = 0;
v.$uuid(this);
this._options = {
stopDownload: true,
timingFunction: "cubic-bezier(.8, 0, .5, 1)",
effect: "scroll",
continuous: false,
progress: false,
debug: false,
orientation: "horizontal",
duration: 500,
loop: true,
lazyLoad: true,
step: "auto",
draggable: true,
keyboard: false
};
this.o = this._options;
v.extend(this.o, H);
this.container = j(G).jSetCssProp("white-space", "nowrap");
this.loop = {
firstItem: false,
lastItem: false
};
this._setProperties();
this.keyboardCallback = j(function(L) {
var K = {},
J = true;
if (37 === L.keyCode || 39 === L.keyCode) {
K.direction = L.keyCode == 39 ? "forward" : "backward";
if (!this.o.loop) {
if ("forward" === K.direction) {
if (this.loop.lastItem) {
J = false
}
} else {
if (this.loop.firstItem) {
J = false
}
}
}
J && this.jCallEvent("key_down", K)
}
}).jBind(this);
this.name = "scroll";
this.items = j([]);
this.itemsFirstClones = j([]);
this.itemsLastClones = j([]);
this.exitItems = j([]);
this.enterItems = j([]);
this.last = 0;
this.globalIndex = 0;
this.itemStep = this.o.step;
this.containerPosition = 0;
this.l = null;
this.globalLength = null;
this.distance = null;
this.allSize = 0;
this.correctPosition = 0;
this.containerWidth = 0;
this.direction = "forward";
this.callback = v.$F;
this.fullViewedItems = 0;
this.stopScroll = false;
this.moveTimer = null;
this.wheelDiff = 0;
this.tempArray = null;
this.prevIndex = this.last;
this.wheel_ = false;
this.preloadAllFlag = false;
this.disableReflection = false;
this.loadAll = false;
this.allNodes = null;
this.doneFlag = {};
this.wrapperPosition = 0;
this.moveSettings = {
direction: "forward",
disableEffect: false
};
this.onDrag = null;
this.queue = new v.QImageLoader([], {
queue: 1,
onerror: j(function(K, L) {
var J = this.items[L.index];
J.load = "error";
if (J.progress) {
J.progress.jRemove();
J.progress = null
}
J.node.jAddClass("mcs-noimg");
this.performedOnClones(j(function(N, M) {
if (N.index == J.index) {
N.append = true;
if (N.progress) {
N.progress.jRemove();
N.progress = null
}
N.node.load = "error";
N.node.jAddClass("mcs-noimg")
}
}).jBind(this));
I++;
if (this.o.lazyLoad) {
if (this.checkLoadingVisibleItems()) {
if (this.o.stopDownload || !this.doneFlag.two) {
this.jCallEvent("hideProgress");
this.jCallEvent("groupLoad")
}
if (!this.move_) {
this.changeClones()
}!this.doneFlag.two && this.jCallEvent("complete")
}
} else {
if (I == this.l && !this.o.lazyLoad) {
this.loadAll = true;
!this.doneFlag.two && this.jCallEvent("complete")
}
}
this.checkLoadedItems()
}).jBind(this),
onload: (function(M, N) {
var L = [],
K = this.items[N.index],
J;
if (!K) {
return
}
K.node.append(K.content);
try {
this.setReflection(K)
} catch (M) {}
if (!this.disableReflection) {
try {
this.setCanvasPosition(K)
} catch (M) {
this.disableReflection = true
}
}
this.addCloneContent(K, j(function() {
var O = true;
if (j(["scroll", "animation"]).contains(this.name)) {
if (!this.doneFlag.two && !this.o.lazyLoad) {
O = N.index < this.fullViewedItems
}
}
this.showItem(K, O, this.showReflection);
K.load = "loaded";
I++;
if (this.o.lazyLoad) {
this.onLazyLoad(I)
} else {
if (I == this.l) {
this.loadAll = true;
!this.doneFlag.two && this.jCallEvent("complete")
}
}
this.checkLoadedItems()
}).jBind(this))
}).jBind(this)
})
};
b.prototype = {
constructor: b,
showReflection: v.$F,
setCanvasPosition: v.$F,
setReflection: v.$F,
onLazyLoad: function(F) {
if (this.checkLoadingVisibleItems()) {
if (this.o.stopDownload || !this.doneFlag.two) {
this.jCallEvent("hideProgress");
this.jCallEvent("groupLoad")
}
if (!this.doneFlag.two) {
this.jCallEvent("complete")
}
}
},
showItem: function(J, M, L) {
var F, I, H, K = 500,
G = J.content;
if (M) {
if (v.browser.ieMode && v.browser.ieMode < 10) {
F = j(G).jGetSize();
I = {
opacity: [0, 1],
top: [F.height / 2, 0],
left: [F.width / 2, 0],
width: [0, F.width],
height: [0, F.height]
};
H = new v.FX(G, {
duration: K,
onComplete: j(function(O, N) {
G.jSetCss({
overflow: "",
position: "",
top: "",
left: "",
width: "",
height: ""
});
if (J.progress) {
J.progress.jRemove();
J.progress = null
}
}).jBind(this),
onStart: j(function() {
G.jSetCss({
position: "relative",
overflow: "hidden"
})
}).jBind(this)
});
H.start(I)
} else {
G.jSetCssProp("transition", "none");
G.jSetOpacity(0);
G.offsetHeight;
G.parentNode.offsetHeight;
G.jAddEvent("transitionend", j(function(N) {
if (N.target == G) {
this.jRemoveEvent(N.type);
this.jSetCssProp(g, "");
this.jSetCssProp("transition", "");
if (J.progress) {
J.progress.jRemove();
J.progress = null
}
}
}).jBind(G));
G.jSetCssProp("transition", g + " " + K + "ms cubic-bezier(.5,.5,.69,1.9), opacity " + K + "ms linear");
G.offsetHeight;
G.parentNode.offsetHeight;
G.jSetOpacity(1);
L && L(J)
}
} else {
G.jSetOpacity(1);
if (J.progress) {
J.progress.jRemove();
J.progress = null
}
}
J.clone.length > 0 && j(J.clone).jEach(j(function(N) {
if (N) {
j(N.content).jSetOpacity(1);
N.load = "loaded";
if (N.progress) {
N.progress.jRemove();
N.progress = null
}
}
}).jBind(this))
},
checkLoadedItems: function() {
var F = 0;
this.items.jEach(j(function(G) {
if (G.load == "loaded" || G.load == "error") {
F++
}
if (this.l == F) {
this.loadAll = true;
this.jCallEvent("hideProgress")
}
}).jBind(this))
},
checkLoadingVisibleItems: function() {
var F = 0,
G = 0;
if (this.loadAll) {
return true
}
for (; F < this.fullViewedItems; F++) {
if (this.items[this._getItemIndex(this.last + F)].load == "loaded" || this.items[this._getItemIndex(this.last + F)].load == "error") {
G += 1
}
}
return G == this.fullViewedItems
},
_sWidth: function() {
return this.container.parentNode.jGetSize()[this.p_.size]
},
_setProperties: function() {
var F = {
horizontal: {
size: "width",
pos: "left",
otherSize: "height"
},
vertical: {
size: "height",
pos: "top",
otherSize: "width"
}
};
this.p_ = F[this.o.orientation];
if (this.o.step == 0) {
this.o.step = "auto"
}
if (!this.o.loop || "rewind" === this.o.loop) {
this.loop.firstItem = true
}
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.container.jSetCssProp(this.p_.pos, 0)
} else {
this.container.jSetCssProp(g, "translate3d(0, 0, 0)")
}
},
_render: function() {
this.container.offsetHeight
},
preloadAll: function() {
if (this.loadAll || this.preloadAllFlag) {
return
}
this.preloadAllFlag = true;
this.jCallEvent("showProgress");
this.items.jEach(j(function(F) {
if (F.load == "notLoaded") {
if (F.progress) {
F.progress.jRemove();
F.progress = null
}
F.clone.length > 0 && j(F.clone).jEach(function(G) {
if (G.progress) {
G.progress.jRemove();
G.progress = null
}
});
this.queue.push({
node: F.content,
index: F.index
})
}
}).jBind(this));
this.loadAll = true
},
preloadItem: function(G) {
var H, J = this.last,
F = j([]),
I, K;
if (this.loadAll) {
return
}
if (this.o.lazyLoad) {
G && (J = (G == "forward") ? this._getItemIndex(J + this.fullViewedItems) : this._getItemIndex(J - this.fullViewedItems));
K = j(function(L) {
if (L.load == "notLoaded") {
if (this.o.stopDownload) {
!G && this.jCallEvent("showProgress")
} else {
L.progress && L.progress.show()
}
L.load = "load";
this.queue.push({
node: L.content,
index: L.index
})
}
}).jBind(this);
for (H = 0; H < this.fullViewedItems; H++) {
I = this.items[this._getItemIndex(J + H)];
K(I);
if (!G) {
K(this.items[this._getItemIndex(I.index + this.fullViewedItems)]);
K(this.items[this._getItemIndex(I.index - this.fullViewedItems)])
}
}
}
},
freeTouchPreload: function(K) {
var L, G, I, H, F = 0,
J = this.allNodes.length;
if (K == "backward") {
F = J - 1;
J = -1
}
if (!this.loadAll) {
while (F != J) {
H = this.allNodes[F];
L = H.jGetPosition();
G = H.getAttribute("data-item");
if (L[this.p_.pos] + this.items[0].size[this.p_.size] > this.wrapperPosition[this.p_.pos] && L[this.p_.pos] < this.wrapperPosition[this.p_.pos] + this.containerWidth) {
I = this.items[G];
if (I.load == "notLoaded") {
I.load = "load";
I.progress && I.progress.show();
j(I.clone).jEach(j(function(M) {
M.progress && M.progress.show()
}).jBind(this));
this.queue.push({
node: I.content,
index: I.index
})
}
}
K == "forward" ? F++ : F--
}
}
},
done: function(J) {
var G, F, I, H;
if (this.doneFlag.one) {
return
}
this.doneFlag.one = true;
F = this.l = this.items.length;
this.containerWidth = this._sWidth();
I = j(this.container.parentNode).jGetPosition();
for (G = 0; G < this.l; G++) {
H = this.items[G];
H.size = H.node.jGetSize(true);
this.allSize += H.size[this.p_.size]
}
this.onResize()
},
done2: function(G) {
this.doneFlag.two = true;
this.setItemStep();
if (!v.browser.ieMode || v.browser.ieMode && v.browser.ieMode > 9) {
if (this.o.draggable) {
this._initDragOnScroll()
}
}
this.itemEvent();
if ((!v.browser.ieMode || v.browser.ieMode && v.browser.ieMode > 9) && "scroll" === this.o.effect && this.o.scrollOnWheel) {
this._initOnWheel()
}
if (j(["scroll", "animation"]).contains(this.name)) {
for (var F = 0; F < this.items.length; F++) {
if (F >= this.fullViewedItems) {
this.items[F].progress && this.items[F].progress.show()
}
}
}
this.last = 0;
this.globalIndex = this.itemsFirstClones.length;
j(window).jAddEvent("resize", this.onResize.jBind(this));
if (this.o.keyboard) {
j(document).jAddEvent("keydown", this.keyboardCallback)
}
this.onResize();
G && G()
},
itemEvent: function() {
this.items.jEach(j(function(F) {
F.content.showThis = j(function() {
this.jCallEvent("show-this", {
index: F.index
})
}).jBind(this);
F.content.jAddEvent("click", j(function(G) {
if (this.move_) {
G.stop()
}
}).jBind(this))
}).jBind(this))
},
setItemStep: function(H) {
var F, G = 0;
if (this.stopScroll) {
return
}
if (this.o.continuous) {
this.itemStep = this.fullViewedItems;
return
}
for (F = 0; F < this.l; F++) {
G += this.items[F].size[this.p_.size];
if (G >= this.containerWidth) {
if (this.itemStep == "auto" || this.itemStep >= F) {
if (this.o.effect == "animation" && G - this.items[F].size[this.p_.size] + 5 < this.containerWidth || G == this.containerWidth) {
F += 1
}
this.itemStep = F;
if (this.o.step != "auto" && this.o.step < this.itemStep) {
this.itemStep = this.o.step
}
}
break
}
}!this.itemStep && (this.itemStep = 1)
},
cloneFigure: function(G) {
var F = G.cloneNode();
figure = document.createElement("figure"), figcaption = document.createElement("figcaption");
v.$A(G.firstChild.childNodes).jEach(j(function(H) {
if (H.tagName.toLowerCase() == "figcaption") {
v.$A(H.childNodes).jEach(j(function(I) {
j(figcaption).append(I.cloneNode(true))
}).jBind(this));
v.$A(H.attributes).jEach(j(function(I) {
figure.setAttribute(I, I.nodeValue)
}).jBind(this));
figure.append(figcaption)
} else {
j(figure).append(H.cloneNode(true))
}
}).jBind(this));
v.$A(G.firstChild.attributes).jEach(j(function(H) {
figure.setAttribute(H, H.nodeValue)
}).jBind(this));
F.append(figure);
return F
},
performedOnClones: function(F) {
if (this.itemsFirstClones.length > 0) {
j([this.itemsFirstClones, this.itemsLastClones]).jEach(j(function(G) {
G.jEach(j(function(I, H) {
F(I, H)
}).jBind(this))
}).jBind(this))
}
},
addCloneContent: function(G, H) {
if (this.itemsFirstClones.length > 0) {
var F = j(function() {
var I;
if (v.browser.ieMode && v.browser.ieMode < 9 && G.node.firstChild.tagName.toLowerCase() == "figure") {
I = this.cloneFigure(G.content.cloneNode(true))
} else {
I = G.content.cloneNode(true)
}
j(I).jAddEvent("dragstart mousedown selectstart", function(J) {
J.stopDefaults()
});
I.childNodes && v.$A(I.childNodes).jEach(j(function(J) {
if (j(J).jHasClass && j(J).jHasClass("MagicScroll-progress-bar")) {
J.kill()
}
}).jBind(this));
return I
}).jBind(this);
this.performedOnClones(j(function(J, I) {
if (J.index == G.index && !J.append) {
J.content = F();
this.items[G.index].clone.push(J);
J.append = true;
J.node.append(J.content)
}
}).jBind(this))
}
H && H()
},
_prepareClones: function() {
var F, G = 0,
J = 0,
L = 0,
I = {
left: 0,
top: 0
},
K, H;
if (this.stopScroll) {
return
}
for (F = 0; F < this.l; F++) {
G += this.items[F].size[this.p_.size];
L++;
if (this.containerWidth <= G) {
break
}
}
if (this.l > 1 && (L > this.fullViewedItems || this.itemsFirstClones.length == 0)) {
J = this.itemsFirstClones.length;
for (F = J; F < L; F++) {
K = {
node: this.items[this.l - 1 - F].node.cloneNode(),
load: "notLoaded",
append: false
};
j(K.node).setAttribute("data-item", this.l - 1 - F);
K.index = this.items[this.l - 1 - F].index;
if (this.o.lazyLoad && this.o.progress) {
K.progress = new v.Modules.Progress(K.node);
K.progress.show()
}
this.itemsFirstClones.push(K);
H = {
node: this.items[F].node.cloneNode(),
load: "notLoaded",
append: false
};
j(H.node).setAttribute("data-item", F);
H.index = this.items[F].index;
if (this.o.lazyLoad && this.o.progress) {
H.progress = new v.Modules.Progress(H.node);
H.progress.show()
}
this.itemsLastClones.push(H);
j([H.node, K.node]).jEach(j(function(M) {
M.jAddEvent("click", j(function(N) {
if (this.move_) {
N.stop()
}
}).jBind(this))
}).jBind(this));
this.container.append(H.node);
this.container.append(K.node, "top");
j([this.items[this.l - 1 - F], this.items[F]]).jEach(j(function(M) {
if (M.load == "loaded") {
this.addCloneContent(M, j(function() {
var N = true;
if (j(["scroll", "animation"]).contains(this.name)) {
if (!this.doneFlag.two && !this.o.lazyLoad) {
N = M.index < this.fullViewedItems
}
}
this.showItem(M, N);
M.clone.length > 0 && j(M.clone).jEach(function(O) {
if (O.progress) {
O.progress.jRemove();
O.progress = null
}
})
}).jBind(this))
}
}).jBind(this))
}
if (J) {
this.fullViewedItems += L - J
} else {
this.fullViewedItems = L
}
} else {
this.fullViewedItems = L
}
this.correctPosition = this.containerPosition = 0;
G = 0;
for (F = 0; F < this.itemsFirstClones.length; F++) {
G += this.items[this.l - 1 - F].size[this.p_.size]
}
this.correctPosition += G;
this.containerPosition -= G;
I[this.p_.pos] = this.containerPosition;
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.container.jSetCssProp(this.p_.pos, I[this.p_.pos])
} else {
this.correctContainerPosition()
}
},
push: function(F) {
this.l = this.items.length;
F.index = this.l;
F.load = "notLoaded";
F.clone = [];
F.content.jAddEvent("dragstart mousedown selectstart", function(G) {
G.preventDefault()
});
if (this.o.progress && this.o.lazyLoad) {
F.progress = new v.Modules.Progress(F.node, true);
if (!this.o.stopDownload) {
F.progress.show()
}
}
F.node.setAttribute("data-item", F.index);
F.node.jAddEvent("mouseover mouseout", j(function(H) {
var G = H.getRelated();
while (G && G !== F.node) {
G = G.parentNode
}
if (G == F.node) {
return
}
if ("mouseover" === H.type) {
this.jCallEvent("on-item-hover", {
itemIndex: F.index
})
} else {
this.jCallEvent("on-item-out", {
itemIndex: F.index
})
}
}).jBind(this));
this.items.push(F)
},
_getItemIndex: function(F) {
F %= this.l;
F < 0 && (F = F + this.l);
return F
},
jump: function(G, H) {
var F;
if (G == "forward" || G == "backward") {
this.direction = G
}
if (this.move_ || this.wheel_) {
return
}
this.move_ = true;
if (v.jTypeOf(G) == "object") {
this.direction = G.direction;
G.disableEffect = false;
G.defaultMove = false
} else {
if (/forward|backward|^\+|^\-/.test(G)) {
if (/^\+|^\-/.test(G)) {
F = /^\+/.test(G) ? "forward" : "backward";
G = {
goTo: Math.abs(parseInt(G)),
direction: F
};
G.goTo > this.l && (G.goTo = this.l);
G.target = this._getItemIndex(G.direction == "forward" ? (this.last + G.goTo) : (this.last - G.goTo))
} else {
G = {
direction: G
};
G.target = this._getItemIndex(G.direction == "forward" ? (this.last + this.itemStep) : (this.last - this.itemStep))
}
G.disableEffect = false;
G.defaultMove = true
} else {
if (v.jTypeOf(parseInt(G)) == "number") {
G = {
target: this._getItemIndex(G),
disableEffect: true,
defaultMove: false
}
}
}
}
G.callback = H;
if (!this.o.loop) {
if (this.loop.firstItem || this.loop.lastItem) {
if (this.loop.firstItem) {
if ("backward" === G.direction) {
this.move_ = false;
H(null, true);
return
}
} else {
if ("forward" === G.direction) {
this.move_ = false;
H(null, true);
return
}
}
}
}
this["_" + this.name](G)
},
_shiftContainer: function(I, G) {
var H = {
left: 0,
top: 0
},
J = false,
F = G || this.containerPosition;
if (I == "forward") {
if (F + this.correctPosition - this.distance + this.allSize < 0) {
this.containerPosition = F + this.allSize;
H[this.p_.pos] = this.containerPosition;
J = true
}
} else {
if (F + this.distance > 0) {
this.containerPosition = F - this.allSize;
H[this.p_.pos] = this.containerPosition;
J = true
}
}
if (J) {
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.container.jSetCssProp(this.p_.pos, H[this.p_.pos] + "px")
} else {
this.container.jSetCssProp(g, "translate3d(" + H.left + "px, " + H.top + "px, 0)");
this.container.jSetCssProp("transition", g + " 0ms " + this.o.timingFunction);
this._render();
if (this.o.effect == "animation") {
this.previous = this.globalIndex = this._getGlobalIndex();
if (I == "forward") {
this.globalIndex += this.itemStep
} else {
this.globalIndex -= this.itemStep
}
}
}
}
return J
},
_calcDistance: function(I, H) {
var G, F = true;
if (!H) {
if (this.o.step == "auto") {
this.itemStep = "auto";
this.setItemStep(I == "backward")
}
F = false;
H = this.itemStep
} else {
this.o.stopDownload = false
}
for (G = H; G > 0; G--) {
this.last = this._getItemIndex((I == "forward") ? (this.last + 1) : (this.last - 1));
this.globalIndex = (I == "forward") ? (this.globalIndex + 1) : (this.globalIndex - 1);
this.distance += this.items[(I == "forward") ? this._getItemIndex(this.last - 1) : this.last].size[this.p_.size]
}
if ("infinite" === this.o.loop) {
if (!this.o.continuous) {
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes()
})
}
} else {
if ("scroll" === this.o.effect && this.loop.lastItem && I == "backward") {
if (F) {
this.last -= (this.itemsVisible - 1)
} else {
this.last -= (H - 1)
}
if (this.last < 0) {
this.last = 0
}
}
this.jCallEvent("enable");
if (this.loop.lastItem && I == "forward") {
this.loop.lastItem = false;
this.loop.firstItem = true;
this.containerPosition = 0;
this.distance = 0;
this.last = 0;
this.globalIndex = 0;
this.jCallEvent("first-frame");
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes()
})
} else {
if (this.loop.firstItem && I == "backward") {
this.loop.firstItem = false;
this.loop.lastItem = true;
this.distance = 0;
this.last = this.l - 1;
if (this.o.effect == "scroll") {
this.globalIndex = this.l - this.itemsVisible;
this.containerPosition = (this.allSize - this.containerWidth) * (-1)
} else {
this.globalIndex = this.l - this.l % this.itemsVisible;
this.containerPosition = (Math.ceil(this.l / this.itemStep) - 1) * this.containerWidth * (-1)
}
this.jCallEvent("last-frame");
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes(true)
})
} else {
this.loop.lastItem = false;
this.loop.firstItem = false;
if (I == "forward") {
if (this.containerPosition - this.distance <= this.containerWidth - this.allSize || this.containerPosition - this.distance + 1 <= this.containerWidth - this.allSize) {
this.jCallEvent("last-frame");
if (this.o.effect == "scroll" || this.o.effect == "animation" && "infinite" === this.o.loop) {
this.distance = this.containerPosition - (this.containerWidth - this.allSize)
} else {
this.distance = this.containerWidth
}
this.loop.lastItem = true;
this.last = this.l - 1;
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes(true)
})
} else {
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes()
})
}
} else {
if (Math.ceil(this.containerPosition + this.distance) >= 0 || this.containerPosition + this.distance === -1) {
this.jCallEvent("first-frame");
this.distance = Math.abs(this.containerPosition);
this.loop.firstItem = true;
this.globalIndex = 0;
this.last = 0;
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes()
})
} else {
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes()
})
}
}
}
}
}
},
jumpToNumber: function(J) {
var F, H, G = 0,
I;
if (!J.direction) {
G = Math.floor(this.fullViewedItems / 2);
if (this.fullViewedItems % 2 == 0) {
G -= 1
}
G < 0 && (G = 0)
}
if ("infinite" === this.o.loop) {
J.target = this._getItemIndex(J.target - G)
}
if (this.last != J.target) {
this.o.stopDownload = false;
I = j(function(N) {
var L = this.last,
M = 0,
K;
do {
M++;
!N ? L++ : L--;
K = this._getItemIndex(L)
} while (K != J.target);
return M
}).jBind(this);
if (!J.direction) {
if ("infinite" === this.o.loop) {
J.direction = I() <= I(true) ? "forward" : "backward"
} else {
J.direction = J.target > this.last ? "forward" : "backward"
}
}
this.jCallEvent("enable");
if ("infinite" === this.o.loop) {
while (this.last != J.target) {
this.last = this._getItemIndex(J.direction == "forward" ? ++this.last : --this.last);
this.globalIndex = J.direction == "forward" ? ++this.globalIndex : --this.globalIndex;
this.distance += this.items[this.last].size[this.p_.size]
}
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes()
})
} else {
this.loop.lastItem = false;
this.loop.firstItem = false;
this.last = J.target;
H = 0;
for (F = 0; F < J.target - G; F++) {
H += this.items[F].size[this.p_.size]
}
this.globalIndex = J.target;
this.containerPosition = 0 - this.correctPosition - H;
if (this.o.effect == "scroll" && this.containerPosition <= 0 - (this.allSize - this.containerWidth) || this.containerPosition <= 0 - ((this.allSize + (this.l % this.itemStep) * this.items[0].size[this.p_.size]) - this.containerWidth)) {
if (this.o.effect == "scroll") {
this.containerPosition = 0 - (this.allSize - this.containerWidth)
}
this.loop.lastItem = true;
this.jCallEvent("last-frame");
this.last = this.l - 1;
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes(true)
})
} else {
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes()
})
}
if (this.containerPosition >= 0) {
this.containerPosition = 0;
this.jCallEvent("first-frame");
this.loop.firstItem = true;
this.last = 0;
this.jCallEvent("on-start-effect", {
arr: this.getVisibleIndexes()
})
}
}
} else {
this.move_ = false;
this.wheel_ = false;
this.jCallEvent("disableHold")
}
},
_scroll: function(I) {
var F = this.containerPosition,
G = false,
H;
this.previous = this.globalIndex;
this.distance = 0;
if ((!this.o.loop || "rewind" === this.o.loop) && this.o.effect == "animation") {
if (this.loop.lastItem && I.direction == "forward" || this.loop.firstItem && I.direction == "backward") {
G = true
}
}
if (I.defaultMove) {
this._calcDistance(I.direction, I.goTo)
} else {
this.jumpToNumber(I);
if (!this.o.loop) {
if (F === this.containerPosition) {
this.move_ = false;
this.wheel_ = false;
this.jCallEvent("disableHold")
}
}
}
if (G) {
I.direction = I.direction == "forward" ? "backward" : "forward"
}
if (0 !== this.wheelDiff) {
H = this.items[this.prevIndex].size[this.p_.size] - this.wheelDiff;
if (I.direction == "forward") {
this.distance -= H
} else {
this.distance += H
}
this.wheelDiff = 0
}
"infinite" === this.o.loop && this._shiftContainer(I.direction);
if (I.direction == "forward") {
this.containerPosition -= this.distance
} else {
this.containerPosition += this.distance
}
if ((!this.o.loop || this.o.loop === "rewind") && this.o.effect === "scroll") {
var J = 0;
j(this.getVisibleIndexes(this.loop.lastItem)).jEach(function(K) {
J += this.items[K].size.width
}.jBind(this));
if (this.containerPosition > 0) {
this.containerPosition = 0
} else {
if (Math.abs(F) + J >= this.allSize - this.containerWidth && I.direction === "forward") {
if (this.containerPosition !== 0 || !this.o.loop) {
this.containerPosition = (this.allSize - this.containerWidth) * (-1)
}
}
}
}
this.moveSettings.direction = I.direction;
this.moveSettings.disableEffect = I.disableEffect;
if (F != this.containerPosition) {
this.callback = I.callback;
if (this.o.stopDownload && !this.loadAll && !this.checkLoadingVisibleItems()) {
this.jCallEvent("showProgress");
this.preloadItem();
this.bindEvent("groupLoad", j(function(K) {
this.move_ && this._move(null, K.direction, K.disableEffect)
}).jBind(this, this.moveSettings))
} else {
if (!this.loadAll) {
this.preloadItem()
}
this._move(null, I.direction, I.disableEffect)
}
} else {
this.move_ = false;
this.wheel_ = false;
this.jCallEvent("hold")
}
},
_move: function(G, F, I) {
var H = {
left: 0,
top: 0
};
this.move_ = true;
if (v.browser.ieMode && v.browser.ieMode < 10) {
H = {};
H[this.p_.pos] = [parseInt(this.container.jGetCss(this.p_.pos)), this.containerPosition];
this.fx = new v.FX(this.container, {
transition: this.o.timingFunction,
duration: G || this.o.duration,
onComplete: this._onComplete.jBind(this),
onStart: j(function() {
this.stop_ = false
}).jBind(this)
}).start(H)
} else {
H[this.p_.pos] = this.containerPosition;
if (this.o.effect == "animation" && !I) {
this._moveEffect(F, H)
} else {
this.container.jRemoveEvent("transitionend");
this.container.jAddEvent("transitionend", j(function(J) {
if (J.target == this.container) {
this.container.jRemoveEvent(J.type);
if (I) {
this.globalIndex = this._getGlobalIndex();
this._cleansingStyles()
}
this._onComplete()
}
}).jBind(this));
this.container.jSetCssProp(g, "translate3d(" + H.left + "px, " + H.top + "px, 0)");
this.container.jSetCssProp("transition", g + " " + (G || this.o.duration) + "ms " + this.o.timingFunction)
}
}
},
_moveEffect: function(L, K) {
var J, G, I, H = this.container.childNodes,
F = H.length,
M = j(function(N) {
N %= this.globalLength;
N < 0 && (N = N + this.globalLength);
return N
}).jBind(this);
this.exitItems.length = 0;
this.enterItems.length = 0;
for (J = 0; J < this.itemStep; J++) {
if ("infinite" === this.o.loop) {
G = M(this.previous + J)
} else {
G = this.previous + J < F ? this.previous + J : null
}
G != null && this.exitItems.push(H[G]);
if ("infinite" === this.o.loop) {
I = M(this.globalIndex + J)
} else {
I = this.globalIndex + J < F ? this.globalIndex + J : null
}
I != null && this.enterItems.push(H[I])
}
if (L == "backward") {
this.exitItems.reverse();
this.enterItems.reverse()
}
this.container.setAttribute("data-" + L, "");
this.exitItems.jEach(j(function(O, N) {
O.jAddEvent(w + "AnimationEnd animationend", j(function(P, Q, R) {
if (P == this.exitItems[Q]) {
P.jRemoveEvent(w + "AnimationEnd animationend").setAttribute("data-exited", "");
if (Q == this.exitItems.length - 1) {
this.exitItems.jEach(j(function(T, S) {
T.removeAttribute("data-animation-nth");
T.removeAttribute("data-action")
}).jBind(this));
this.enterItems.jEach(j(function(T, S) {
if (S == this.enterItems.length - 1) {
T.jAddEvent(w + "AnimationEnd animationend", j(function(U) {
if (U.target == T) {
T.jRemoveEvent(w + "AnimationEnd animationend");
this.enterItems.jEach(j(function(V, W) {
V.removeAttribute("data-animation-nth");
V.removeAttribute("data-action")
}).jBind(this));
this.exitItems.jEach(j(function(V, W) {
V.removeAttribute("data-exited")
}).jBind(this));
this.container.removeAttribute("data-" + L);
this._render();
this._onComplete()
}
}).jBind(this))
}
T.setAttribute("data-entering", "");
T.jAddEvent(w + "AnimationStart animationstart", j(function(U) {
if (U.target == this) {
this.jRemoveEvent(w + "AnimationStart animationstart");
T.removeAttribute("data-entering")
}
}).jBind(T));
T.setAttribute("data-action", "enter");
T.setAttribute("data-animation-nth", (S + 1))
}).jBind(this));
this.container.jSetCssProp(g, "translate3d(" + K.left + "px, " + K.top + "px, 0)")
}
}
}).jBind(this, O, N))
}).jBind(this));
this.exitItems.jEach(j(function(O, N) {
O.setAttribute("data-exiting", "");
O.jAddEvent(w + "AnimationStart animationstart", j(function(P) {
if (P.target == this) {
O.jRemoveEvent(w + "AnimationStart animationstart");
this.removeAttribute("data-exiting")
}
}).jBind(O));
O.setAttribute("data-action", "exit");
O.setAttribute("data-animation-nth", (N + 1))
}).jBind(this))
},
getVisibleIndexes: function(I) {
var J = 0,
H = this.itemStep,
F = [],
G;
if (I) {
if (this.o.effect == "scroll") {
J = this.l - this.itemStep
} else {
J = this.l % this.itemStep ? this.l - this.l % this.itemStep : this.l - this.itemStep
}
H = this.l
}
for (; J < H; J++) {
if (!I) {
G = this.last + J
} else {
G = J
}
F.push(this._getItemIndex(G))
}
return F
},
_onComplete: function() {
this.move_ = false;
this.continuousPause = false;
this.callback && this.callback(this.getVisibleIndexes(this.loop.lastItem))
},
_cleansingStyles: function() {
this.container.jSetCssProp("transition", g + " 0ms")
},
getMatrixPosition: function(K) {
var J = {
x: 0,
y: 0
},
H = K.jGetCss(g) || "",
I = /3d/.test(H) ? (/matrix3d\(([^\)]+)\)/) : (/matrix\(([^\)]+)\)/),
G = /3d/.test(H) ? 12 : 4,
F = /3d/.test(H) ? 13 : 5;
(K.jGetCss(g) || "").replace(I, function(N, M) {
var L = M.split(",");
J.x += parseInt(L[G], 10);
J.y += parseInt(L[F])
});
return J
},
_getGlobalIndex: function() {
var I;
var H;
var F;
var G = Number.MAX_VALUE;
var J = this.container.parentNode.jGetPosition()[this.p_.pos];
for (I = 0; I < this.globalLength; I++) {
H = this.container.childNodes[I].jGetPosition()[this.p_.pos];
if (G > Math.abs(J - H)) {
G = Math.abs(J - H);
F = I
} else {
break
}
}
return F
},
changeClones: function() {
if (this.itemsFirstClones.length == 0) {
return
}
var G, F, H = j(function(J, K) {
var L, I;
if (this.items[K].node != J && this.items[K].load == "loaded") {
for (I = 0; I < this.globalLength; I++) {
if (this.items[K].node == this.container.childNodes[I]) {
L = I;
break
}
}
if (L < F) {
this.container.insertBefore(J, this.container.childNodes[L]);
if (F + 1 <= this.globalLength - 1) {
this.container.insertBefore(this.items[K].node, this.container.childNodes[F + 1])
} else {
this.container.appendChild(this.items[K].node)
}
} else {
this.container.insertBefore(this.items[K].node, J);
if (L + 1 <= this.globalLength - 1) {
this.container.insertBefore(J, this.container.childNodes[L + 1])
} else {
this.container.appendChild(J)
}
}
}
}).jBind(this);
F = this._getGlobalIndex();
for (G = 0; G < this.fullViewedItems; G++) {
H(this.container.childNodes[F], this._getItemIndex(this.last + G));
F++
}
},
correctItemPosition: function(N) {
var L, J, K, Q = 0,
G = 0,
P, M = this.container.parentNode.jGetPosition()[this.p_.pos] + 1,
I = this.container.jGetPosition()[this.p_.pos] - M,
O = Math.abs(Math.abs(I) - Math.abs(this.containerPosition)),
H, F = j(function(R) {
return parseInt(this.container.childNodes[R].getAttribute("data-item"))
}).jBind(this);
(O > 0 && O < 1) && (O = 0);
if (N == "forward") {
M += O
} else {
M -= O
}
for (L = 0; L < this.globalLength; L++) {
K = this.container.childNodes[L].jGetPosition()[this.p_.pos];
if (K == M) {
this.last = F(L);
return 0
}
P = parseInt(this.container.childNodes[L].jGetSize()[this.p_.size]);
if (K < M && K + P > M) {
H = L;
if (N == "forward") {
H = L + 1 > this.globalLength - 1 ? this.globalLength - 1 : L + 1;
L++
}
for (J = 0; J < L; J++) {
G += this.items[F(J)].size[this.p_.size]
}
Q = Math.abs(Math.abs(this.containerPosition) - G);
this.last = F(H);
break
}
}
return Q
},
_initDragOnScroll: function() {
var af, L, ad, V, ae, K, G = (this.p_.pos == "left") ? "x" : "y",
M = {
x: 0,
y: 0
},
T = this.o.effect == "scroll",
W, Y = true,
P = {
x: 0,
y: 0
},
I = false,
X = false,
N = null,
R = 0,
Z = null,
S = false,
H = j(function(ai) {
var ah, ag = 0;
if (ai > this.containerWidth) {
ai = this.containerWidth
}
for (ah = 1.5; ah <= 90; ah += 1.5) {
ag += (ai * Math.cos(ah / Math.PI / 2))
}
return this.containerWidth > ag ? ag : this.containerWidth
}).jBind(this),
J = j(function(ai) {
var aj, ag = 0,
ah, ak;
while (ag > this.containerPosition) {
ag -= this.containerWidth
}
if (Math.abs(ag - this.containerPosition) > this.containerWidth / 2) {
ag += this.containerWidth
}
ak = ag;
for (aj = 0; aj < this.globalLength; aj++) {
ah = parseInt(this.container.childNodes[aj].getAttribute("data-item"));
if (ak == 0) {
this.last = ah;
break
}
ak += this.items[ah].size[this.p_.size]
}
return ag
}).jBind(this),
ab = j(function(ag) {
X = true;
j(document.body).jAddClass("mcs-dragging");
this.o.stopDownload = false;
Y = true;
clearTimeout(this.moveTimer);
if (this.o.effect == "animation") {
this.stopEffect()
}
this.stopWhell && this.stopWhell();
M = {
x: 0,
y: 0
};
G = (this.p_.pos == "left") ? "x" : "y";
this.jCallEvent("drag-start");
this.container.jRemoveEvent("transitionend");
this.containerPosition = this.getMatrixPosition(this.container)[G];
M[G] = this.containerPosition;
this.container.jSetCssProp(g, "translate3d(" + M.x + "px, " + M.y + "px, 0)");
this.container.jSetCssProp("transition", "none");
this._render();
this.o.effect == "scroll" && (T = true);
this.move_ = true
}).jBind(this),
F = j(function() {
if (this.o.effect == "animation") {
this.container.jSetCssProp("transition", "none");
this.globalIndex = this._getGlobalIndex()
}
if (this.o.effect == "animation") {
this.last = parseInt(this.container.childNodes[this._getGlobalIndex()].getAttribute("data-item"))
}
if ("infinite" === this.o.loop) {
this.changeClones()
}
this.move_ = false;
this.wheel_ = false;
T = false;
Y = true;
this.preloadItem();
this.jCallEvent("drag-end", {
arr: this.getVisibleIndexes(this.loop.lastItem)
})
}).jBind(this),
U = j(function(ah) {
j(document.body).jRemoveClass("mcs-dragging");
if (X) {
X = false;
var ag = this.containerPosition;
if (!Y) {
ah.returnValue = false;
Q();
L = ah.timeStamp - af;
if (this.o.effect == "scroll") {
if (L > 200) {
K = ae;
T = false
} else {
K = H(Math.abs(P[G] - ah[G]))
}
ae = K;
if ("infinite" === this.o.loop) {
this.distance = Math.abs(ae);
this._shiftContainer(ad)
}
if ("infinite" === this.o.loop || this.containerPosition <= 0) {
if (Math.abs(this.containerPosition) < ae) {
ae = Math.abs(this.containerPosition)
}
this.containerPosition -= ae
}
ad == "forward" ? this.containerPosition -= this.correctItemPosition(ad) : this.containerPosition += this.correctItemPosition(ad);
if (!this.o.loop || "rewind" === this.o.loop) {
this.jCallEvent("enable");
this.loop.firstItem = false;
this.loop.lastItem = false;
if (this.containerPosition > 0) {
this.containerPosition = 0;
this.last = 0;
T = true;
this.jCallEvent("first-frame");
this.loop.firstItem = true
}
if (this.containerPosition < this.containerWidth - this.allSize) {
this.containerPosition = this.containerWidth - this.allSize;
this.last = this.l - 1;
T = true;
this.jCallEvent("last-frame");
this.loop.lastItem = true
}
}
W = T ? 600 : 300
} else {
T = true;
this.distance = 0;
this.containerPosition = J();
"infinite" === this.o.loop && this._shiftContainer(ad);
if (L < 200) {
this.distance = this.containerWidth;
"infinite" === this.o.loop && this._shiftContainer(ad);
if (ad == "forward") {
this.containerPosition -= this.containerWidth
} else {
this.containerPosition += this.containerWidth
}
}
if (!this.o.loop || "rewind" === this.o.loop) {
this.jCallEvent("enable");
this.loop.firstItem = false;
this.loop.lastItem = false;
if (this.containerPosition >= 0) {
this.containerPosition = 0;
this.last = 0;
this.loop.firstItem = true;
this.jCallEvent("first-frame")
}
if (this.containerPosition <= (Math.ceil(this.l / this.itemStep) - 1) * this.containerWidth * (-1)) {
this.containerPosition = (Math.ceil(this.l / this.itemStep) - 1) * this.containerWidth * (-1);
this.last = this.l - 1;
this.loop.lastItem = true;
this.jCallEvent("last-frame")
}
}
W = 500
}
M[G] = this.containerPosition;
this.container.jAddEvent("transitionend", j(function(ai) {
if (ai.target == this.container) {
F()
}
}).jBind(this));
if (ag == this.containerPosition) {
this.move_ = false;
T = false;
Y = true
}
this.container.jSetCssProp("transition", g + " " + W + "ms cubic-bezier(.22,.63,.49,.8)");
this.container.jSetCssProp(g, "translate3d(" + M.x + "px, " + M.y + "px, 0)")
} else {
if (!v.browser.mobile) {
F()
} else {
this.move_ = false
}
}
}
}).jBind(this),
O = 0,
Q = j(function() {
clearTimeout(Z);
Z = null;
S = false;
O = 0
}).jBind(this),
ac = j(function() {
var ag = O * 0.2;
if (Math.abs(ag) < 0.0001) {
Q();
return
}
O -= ag;
this.containerPosition -= ag;
M[G] = this.containerPosition;
this.container.jSetCssProp(g, "translate3d(" + M.x + "px, " + M.y + "px, 0)");
Z = setTimeout(ac, 16)
}).jBind(this),
aa = j(function(ah) {
if (X) {
var ag = ah[G] - R > 0 ? "backward" : "forward";
Y = false;
if ("infinite" === this.o.loop) {
this.distance = Math.abs(ae);
this._shiftContainer(ag)
}
if (v.browser.ieMode) {
O += ae;
if (!S) {
S = true;
ac()
}
} else {
this.container.jSetCssProp("transition", g + " 0ms");
if (this.o.effect == "animation") {}
this.containerPosition -= ae;
M[G] = this.containerPosition;
this.container.jSetCssProp(g, "translate3d(" + M.x + "px, " + M.y + "px, 0)")
}
this.freeTouchPreload(ag)
}
}).jBind(this);
this.onDrag = j(function(ag) {
if (this.stopScroll || this.o.effect == "animation" && T) {
return
}
if ("dragstart" == ag.state) {
af = ag.timeStamp;
P.x = ag.x;
P.y = ag.y;
R = ag[G]
} else {
ad = (ae > 0) ? "forward" : "backward";
ae = R - ag[G];
this.moveSettings.direction = ad;
if ("dragend" == ag.state) {
if (I) {
I = false;
U(ag)
}
} else {
if (this.o.orientation == "vertical" || Math.abs(ag.x - P.x) > Math.abs(ag.y - P.y)) {
ag.stopDefaults();
if (!I) {
if (this.o.effect == "animation" && this.move_) {
return
}
I = true;
ab(ag)
} else {
aa(ag)
}
}
}
}
R = ag[G]
}).jBind(this);
if (!v.browser.ieMode || v.browser.ieMode && v.browser.ieMode > 9) {
this.container.parentNode.jAddEvent("mousedrag touchdrag", this.onDrag)
}
},
_initOnWheel: function() {
var K, L, H = 0,
J = {
x: 0,
y: 0
},
I = (this.p_.pos == "left") ? "x" : "y",
G = j(function(N) {
var M = H * (N || 0.2);
K = M > 0 ? "forward" : "backward";
H -= M;
if (Math.abs(M) < 0.00001) {
clearTimeout(this.moveTimer);
this.last = parseInt(this.container.childNodes[this._getGlobalIndex()].getAttribute("data-item"));
this.changeClones();
this.wheelDiff = this._getWheelDiff();
this.prevIndex = this.last;
H = 0;
this.distance = 0;
this.moveTimer = null;
this.wheel_ = false;
this.move_ = false;
this.jCallEvent("drag-end", {
arr: this.getVisibleIndexes(this.loop.lastItem)
});
F();
return
}
this.distance = Math.abs(M);
"infinite" === this.o.loop && this._shiftContainer(K);
this.containerPosition -= M;
this.distance = 0;
this.freeTouchPreload(K);
if (!this.o.loop || "rewind" === this.o.loop) {
if (this.containerPosition > 0) {
this.containerPosition = 0;
H = 0.00001;
this.jCallEvent("first-frame")
} else {
if (this.containerPosition < this.containerWidth - this.allSize) {
this.containerPosition = this.containerWidth - this.allSize;
H = 0.00001;
this.jCallEvent("last-frame")
} else {
this.jCallEvent("enable")
}
}
}
J[I] = this.containerPosition;
this.container.jSetCssProp(g, "translate3d(" + J.x + "px, " + J.y + "px, 0)");
this.moveTimer = setTimeout(G.jBind(this, N), 30)
}).jBind(this);
if (v.browser.ieMode && v.browser.ieMode < 10 || this.stopScroll) {
return
}
this.stopWhell = j(function() {
if (this.wheel_) {
clearTimeout(this.moveTimer);
H = 0;
this.distance = 0;
this.moveTimer = null;
this.wheel_ = false;
this.move_ = false
}
}).jBind(this);
var F = function() {
if ((!this.o.loop || this.o.loop === "rewind") && this.o.effect === "scroll") {
if (this.containerPosition < 0) {
this.loop.firstItem = false
}
if (this.containerPosition > this.containerWidth - this.allSize) {
this.loop.lastItem = false
}
}
}.jBind(this);
this.container.jAddEvent("mousescroll", j(function(M) {
var N = (Math.abs(M.deltaY) < Math.abs(M.deltaX) ? M.deltaX : M.deltaY * (!M.isMouse ? -1 : -30));
if (this.move_) {
return
}
if ((true === this.o.scrollOnWheel && M.isMouse) || "vertical" === this.o.orientation && Math.abs(M.deltaY) > Math.abs(M.deltaX) || "horizontal" === this.o.orientation && Math.abs(M.deltaY) < Math.abs(M.deltaX)) {
M.stop();
this.wheel_ = true;
if (0 === H) {
this.container.jSetCssProp("transition", g + " 0ms");
J = {
x: 0,
y: 0
};
I = (this.p_.pos == "left") ? "x" : "y"
}
this.jCallEvent("drag-start");
H += N;
if (!this.moveTimer) {
G(0.4)
}
}
}).jBind(this))
},
_getWheelDiff: function() {
var G, F, H = this.containerPosition,
I = j(["tempArray", "items", "itemsLastClones"]);
this.tempArray = [];
this.itemsFirstClones.jEach(j(function(J) {
this.tempArray.push(J)
}).jBind(this));
this.tempArray.reverse();
for (G = 0; G < I.length; G++) {
for (F = 0; F < this[I[G]].length; F++) {
H += this.items[this[I[G]][F].index].size[this.p_.size];
if (H > 0) {
this.last = this[I[G]][F].index;
this.tempArray = null;
if (H > 0 && H < 1) {
H = 0
}
return H
}
}
}
},
pause: function() {
var F, G;
if (!this.o.continuous || this.continuousPause || !this.move_ || this.o.effect == "animation") {
return
}
this.continuousPause = true;
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.fx && (this.fx.options.onComplete = v.$F);
this.fx && this.fx.stop();
this.fx = null;
this.containerPosition = Math.round(parseInt(this.container.jGetCss(this.p_.pos)))
} else {
this.containerPosition = this.getMatrixPosition(this.container)[(this.p_.pos == "left") ? "x" : "y"]
}
F = this.correctItemPosition(this.direction);
G = this.o.duration / this.distance * F;
if (this.direction == "forward") {
this.containerPosition -= F
} else {
this.containerPosition += F
}
this._move(G)
},
stop: function() {
this.stop_ = true;
this.move_ = false;
this.stopWhell && this.stopWhell();
if (this.o.effect == "animation") {
this.stopEffect()
}
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.fx && this.fx.stop(true);
this.fx = null
} else {
this._cleansingStyles()
}
},
stopEffect: function() {
var F = {
x: 0,
y: 0
};
if (!v.browser.ieMode || v.browser.ieMode && v.browser.ieMode > 10) {
F[this.p_.pos] = this.containerPosition;
this.container.removeAttribute("data-forward");
this.container.removeAttribute("data-backward");
j([this.exitItems, this.enterItems]).jEach(j(function(G, H) {
if (G.length > 0) {
G.jEach(j(function(J, I) {
J.jRemoveEvent(w + "AnimationStart animationstart " + w + "AnimationEnd animationend");
J.removeAttribute("data-animation-nth");
J.removeAttribute("data-action");
if (!H) {
J.removeAttribute("data-exiting");
J.removeAttribute("data-exited")
} else {
J.removeAttribute("data-entering")
}
}).jBind(this))
}
}).jBind(this));
this.container.jSetCssProp(g, "translate3d(" + F.left + "px, " + F.top + "px, 0)");
this.move_ = false;
this._render()
}
},
onResize: function() {
var G, H, F, I;
this.stop();
this.continuousPause = false;
this.wrapperPosition = j(this.container.parentNode).jGetPosition();
this.containerWidth = this._sWidth();
this.itemsVisible = 0;
this.allSize = 0;
for (G = 0; G < this.l; G++) {
this.items[G].size = this.items[G].node.jGetSize(true);
this.allSize += this.items[G].size[this.p_.size];
if (this.allSize <= this.containerWidth) {
this.itemsVisible += 1
}
}
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.last = 0
} else {
this.correctContainerPosition()
}
this.distance = 0;
this.itemStep = this.o.step;
if (this.allSize <= this.containerWidth) {
this.stopScroll = true;
this.jCallEvent("hideArrows");
this.jCallEvent("disable");
this.correctPosition = 0;
this.containerPosition = 0;
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.container.jSetCssProp(this.p_.pos, 0)
} else {
this.container.jSetCssProp(g, "translate3d(0px, 0px, 0)")
}
this._removeClones()
} else {
this.stopScroll = false;
this.jCallEvent("showArrows");
this.jCallEvent("enable");
if (!this.o.loop || "rewind" === this.o.loop) {
if (this.loop.firstItem) {
this.jCallEvent("first-frame")
}
if (this.loop.lastItem) {
this.jCallEvent("last-frame")
}
}
}
if ((this.allSize > this.containerWidth) && ("infinite" === this.o.loop || this.o.continuous)) {
this._prepareClones()
} else {
this.fullViewedItems = H = 0;
for (G = 0; G < this.l; G++) {
H += this.items[G].size[this.p_.size];
this.fullViewedItems++;
if (this.containerWidth <= H) {
break
}
}
}
this._shiftContainer("forward");
this.container.jRemoveEvent("transitionend");
this.globalIndex = this._getGlobalIndex();
this.globalLength = this.container.childNodes.length;
this.setItemStep();
this.changeClones();
this.allNodes = v.$A(this.container.childNodes);
this.o.lazyLoad ? this.preloadItem() : this.preloadAll()
},
correctContainerPosition: function() {
var H, J, I = {
left: 0,
top: 0
},
G = this.items[this.last].node.jGetPosition()[this.p_.pos],
F = this.container.parentNode.jGetPosition()[this.p_.pos];
if (v.browser.ieMode && v.browser.ieMode < 10) {} else {
if (!this.o.loop && this.loop.lastItem) {
if ("scroll" === this.o.effect) {
I[this.p_.pos] = this.containerWidth - this.allSize
} else {
J = this.itemsVisible - this.l % this.itemsVisible;
I[this.p_.pos] = this.containerWidth - (this.allSize + this.items[0].size[this.p_.size] * J)
}
} else {
H = this.getMatrixPosition(this.container)["left" === this.p_.pos ? "x" : "y"];
I[this.p_.pos] = H - (G - F)
}
this.containerPosition = I[this.p_.pos];
this.container.jSetCssProp(g, "translate3d(" + I.left + "px, " + I.top + "px, 0)")
}
},
rightQueue: function(G) {
var M = 0,
L = true,
H = this.l - 1,
I = j(["itemsLastClones", "items", "itemsFirstClones"]),
K = j(function(Q, O) {
var N, P = null;
for (N = 0; N < Q.length; N++) {
if (Q[N].index == O) {
P = Q[N].node;
break
}
}
return P
}).jBind(this),
J = j(function(N) {
return (M == 0) ? N - 1 : (M - 1)
}).jBind(this),
F = j(function(Q, O) {
var P, N = Q.length;
if (N > 0) {
for (P = 0; P < N; P++) {
if (L) {
L = false;
M = N - 1;
this.container.appendChild(Q[M].node)
} else {
this.container.insertBefore(K(Q, !M ? H : J(N)), K(!M ? this[I[O - 1]] : Q, M));
M = !M ? H : M - 1
}
}
}
}).jBind(this);
I.jEach(j(function(N, O) {
F(this[N], O);
M = 0
}).jBind(this));
if (!G) {
this.last = 0
}
},
_removeClones: function() {
this.itemsFirstClones.jEach(function(F) {
F.node.kill()
});
this.itemsFirstClones = j([]);
this.itemsLastClones.jEach(function(F) {
F.node.kill()
});
this.itemsLastClones = j([])
},
update: function(G) {
var F = {
left: 0,
top: 0
};
this.stop();
if (G) {
this.containerPosition = this.last = 0
}
if (v.browser.ieMode && v.browser.ieMode < 10) {
this.container.jSetCss(F)
} else {
if (G) {
this.container.jSetCssProp(g, "translate3d(" + F.left + "px, " + F.top + "px, 0)")
} else {
this.correctContainerPosition()
}
}
this.itemStep = this.o.step;
if ((!this.o.continuous && (!this.o.loop || "rewind" === this.o.loop)) && this.itemsFirstClones.length > 0) {
this.correctPosition = 0;
this._removeClones()
}
this.onResize();
this.rightQueue(!G);
if (G) {
this.container.parentNode.jRemoveEvent("mousedrag touchdrag", this.onDrag);
if (this.o.draggable) {
this.container.parentNode.jAddEvent("mousedrag touchdrag", this.onDrag)
}
}
this.move_ = false
},
setNewOptions: function(F) {
for (var G in F) {
this.o[G] = F[G]
}
this._setProperties()
},
dispose: function() {
this.stop();
this._removeClones();
j(window).jRemoveEvent("resize");
j(document).jRemoveEvent("keydown");
this.container.jRemoveEvent("touchdrag mousedrag");
this.items.jEach(j(function(F) {
F.node.jRemoveEvent("mouseover mouseout");
delete F.content.showThis
}).jBind(this))
}
};
v.extend(b.prototype, v.customEvents);
v.Scroll.Effect = b;
var y = function(F, G) {
v.Scroll.Effect.apply(this, arguments);
this._options = {
radius: "auto",
gradientBezier: j([0.44, 0.59, 0.35, 0.89]),
startAlpha: 255,
timingFunction: "cubic-bezier(.8, 0, .5, 1)"
};
this.name = "carousel";
this.o = this._options;
v.extend(this.o, G);
this.distance = 70;
this.lastAngle = 0;
this.nextAngle = 0;
this.moveTimer = null;
this.fxk = Math.pow(10, 8);
this.circle = 2 * Math.PI;
this.last = 0;
this.getVisibleItems = j([]);
this.originSize = null;
this.angle = null;
this.endItem = null;
this.radius = 0;
this.l = 0;
this.originFontSize = null
};
v.inherit(y, v.Scroll.Effect);
v.extend(y.prototype, {
constructor: y,
_prepareClones: v.$F,
changeClones: v.$F,
_scroll: v.$F,
pause: v.$F,
resetZIndex: v.$F,
performedOnClones: v.$F,
cloneFigure: v.$F,
preloadItem: v.$F,
_getWheelDiff: v.$F,
gradientBezier: v.extend({}, v.FX.prototype),
_shiftContainer: function() {
this.lastAngle %= this.circle;
this.nextAngle = this.lastAngle
},
done: function(H) {
var G, F;
if (this.doneFlag.one) {
return
}
this.doneFlag.one = true;
F = this.l = this.items.length;
this.containerWidth = this._sWidth();
if (v.browser.ieMode && v.browser.ieMode < 10 && this.items[0].content.length && this.items[0].content.lastChild.tagName.toLowerCase() == "figcaption") {
this.originFontSize = parseInt(this.items[0].content.lastChild.jGetCss("font-size"))
}
this.gradientBezier.cubicBezier = this.o.gradientBezier;
for (G = 0; G < this.l; G++) {
this.items[G].size = this.items[G].node.jGetSize(true, true);
this.allSize += this.items[G].size[this.p_.size];
this.items[G].node.jSetCssProp("position", "absolute");
this.items[G].img = this.getImg(this.items[G])
}
if ("infinite" === this.o.loop) {
this.jCallEvent("enable")
}
this.items.jEach(j(function(I) {
if (I.figcaption && !I.captionA) {
if (I.content.tagName.toLowerCase() != "figure") {
I.captionA = true
}
}
}).jBind(this));
this.onResize();
this.preloadAll()
},
done2: function(F) {
this.doneFlag.two = true;
this.itemEvent();
this.angle = this.circle / this.l;
this.endItem = (this.circle - this.angle) * (-1);
this.itemStep = 1;
this._initDragOnScroll();
this.o.scrollOnWheel && this._initOnWheel();
j(window).jAddEvent("resize", this.onResize.jBind(this));
if (this.o.keyboard) {
j(document).jAddEvent("keydown", this.keyboardCallback)
}
F && F();
this.onResize()
},
itemEvent: function() {
y.$parent.itemEvent.apply(this);
this.items.jEach(j(function(F) {
F.node.jAddEvent("click", j(function(G) {
this.jCallEvent("item-click", {
index: F.index
})
}).jBind(this))
}).jBind(this))
},
showReflection: function(G) {
var F = 1000;
if (v.browser.ieMode && v.browser.ieMode < 10 || !G.canvas) {
return
}
G.canvas.jSetOpacity(1);
G.canvas.jSetCssProp("transition", "opacity " + F + "ms")
},
setCanvasPosition: function(H) {
var F, G, I = j(function(J) {
if (J.canvas || J.captionA) {
F = J.img.jGetSize(false, true);
G = J.img.offsetTop + F.height;
if (J.canvas) {
J.canvas.jSetCss({
top: G,
left: J.img.offsetLeft,
width: F.width
})
}
if (J.captionA && J.figcaption) {
J.figcaption.jSetCss({
top: G
})
}
}
}).jBind(this);
H ? I(H) : this.items.jEach(j(function(J) {
I(J)
}).jBind(this))
},
getImg: function(H) {
var F, G = H.content;
if (G.tagName == "IMG") {
F = G
} else {
if (G.firstChild.tagName == "IMG") {
F = G.firstChild
} else {
if (G.firstChild.tagName == "FIGURE" && G.firstChild.firstChild.tagName == "IMG") {
F = G.firstChild.firstChild
} else {
F = null
}
}
}
if (F) {
j(F).jSetCssProp("z-index", 100)
}
return F
},
setReflection: function(S) {
if (this.o.orientation == "vertical") {
return
}
var H = v.$new("canvas", {}, {
opacity: 0
}),
T = v.$new("canvas"),
G, F, K, Q, P, R, U = 1,
N, O, L, I, M, J;
if (v.browser.ieMode && v.browser.ieMode < 10) {
return
}
if (H.getContext) {
G = H.getContext("2d");
F = T.getContext("2d");
if (!S.img) {
return
}
P = j(S.img).jGetSize(false, true);
R = P.height / 100 * 30;
T.width = P.width;
T.height = P.height;
F.save();
F.scale(1, -1);
F.drawImage(S.img, 0, P.height * (-1), P.width, P.height);
K = F.getImageData(0, 0, P.width, R);
F.restore();
H.width = P.width;
H.height = R;
G.save();
O = K.data;
J = O.length;
I = J / 4 / P.width;
L = this.o.startAlpha;
N = J / I;
for (M = 3; M < J; M += 4) {
if (M > N) {
N += (J / I);
U++;
L = Math.round(this.o.startAlpha - this.o.startAlpha * this.gradientBezier.cubicBezierAtTime(1 / (I / U)))
}
O[M] = L
}
G.putImageData(K, 0, 0);
G.restore();
S.canvas = H;
if ((!S.content.childNodes || S.content.childNodes.length < 2) && S.content.tagName.toLowerCase() !== "a") {
S.node.appendChild(H)
} else {
S.content.insertBefore(H, S.content.childNodes[1])
}
H.jAddClass("mcs-reflection")
}
},
showCaption: function(G) {
var H = 0,
F = this.distance / (this.l / 2),
I = 100 - F;
if (G > I) {
H = (G - I) / F
}
return H
},
renderCarousel: function(M) {
var J = {
left: 0,
top: 0
},
H = {
left: 0,
top: 0
},
T = {
left: 0,
top: 0
},
N, S, R = this.l,
O = this.distance,
F = this.circle / R,
Q, I, G, L, K, P;
J[this.p_.pos] = this.radius;
v.defined(M) || (M = 0);
this.lastAngle = M;
for (K = 0; K < R; K++) {
I = G = K * F + M;
G %= this.circle;
I %= this.circle;
if (G != 0 && G != Math.PI) {
if (Math.ceil(Math.abs(G) / Math.PI) % 2 == 0) {
if (Math.abs(G) % Math.PI != 0) {
I = Math.PI - (Math.abs(G) % Math.PI)
}
} else {
I = Math.abs(G)
}
}
I = Math.abs(I * 100 / Math.PI);
if (this.items[K].figcaption) {
this.items[K].figcaption.jSetOpacity(this.showCaption(100 - (I * O / 100)))
}
I = 100 - Math.round(I * O / 100);
!this.originSize && (this.originSize = this.items[K].size);
N = Math.abs(G);
if (N > Math.PI / 2 && N < Math.PI + Math.PI / 2) {
if (N > Math.PI) {
N = Math.PI / 2 - Math.abs(N - Math.PI)
} else {
N = N - Math.PI / 2
}
N = (1 - Math.sin(N)) * 0.7
} else {
N = 1
}
if (v.browser.ieMode && v.browser.ieMode < 10) {
L = {
width: this.setItemSide("width", I),
height: this.setItemSide("height", I)
};
this.items[K].node.jSetCss(L);
this.items[K].node.jSetCss({
top: Math.sin(G) * J.top + parseInt(this.containerSize.height) / 2 - parseInt(L.height) / 2,
left: Math.sin(G) * J.left + parseInt(this.containerSize.width) / 2 - parseInt(L.width) / 2
});
if (this.items[K].content.length && this.items[K].content.lastChild.tagName.toLowerCase() == "figcaption") {
this.items[K].content.lastChild.style.fontSize = this.setFontSize(I / 100 * I)
}
if (this.items[K].captionA) {
Q = this.items[K].img.jGetSize(false, true);
this.items[K].figcaption.jSetCss({
top: this.items[K].img.offsetTop + Q.height
})
}
} else {
T[this.p_.pos] = 360 / this.circle * G;
this.o.orientation == "vertical" && (T[this.p_.pos] *= (-1));
P = Math.abs(G);
S = Math.sqrt(1 - Math.sin(P) * Math.sin(P));
if (P > Math.PI / 2 && P < Math.PI + Math.PI / 2) {
P = this.radius * (S) + this.radius
} else {
P = this.radius * (1 - S)
}
P > 0 && (P *= (-1));
H[this.p_.pos] = (Math.sin(G) * J[this.p_.pos] + parseInt(this.containerSize[this.p_.size]) / 2 - this.items[K].size[this.p_.size] / 2);
this.items[K].node.jSetCssProp(g, "translateX(" + H.left + "px)translateY(" + H.top + "px)translateZ(" + P + "px)rotateX(" + T.top + "deg)rotateY(" + T.left + "deg)")
}
this.items[K].node.jSetCssProp("z-index", 0 + I);
this.items[K].node.jSetOpacity(N)
}
},
round: function(F, G) {
var H = Math.pow(10, G || 15);
return Math.round(F * H) / H
},
_calcDistance: function(I) {
var G, H, F = 360 / this.l;
if (I.defaultMove) {
if (I.goTo) {
if (I.direction == "forward" && this.last > I.target) {
G = this.l - this.last;
G += I.target
} else {
if (I.direction == "backward" && this.last < I.target) {
G = this.l - I.target;
G += this.last
}
}!G && (G = Math.abs(this.last - I.target));
this.last = I.target
} else {
G = this.itemStep;
this.last = this._getItemIndex(I.direction == "forward" ? this.last + G : this.last - G)
}
} else {
H = (360 - this.last * F + I.target * F) % 360;
if (H >= 0 && H <= 180) {
!I.direction && (I.direction = "forward")
} else {
if (H >= 180 && H <= 360) {
!I.direction && (I.direction = "backward")
}
}
if (I.direction == "forward") {
G = Math.round(H / F)
} else {
G = Math.round((360 - H) / F)
}
this.last = I.target
}
return v.extend(I, {
angle: G * this.angle
})
},
_carousel: function(G) {
var F;
G = this._calcDistance(G);
F = G.angle;
if (!this.o.loop) {
this.jCallEvent("enable")
}
if (G.direction == "forward") {
this.nextAngle -= F;
if (!this.o.loop) {
if (this.nextAngle == this.endItem) {
this.jCallEvent("last-frame")
} else {
if (this.nextAngle < this.endItem) {
this.last = 0;
this.nextAngle = 0;
this.jCallEvent("first-frame")
}
}
}
} else {
this.nextAngle += F;
if (!this.o.loop) {
if (this.nextAngle == 0) {
this.jCallEvent("first-frame")
} else {
if (this.nextAngle > 0) {
this.last = this.l - 1;
this.nextAngle = this.endItem;
this.jCallEvent("last-frame")
}
}
}
}
this.jCallEvent("on-start-effect", {
arr: [this.last]
});
this.callback = G.callback;
this._move(this.nextAngle)
},
setItemSide: function(F, G) {
return this.originSize[F] / 100 * G
},
setFontSize: function(F) {
return Math.round(this.originFontSize / 100 * F) + "px"
},
_move: function(F) {
this.fx = new v.FX(this.container, {
duration: this.o.duration,
transition: this.o.timingFunction,
onBeforeRender: (function(G) {
this.renderCarousel(G.angle / this.fxk)
}).jBind(this),
onComplete: j(function() {
this._onComplete()
}).jBind(this)
}).start({
angle: [this.fxk * this.lastAngle, this.fxk * F]
})
},
_onComplete: function() {
this._shiftContainer();
y.$parent._onComplete.apply(this)
},
_move2: function(G) {
var F = Math.abs(this.nextAngle - this.lastAngle) * (G || 0.2);
if (Math.abs(F) < 0.00001) {
clearTimeout(this.moveTimer);
this.moveTimer = null;
this.move_ = false;
this.jCallEvent("drag-end", {
arr: [this.last]
});
return
}
if (this.nextAngle < this.lastAngle) {
F *= (-1)
}
this.renderCarousel(this.lastAngle + F);
this.moveTimer = setTimeout(this._move2.jBind(this, G), 30)
},
searchIndex: function() {
var H, I = this.nextAngle % this.circle,
G = parseInt(Math.abs(this.nextAngle / this.circle)),
K, J, F = j(function(L) {
while (G != 0) {
G--;
if (I <= 0) {
L -= this.circle
} else {
L += this.circle
}
}
return L
}).jBind(this);
for (H = 0; H < this.l; H++) {
K = (H * this.circle) / this.l;
J = ((H + 1) * this.circle) / this.l;
if (I <= 0) {
K *= (-1);
J *= (-1)
} else {
K = this.circle - K;
J = this.circle - J
}
if (K != I) {
if (K > I && I > J) {
if (Math.abs(I - K) <= Math.abs(J - I)) {
this.nextAngle = F(K);
this.last = H
} else {
this.nextAngle = F(J);
this.last = this._getItemIndex(H + 1)
}
}
} else {
this.last = H
}
}
},
_initOnWheel: function() {
var H, G, F = this.circle / 360 * 15;
this.container.jAddEvent("mousescroll", j(function(I) {
if (true === this.o.scrollOnWheel || I.isMouse || "vertical" === this.o.orientation && Math.abs(I.deltaY) > Math.abs(I.deltaX) || "horizontal" === this.o.orientation && Math.abs(I.deltaY) < Math.abs(I.deltaX)) {
this.jCallEvent("drag-start");
this.fx && this.fx.stop(true);
this.fx = null;
I.stop();
if (v.browser.ieMode && v.browser.ieMode < 10) {
I.isMouse = true
}
G = Math.abs(I.deltaY) < Math.abs(I.deltaX) ? I.deltaX : -1 * I.deltaY;
G = I.isMouse ? (G * F) : (G * (8 / 864));
!I.isMouse && (G = G > 0 ? Math.min(this.angle / 4, G) : Math.max(this.angle / 4 * (-1), G));
this.nextAngle -= G;
clearTimeout(H);
H = setTimeout(j(function() {
this.searchIndex()
}).jBind(this), 100);
if (!this.o.loop) {
if (this.nextAngle >= 0) {
this.jCallEvent("first-frame");
this.nextAngle = 0;
this.last = 0
} else {
if (this.nextAngle <= this.endItem) {
this.jCallEvent("last-frame");
this.nextAngle = this.endItem;
this.last = this.l - 1
}
}
}
if (!this.moveTimer) {
this._move2(0.08)
}
}
}).jBind(this))
},
_initDragOnScroll: function() {
var K = (this.p_.pos == "left") ? "x" : "y",
M = {
x: 0,
y: 0
},
L = {
x: 0,
y: 0
},
J, G = false,
I = "forward",
F = false,
H = j(function(N) {
if ("dragstart" == N.state) {
j(document.body).jAddClass("mcs-dragging");
F = true;
M.x = L.x = N.x;
M.y = L.y = N.y
} else {
if (F) {
M.x = N.x;
M.y = N.y;
if ("dragend" == N.state) {
j(document.body).jRemoveClass("mcs-dragging");
F = false;
if (G) {
G = false;
this.searchIndex()
}
} else {
if (this.o.orientation == "vertical" || Math.abs(N.x - L.x) > Math.abs(N.y - L.y)) {
N.stopDefaults();
if (!G) {
G = true;
this.move_ = true;
this.fx && this.fx.stop();
this.jCallEvent("drag-start");
clearTimeout(this.moveTimer);
this.moveTimer = null
}
I = L[K] < M[K] ? "backward" : "forward";
J = Math.abs(L[K] - M[K]) / this.radius;
if (I == "forward") {
this.nextAngle -= J;
if (!this.o.loop) {
if (this.nextAngle <= this.endItem) {
this.jCallEvent("last-frame");
this.nextAngle = this.endItem;
this.last = this.l - 1
}
}
} else {
this.nextAngle += J;
if (!this.o.loop) {
if (this.nextAngle >= 0) {
this.jCallEvent("first-frame");
this.nextAngle = 0;
this.last = 0
}
}
}!this.moveTimer && this._move2()
}
L.x = M.x;
L.y = M.y
}
}
}
}).jBind(this);
this.container.jAddEvent("touchdrag mousedrag", H)
},
stop: function() {
this.fx && this.fx.stop(true);
this.fx = null;
clearTimeout(this.moveTimer);
this.moveTimer = null;
this.nextAngle && this.renderCarousel(this.nextAngle)
},
onResize: function() {
var G, H, F, I;
this.stop();
this.containerWidth = this._sWidth();
this.containerSize = this.container.parentNode.jGetSize(false, true);
this.allSize = 0;
for (G = 0; G < this.l; G++) {
this.items[G].size = this.items[G].node.jGetSize(true, true);
this.allSize += this.items[G].size[this.p_.size]
}
this.angle = 1 * this.circle / this.l;
this.endItem = (this.circle - this.angle) * (-1);
H = this.allSize / this.circle;
this.radius = this.containerSize[this.p_.size] / 2;
(this.radius < H) && (this.radius = H);
(v.browser.ieMode && v.browser.ieMode < 10) && (this.radius -= (this.items[0].size[this.p_.size] / 2));
this.lastAngle = this.nextAngle = 0;
this.renderCarousel();
this.setCanvasPosition();
F = this.last;
this.last = 0;
I = this._calcDistance({
target: F
});
if ("forward" === I.direction) {
this.nextAngle -= I.angle
} else {
this.nextAngle += I.angle
}
this.renderCarousel(this.nextAngle)
},
update: function(F) {
this.stop();
this.last = 0;
if (this.o.orientation == "vertical") {
this.removeCanvas()
} else {
this.items.jEach(j(function(G) {
if (!G.canvas) {
this.setReflection(G)
}
}).jBind(this))
}
this.container.jRemoveEvent("touchdrag mousedrag mousescroll");
this._initDragOnScroll();
this.o.scrollOnWheel && this._initOnWheel();
this.resetZIndex();
this._setProperties();
this.onResize();
if (this.o.orientation == "horizontal") {
this.items.jEach(j(function(G) {
this.showReflection(G)
}).jBind(this))
}
this.move_ = false
},
removeCanvas: function() {
this.items.jEach(j(function(F) {
if (F.canvas) {
F.canvas.jRemove();
delete F.canvas
}
}).jBind(this))
},
dispose: function() {
y.$parent.dispose.apply(this);
this.container.jRemoveEvent("mousescroll");
this.removeCanvas();
this.items.jEach(j(function(F) {
F.node.jRemoveEvent("click")
}).jBind(this))
}
});
v.extend(y.prototype, v.customEvents);
v.Scroll.Carousel = y;
var d = function(F, G) {
v.Scroll.Carousel.apply(this, arguments);
this.name = "coverFlow";
this.center = null;
this.distance = null;
this.moiety = null;
this.lastPosition = null;
this.nextPosition = null;
this.depth = 350;
this.itemStep = 1;
this.moveTimer = null;
this.firstSide = null;
this.lastSide = null;
this.stepDistance = null;
this.lastItemLoad = 0
};
v.inherit(d, v.Scroll.Carousel);
v.extend(d.prototype, {
constructor: d,
_shiftContainer: v.$F,
_carousel: v.$F,
showCaption: v.$F,
setItemsPosition: function() {
var F, H, G;
this.stepDistance = this.moiety;
if (this.o.orientation == "vertical") {
G = this.moiety + this.moiety * 0.8;
this.stepDistance /= 2
} else {
G = this.moiety * 2
}
for (F = 0; F < this.l; F++) {
H = (F == 1) ? G : this.stepDistance;
this.items[F].position = !F ? (this.center - this.moiety) : (this.items[F - 1].position + H)
}
},
zIndex: function(F) {
if (this.o.orientation == "horizontal") {
return Math.round(this.allSize - Math.abs(this.center - (F.position + this.moiety)))
}
},
done: function(H) {
var G, F;
if (this.one) {
return
}
this.one = true;
F = this.l = this.items.length;
this.containerWidth = this._sWidth();
this.gradientBezier.cubicBezier = this.o.gradientBezier;
for (G = 0; G < this.l; G++) {
this.items[G].size = this.items[G].node.jGetSize(true, true);
this.allSize += this.items[G].size[this.p_.size];
this.items[G].node.jSetCssProp("position", "absolute");
this.items[G].img = this.getImg(this.items[G]);
this.items[G].figcaption && j(this.items[G].figcaption).jSetOpacity(0)
}
this.o.loop = false;
this.items.jEach(j(function(I) {
if (I.figcaption && !I.captionA) {
if (I.content.tagName.toLowerCase() != "figure") {
I.captionA = true
}
}
}).jBind(this));
this.onResize();
!this.o.lazyLoad && this.preloadAll()
},
done2: function(F) {
this.doneFlag.two = true;
this.itemEvent();
this.itemStep = 1;
this._initDragOnScroll();
this.o.scrollOnWheel && this._initOnWheel();
j(window).jAddEvent("resize", this.onResize.jBind(this));
if (this.o.keyboard) {
j(document).jAddEvent("keydown", this.keyboardCallback)
}
F && F();
this.onResize()
},
zoom: function(N) {
var L, G, M, K, H = 1,
F, I = N.position + this.moiety,
J = N.position + this.moiety <= this.center;
K = J ? (this.center - I) : (I - this.center);
K /= ((J ? (this.center - this.firstSide) : (this.lastSide - this.center)) / 100);
G = (90 / 100 * K) * (Math.PI / 180);
L = 60 * Math.sin(G);
F = 1 - 1 * Math.sin(G);
if (this.o.orientation == "horizontal") {
!J && (L *= (-1))
} else {
L *= (-1);
J && (H = 1 - 0.7 * Math.sin(G))
}
M = this.depth * Math.sin(G) * (-1);
return {
rotate: L,
translateZ: M,
opacity: H,
captionOpasity: F
}
},
calcItemPosition: function(J, L) {
var H, G = false,
K = false,
F = J.position + this.moiety,
M, I = {
rotate: 60,
translateZ: this.depth * (-1),
opacity: 1
};
M = F - L;
if (F >= this.lastSide) {
if (F - L < this.lastSide) {
H = F - this.lastSide;
K = true;
L -= H;
if (L <= this.moiety) {
L = (this.lastSide - this.center) / this.stepDistance * L
} else {
if (L <= this.moiety * 2) {
L = (this.lastSide - this.firstSide) / (this.stepDistance * 2) * L
} else {
L += (this.moiety * 2);
K = false
}
}
J.position -= H
}
G = true;
J.position -= L
} else {
if (F <= this.firstSide) {
if (this.o.orientation == "vertical") {
L = (this.lastSide - this.center) / this.stepDistance * L
} else {
if (F - L > this.firstSide) {
K = true;
H = this.firstSide - F;
L += H;
if (L >= this.moiety * (-1)) {
L = (this.lastSide - this.center) / this.stepDistance * L
} else {
if (L >= this.moiety * 2 * (-1)) {
L = (this.lastSide - this.firstSide) / (this.stepDistance * 2) * L
} else {
L -= (this.moiety * 2)
}
}
J.position += H
}
}
G = true;
J.position -= L
} else {
if (F > this.firstSide && F < this.lastSide) {
L = (this.lastSide - this.center) / this.stepDistance * L;
if (F - L >= this.lastSide) {
H = this.lastSide - F;
L += H;
L = this.stepDistance / ((this.lastSide - this.center) / L);
J.position += H
} else {
if (F - L <= this.firstSide) {
if (this.o.orientation == "horizontal") {
H = F - this.firstSide;
L -= H;
L = this.stepDistance / ((this.lastSide - this.center) / L);
J.position -= H
}
} else {
K = true
}
}
J.position -= L
}
}
}
if (this.o.orientation == "horizontal") {
J.position > this.center && (I.rotate *= (-1))
} else {
I.rotate = 60 * (-1);
J.position < this.center && (I.opacity = 0.3)
}
K && (I = this.zoom(J));
G && (I.captionOpasity = 0);
if (this.o.lazyLoad) {
if (this.containerWidth > M - this.moiety && "notLoaded" === J.load) {
this.lastItemLoad = J.index;
J.load = "load";
if (this.o.stopDownload) {
this.jCallEvent("showProgress")
} else {
J.progress && J.progress.show()
}
this.queue.push({
node: J.content,
index: J.index
})
}
}
return I
},
onLazyLoad: function(F) {
if (this.lastItemLoad === F - 1) {
if (this.o.stopDownload || !this.doneFlag.two) {
this.jCallEvent("hideProgress")
}
if (!this.doneFlag.two) {
this.jCallEvent("complete")
}
}
},
renderCarousel: function(I) {
var G, H, K, F, J = this.lastPosition - I;
I || (I = 0);
this.lastPosition = I;
for (G = 0; G < this.l; G++) {
K = {
left: 0,
top: 0
};
F = {
left: 0,
top: 0
};
H = this.calcItemPosition(this.items[G], J);
K[this.p_.pos] = this.items[G].position;
F[this.p_.pos] = H.rotate;
this.items[G].node.jSetCssProp(g, "translate3d(" + K.left + "px, " + K.top + "px, " + H.translateZ + "px)rotateX(" + F.top + "deg)rotateY(" + F.left + "deg)");
this.items[G].figcaption && this.items[G].figcaption.jSetOpacity(H.captionOpasity);
if (this.o.orientation == "horizontal") {
this.items[G].node.jSetCssProp("z-index", this.zIndex(this.items[G]))
} else {
this.items[G].node.jSetOpacity(H.opacity)
}
}
},
_calcDistance: function(G) {
var F = this.itemStep;
if (G.defaultMove) {
G.goTo && (F = G.goTo);
if (G.direction == "forward") {
this.loop.firstItem = false;
if (this.last + F > this.l - 1) {
if (this.last != this.l - 1) {
F = this.l - 1 - this.last;
this.last += F;
this.loop.lastItem = true
} else {
this.last = 0;
F = this.l - 1;
this.loop.firstItem = true;
this.loop.lastItem = false;
G.direction = "backward"
}
} else {
this.last += F;
if (this.last === this.l - 1) {
this.loop.lastItem = true
}
}
} else {
this.loop.lastItem = false;
if (this.last - F < 0) {
if (this.last != 0) {
F = this.last;
this.last -= F;
this.loop.firstItem = true
} else {
this.last = this.l - 1;
F = this.l - 1;
this.loop.firstItem = false;
this.loop.lastItem = true;
G.direction = "forward"
}
} else {
this.last -= F;
if (this.last === 0) {
this.loop.firstItem = true
}
}
}
} else {
!G.direction && (G.direction = G.target >= this.last ? "forward" : "backward");
F = Math.abs(this.last - G.target);
this.last = G.target
}
this.distance = this.stepDistance * F;
return G.direction
},
_coverFlow: function(F) {
F.direction = this._calcDistance(F);
this.callback = F.callback;
this.jCallEvent("on-start-effect", {
arr: [this.last]
});
this._move(F.direction == "forward" ? this.lastPosition - this.distance : this.lastPosition + this.distance)
},
_move: function(F) {
this.nextPosition = F;
this.fx = new v.FX(this.container, {
duration: 500,
transition: this.o.timingFunction,
onBeforeRender: (function(G) {
this.renderCarousel(G.pos)
}).jBind(this),
onComplete: j(function() {
this._onComplete()
}).jBind(this)
}).start({
pos: [this.lastPosition, F]
})
},
_move2: function(G) {
var F = Math.abs(this.nextPosition - this.lastPosition) * (G || 0.2);
if (Math.abs(F) < 0.01) {
clearTimeout(this.moveTimer);
this.moveTimer = null;
this.move_ = false;
this.jCallEvent("drag-end", {
arr: [this.last]
});
return
}
if (this.nextPosition < this.lastPosition) {
F *= (-1)
}
this.renderCarousel(this.lastPosition + F);
this.moveTimer = setTimeout(this._move2.jBind(this, G), 30)
},
checkPosition: function(J, K) {
var H, G = J.position + this.moiety,
F = J.position,
I = j(function(L) {
if (G > this.firstSide && G < this.lastSide || L) {
K = (this.lastSide - this.center) / this.stepDistance * K;
if (G - K >= this.lastSide) {
H = this.lastSide - G;
K += H;
K = this.stepDistance / ((this.lastSide - this.center) / K);
F += H
} else {
if (G - K <= this.firstSide) {
if (this.o.orientation == "horizontal") {
H = G - this.firstSide;
K -= H;
K = this.stepDistance / ((this.lastSide - this.center) / K);
F -= H
}
}
}
F -= K
}
}).jBind(this);
if (G >= this.lastSide) {
if (G - K < this.lastSide) {
H = G - this.lastSide;
K -= H;
F -= H;
I(true)
} else {
F -= K
}
} else {
if (G <= this.firstSide) {
if (this.o.orientation == "vertical") {
K = (this.lastSide - this.center) / this.stepDistance * K
}
if (G - K > this.firstSide) {
H = this.firstSide - G;
K += H;
F += H;
I(true)
} else {
F -= K
}
} else {
I()
}
}
return F
},
searchIndex: function() {
var H, G, F, I = this.lastPosition - this.nextPosition;
if (this.o.orientation == "vertical") {
I *= 2
}
for (H = 0; H < this.l; H++) {
G = !G ? this.checkPosition(this.items[H], I) : F;
F = (H + 1 < this.l) ? this.checkPosition(this.items[H + 1], I) : null;
if (G + this.moiety > this.firstSide || H == this.l - 1) {
if (F && F + this.moiety >= this.lastSide || !F) {
F = 100000000
}
if (this.center - (G + this.moiety) < (F + this.moiety) - this.center) {
this.last = H
} else {
this.last = H + 1
}
if (this.last === 0) {
this.loop.firstItem = true
} else {
if (this.last === this.l - 1) {
this.loop.lastItem = true
}
}
this.nextPosition = this.center - this.last * this.stepDistance;
break
}
}
},
_initOnWheel: function() {
var G, F;
this.container.jAddEvent("mousescroll", j(function(H) {
if (true === this.o.scrollOnWheel || H.isMouse || "vertical" === this.o.orientation && Math.abs(H.deltaY) > Math.abs(H.deltaX) || "horizontal" === this.o.orientation && Math.abs(H.deltaY) < Math.abs(H.deltaX)) {
this.jCallEvent("drag-start");
this.fx && this.fx.stop();
this.fx = null;
H.stop();
F = Math.abs(H.deltaY) < Math.abs(H.deltaX) ? H.deltaX : -1 * H.deltaY;
F = H.isMouse ? (F * this.stepDistance) : (F * (8 / 13));
!H.isMouse && (F = F > 0 ? Math.min(this.stepDistance / 4, F) : Math.max(this.stepDistance / 4 * (-1), F));
this.nextPosition -= F;
clearTimeout(G);
G = setTimeout(j(function() {
this.searchIndex()
}).jBind(this), 100);
if (this.nextPosition >= this.center) {
this.nextPosition = this.center;
this.last = 0
} else {
if (this.nextPosition <= this.center - ((this.l - 1) * this.stepDistance)) {
this.nextPosition = this.center - ((this.l - 1) * this.stepDistance);
this.last = this.l - 1
}
}
if (!this.moveTimer) {
this._move2(0.08)
}
}
}).jBind(this))
},
_initDragOnScroll: function() {
var I = (this.p_.pos == "left") ? "x" : "y",
K = {
x: 0,
y: 0
},
J = {
x: 0,
y: 0
},
G = false,
F = false,
H = j(function(L) {
if ("dragstart" == L.state) {
j(document.body).jAddClass("mcs-dragging");
F = true;
K.x = J.x = L.x;
K.y = J.y = L.y;
this.loop.firstItem = false;
this.loop.lastItem = false
} else {
if (F) {
K.x = L.x;
K.y = L.y;
if ("dragend" == L.state) {
j(document.body).jRemoveClass("mcs-dragging");
F = false;
if (G) {
this.searchIndex();
G = false
}
} else {
if (this.o.orientation == "vertical" || Math.abs(L.x - J.x) > Math.abs(L.y - J.y)) {
L.stopDefaults();
if (!G) {
this.fx && this.fx.stop();
this.jCallEvent("drag-start");
clearTimeout(this.moveTimer);
this.move_ = true;
this.moveTimer = null;
G = true
}
this.nextPosition -= (J[I] - K[I]);
!this.moveTimer && this._move2()
} else {
this.move_ = false
}
J.x = K.x;
J.y = K.y
}
}
}
}).jBind(this);
this.container.jAddEvent("touchdrag mousedrag", H)
},
stop: function() {
this.fx && this.fx.stop(true);
this.fx = null;
clearTimeout(this.moveTimer);
this.moveTimer = null;
this.nextPosition && this.renderCarousel(this.nextPosition)
},
onResize: function() {
var G, F, I, H;
this.stop();
this.distance = 0;
this.containerWidth = this._sWidth();
this.allSize = 0;
for (G = 0; G < this.l; G++) {
this.items[G].size = this.items[G].node.jGetSize(true, true);
this.allSize += this.items[G].size[this.p_.size]
}
this.moiety = this.items[0].size[this.p_.size] / 2;
if (this.o.orientation == "horizontal") {
this.center = this.containerWidth / 2
} else {
this.center = this.moiety + (this.moiety / 50 * 15)
}
this.lastPosition = this.nextPosition = this.center;
if (this.o.orientation == "horizontal") {
this.firstSide = this.center - (this.moiety * 2);
this.lastSide = this.center + (this.moiety * 2)
} else {
this.firstSide = 0;
this.lastSide = this.center + this.moiety + this.moiety * 0.8
}
this.setItemsPosition();
this.renderCarousel(this.lastPosition);
this.setCanvasPosition();
F = this.last;
this.last = 0;
I = this._calcDistance({
target: F
});
H = I == "forward" ? this.lastPosition - this.distance : this.lastPosition + this.distance;
this.nextPosition = H;
this.renderCarousel(H)
},
resetZIndex: function() {
this.items.jEach(j(function(F) {
if (this.o.orientation == "horizontal") {
F.node.style.opacity = ""
} else {
F.node.jSetCssProp("z-index", "")
}
}).jBind(this))
}
});
v.extend(d.prototype, v.customEvents);
v.Scroll.CoverFlow = d;
function s(H, K, J, I) {
var G = {
width: J.width,
height: J.height
},
F = function(L) {
return L !== "auto" && !(/%$/.test(L))
};
if (I === "horizontal") {
if (F(K)) {
K = parseInt(K, 10);
if (K < G.height) {
G.height = K;
G.width = J.width / J.height * G.height
}
}
} else {
if (F(H)) {
H = parseInt(H, 10);
if (H < G.width) {
G.width = parseInt(H, 10);
G.height = J.height / J.width * G.width
}
}
}
return G
}
var B = function(I, S) {
var M, K, G, O, R, J, N, P, L = 0,
F, H, Q = "Cannot calculate scroll size.";
this.options = new v.Options(m);
this.o = this.options.get.jBind(this.options);
this.set = this.options.set.jBind(this.options);
this.options.fromJSON(window.MagicScrollOptions || {});
this.options.fromJSON((window.MagicScrollExtraOptions || {})[I.getAttribute("id") || ""] || {});
this.options.fromString(I.getAttribute("data-options") || "");
if (v.browser.mobile) {
this.options.fromJSON(window.MagicScrollMobileOptions || {});
this.options.fromJSON((window.MagicScrollMobileExtraOptions || {})[I.getAttribute("id") || ""] || {});
this.options.fromString(I.getAttribute("data-mobile-options") || "")
}
if ("string" == v.jTypeOf(S)) {
this.options.fromString(S || "")
} else {
this.options.fromJSON(S || {})
}
if (!this.o("autostart")) {
return false
}
this.original = j(I).jStore("scroll", this);
v.$uuid(this);
this.scrollReady = false;
if (v.browser.ieMode) {
v.$A(I.getElementsByTagName("a")).jEach(function(T) {
T.href = T.href
});
v.$A(I.getElementsByTagName("img")).jEach(function(T) {
T.src = T.src
})
}
this.originalClasses = j(I).getAttribute("class") || j(I).getAttribute("className");
this.originalNodes = [];
this._insideOptions = {
autoplay: this.o("autoplay"),
pause: true,
debug: false,
progress: true,
continuous: false,
maxSize: "scroll",
stopDownload: true,
timingFunctionDefault: "cubic-bezier(.8, 0, .5, 1)",
itemSettings: "auto"
};
this.id = I.getAttribute("id") || "MagicScroll-" + Math.floor(Math.random() * v.now());
this.container = I.jStore("scroll", this);
this.wrapper = v.$new("div", {
"class": "mcs-wrapper"
}, {
display: "inline-block"
});
this.itemsContainer = v.$new("div", {
"class": "mcs-items-container"
});
this.scrollReady = false;
for (M = this.container.childNodes.length - 1; M >= 0; M--) {
G = this.container.childNodes[M];
if (G.nodeType === 3 || G.nodeType === 8) {
this.container.removeChild(G)
} else {
this.originalNodes.push(G)
}
}
if (this.originalNodes.length === 0) {
return
}
J = function(U) {
var T = function(X) {
var W = U.childNodes[X],
V = W.tagName.toLowerCase();
if ("br" === V || "hr" === V) {
return T(++X)
} else {
return W
}
};
return T(0)
};
P = J(this.container);
if (P.tagName == "FIGURE") {
P = j(P).byTag("IMG")[0] || P.firstChild
}
if (P.tagName == "A") {
P = j(P).byTag("IMG")[0] || P.firstChild
}
this.tagImg = false;
if (P.tagName == "IMG") {
this.tagImg = P;
N = P.getAttribute("data-src");
if (N) {
N = (N + "").jTrim();
if ("" != N) {
P.setAttribute("src", N)
}
}
}
this.coreTimeout = null;
F = j(function(T) {
this.coreTimeout = setTimeout(j(function() {
this.firstItemSize = j(J(this.container)).jGetSize();
if (this.firstItemSize.height == 0) {
if (L < 100) {
L++;
F(T)
}
} else {
clearTimeout(this.coreTimeout);
T()
}
}).jBind(this), 100)
}).jBind(this);
F(j(function() {
this.cachedCSS = j([]);
O = v.$A(this.container.childNodes);
this.firstItem = O[0];
j(O[0]).jSetCssProp("display", "none");
this.itemCss = {
size: E(O[0]),
border: r(O[0]),
padding: i(O[0]),
margin: n(O[0])
};
O[0].jSetCssProp("display", "inline-block");
this.container.jSetCssProp("display", "none");
this.containerCssSize = E(this.container);
this.container.jSetCssProp("display", "inline-block");
this.sizeFirstImg = null;
this.setupOptions();
this.firstItemSize = s(this.originwidth, this.originheight, this.firstItemSize, this.o("orientation"));
if (this._insideOptions.progress) {
this.progress = new v.Modules.Progress(this.container)
}
this.initBullets();
this.initEffect_();
H = j(function() {
var U, W = true,
T = {};
this.hashBox = v.$new("div", null, {
position: "absolute",
left: "-10000px",
top: "-10000px"
}).jAppendTo(document.body);
this.show();
for (M = 0, K = O.length; M < K; M++) {
U = O[M].tagName.toLowerCase();
if (W) {
if ("br" === U || "hr" === U) {
continue
}
} else {
if ("br" === U || "hr" === U) {
continue
}
}
try {
if (p) {
o.append(v.$new("div", {}, {
display: "none",
visibility: "hidden"
}).append(document.createTextNode(p)));
p = undefined
}
} catch (V) {}
W = false;
j(O[M]).jSetOpacity(0).jSetCssProp("display", "inline-block");
this.push(O[M], T);
T = {};
if (M == K - 1) {
this.done()
}
}
}).jBind(this);
new v.QImageLoader([{
node: O[0]
}], {
queue: 1,
onerror: function(T) {
throw "Error: MagicScroll: Error loading image - " + T.img.src + ". " + Q
},
onload: (function(T, U) {
this.sizeFirstImg = (T.img) ? T.img.jGetSize() : T.size;
this.sizeFirstImg = s(this.originwidth, this.originheight, this.sizeFirstImg, this.o("orientation"));
if (U.node.tagName.toLowerCase() == "figure") {
v.$A(U.node.childNodes).jEach(j(function(W) {
if (W.tagName && W.tagName.toLowerCase() == "figcaption") {
var V = n(j(W));
this.sizefigcaption = W.jGetSize();
this.sizefigcaption.width += V.width;
this.sizefigcaption.height += V.height;
this.sizeFirstImg.height += this.sizefigcaption.height
}
}).jBind(this))
}
H()
}).jBind(this)
})
}).jBind(this))
};
v.extend(B.prototype, {
hovered: false,
setupOptions: function() {
if ("animation" == this.o("mode") && (v.browser.ieMode || !v.browser.features.animation)) {
this.set("mode", "scroll")
}
if (v.browser.ieMode && v.browser.ieMode <= 9 && this.o("mode") == "cover-flow") {
this.set("mode", "scroll")
}
this._insideOptions.debug = document.location.hash.indexOf("#magic-debug-mode") != -1;
if (v.jTypeOf(this.o("items")) === "array") {
this._insideOptions.itemSettings = this.o("items");
j(function() {
var H, J, G, I = this._insideOptions.itemSettings,
F = I.length;
for (H = 0; H < F; H++) {
for (J = H + 1; J < F; J++) {
if (I[H][0] < I[J][0]) {
G = I[H];
I[H] = I[J];
I[J] = G
}
}
}
this._insideOptions.itemSettings = I
}).jBind(this)();
this.set("items", "auto")
}
if (this.o("speed") === 0) {
this.set("speed", 10)
}
if (this.o("autoplay") < 0 || this.o("step") == 0) {
this._insideOptions.continuous = true
}
if (j(["cover-flow", "animation"]).contains(this.o("mode"))) {
this._insideOptions.continuous = false
}
if ("off" === this.o("loop") || "false" === this.o("loop")) {
this.set("loop", false)
}
if (this.o("mode") == "carousel" || this._insideOptions.continuous) {
this.set("loop", "infinite")
}
if (this.o("mode") == "cover-flow") {
this.set("loop", false)
}
if ("rewind" === this.o("loop") && "animation" === this.o("mode")) {
this.set("loop", false)
}
if (j(["cover-flow", "carousel"]).contains(this.o("mode")) || this._insideOptions.continuous) {
this.set("pagination", false)
}
if (j(["cover-flow", "carousel"]).contains(this.o("mode")) && !this._insideOptions.continuous) {
this.set("step", 1)
}
if (j(["cover-flow", "carousel"]).contains(this.o("mode")) && !j(["auto", "fit"]).contains(this.o("items"))) {
this.set("items", "auto")
}
if (this.o("mode") == "animation" && this.o("items") == "auto") {
this.set("items", "fit")
}
if (this.o("mode") == "animation") {
this.set("step", "auto")
}
if (this._insideOptions.continuous) {
this.set("easing", "cubic-bezier(0, 0, 1, 1)")
} else {
if (this.o("easing") == "cubic-bezier(0, 0, 1, 1)") {
this.set("easing", this._insideOptions.timingFunctionDefault)
}
}
if ("carousel" === this.o("mode")) {
this.set("lazyLoad", false)
}
if (j(["cover-flow", "carousel"]).contains(this.o("mode"))) {
this._insideOptions.itemSettings = "auto"
}
this.originwidth = this.o("width");
this.originheight = this.o("height");
if (this._insideOptions.continuous) {
this.set("autoplay", 0)
}
if (j(["cover-flow", "carousel"]).contains(this.o("mode")) || this._insideOptions.continuous) {
this.set("arrows", false)
}
if ("false" === this.o("arrows") || "off" === this.o("arrows")) {
this.set("arrows", false)
}
if (this.o("arrows")) {
this.container.jAddClass("MagicScroll-arrows-" + this.o("arrows"))
}
this.container.jAddClass("MagicScroll-" + this.o("orientation"));
this.container.setAttribute("data-mode", this.o("mode"))
},
initBullets: function() {
if (!this.o("pagination")) {
if (this.bullets) {
this.bullets.jRemove();
this.bullets = null
}
return
}
if (!this.bullets) {
this.bullets = new v.Modules.Bullets({}, this.container, j(function() {
return this.hold_
}).jBind(this));
this.container.jAddClass("MagicScroll-bullets");
this.bullets.bindEvent("bullets-click", j(function(F) {
this.jump({
direction: F.direction,
target: F.jumpIndex
})
}).jBind(this))
}
},
setBullets: function() {
var G, F = j([]);
if (!this.effect) {
return
}
for (G = 0; G < this.effect.l; G++) {
if (j(["scroll", "animation"]).contains(this.o("mode"))) {
if (G % this.effect.itemStep == 0) {
F.push(this.effect.items[G].index)
}
} else {
F.push(this.effect.items[G].index)
}
}
this.bullets.push(F)
},
setupArrows: function() {
var F = i(this.container);
if (this.arrows) {
this.arrows.jRemove();
this.arrows = null
}
this.wrapper.jSetCss({
top: "",
left: "",
right: "",
bottom: ""
});
if (this.o("arrows")) {
if (!this.arrows) {
this.arrows = new v.Modules.ArrowsPair({
orientation: "mcs-" + this.o("orientation"),
"class": "mcs-button",
classHidden: "mcs-hidden",
classDisabled: "mcs-disabled"
}, this.container);
this.effect.bindEvent("disable", this.arrows.disable.jBind(this.arrows, undefined));
this.effect.bindEvent("enable", this.arrows.enable.jBind(this.arrows, undefined));
this.effect.bindEvent("hideArrows", this.arrows.hide.jBind(this.arrows, undefined));
this.effect.bindEvent("showArrows", this.arrows.show.jBind(this.arrows, undefined));
if (!this.o("loop")) {
this.effect.bindEvent("scroll", this.arrows.enable.jBind(this.arrows, undefined));
this.effect.bindEvent("last-frame", this.arrows.disable.jBind(this.arrows, "next"));
this.effect.bindEvent("first-frame", this.arrows.disable.jBind(this.arrows, "prev"))
}
this.arrows.bindEvent("forward", (function(J) {
this.jump("forward")
}).jBind(this));
this.arrows.bindEvent("backward", (function(J) {
this.jump("backward")
}).jBind(this))
} else {
this.arrows.setOrientation(this.o("orientation"))
}
if (this.o("arrows") == "outside") {
var I = this.o("orientation") == "horizontal" ? j(["left", "right"]) : j(["top", "bottom"]),
G = this.o("orientation") == "horizontal" ? "width" : "height",
H = parseInt(this.arrows.next.jGetSize()[G]);
I.jEach(j(function(J) {
this.wrapper.jSetCssProp(J, H + (F[G] / 2))
}).jBind(this))
}
}
},
setContainerSize: function() {
if (this.o("width") != "auto") {
this.container.jSetCssProp("width", this.o("width"))
}
if (this.o("height") != "auto") {
this.container.jSetCssProp("height", this.o("height"))
}
if (this.o("orientation") == "horizontal" && this.o("rwd")) {
var G = this.container.jGetSize(),
F = r(this.container);
if (!this.cssId) {
if (v.browser.ieMode && v.browser.ieMode < 9) {
v.$new("div", null, {
display: "inline-block",
"vertical-align": "top",
"padding-top": this.firstItemSize.height / (parseInt(G.width) - F.width) * 100 + "%"
}).jAppendTo(this.container)
} else {
this.cssId = v.addCSS("#" + this.id + ":before", {
"padding-top": this.firstItemSize.height / (parseInt(G.width) - F.width) * 100 + "%"
})
}
this.container.jSetCssProp("height", "");
if (this.cssId > -1) {
this.cachedCSS.push(this.cssId)
}
}
}
},
initEffect_: function() {
var F = j(["scroll", "animation"]).contains(this.o("mode")) ? "effect" : this.o("mode");
this.effect = new v.Scroll[("-" + F).jCamelize()](this.itemsContainer, {
orientation: this.o("orientation"),
duration: this.o("speed"),
continuous: this._insideOptions.continuous,
timingFunction: this.o("easing"),
loop: this.o("loop"),
step: this.o("step"),
effect: this.o("mode"),
lazyLoad: this.o("lazyLoad"),
progress: this._insideOptions.progress,
stopDownload: this._insideOptions.stopDownload,
debug: this._insideOptions.debug,
scrollOnWheel: this.o("scrollOnWheel"),
draggable: this.o("draggable"),
keyboard: this.o("keyboard")
});
if (this.o("items") != "auto" && this.o("step") == "auto") {
this.set("step", this.o("items"))
}
this.effect.bindEvent("hold", j(function() {
this.hold_ = false;
this.auto()
}).jBind(this))
},
jump: function(F, G) {
if (this.o("mode") == "animation" && /^\+|^\-/.test(F)) {
F = /^\+/.test(F) ? "forward" : "backward"
}
if (!this.hold_ && !this.effect.stopScroll) {
this.hold_ = true;
clearTimeout(this.auto_);
this.effect.jump(F, j(function(H, I) {
this.hold_ = false;
if (I) {
return
}
this.jCallEvent("after-scroll");
if (!this._insideOptions.continuous || this.hovered || this.pause_) {
if (this.hashBox.childNodes.length == 0) {
this.hashBox.jRemove()
}
if (this.o("loop")) {
this.effect.changeClones()
}
this.o("onMoveEnd")({
id: this.id,
items: H
});
this.effect.continuousMove = false;
G && G()
} else {
this.jump("forward", G)
}
}).jBind(this))
}
},
parseTag: function(K) {
var G, J, H, F, I;
if (K.tagName.toUpperCase() == "A") {
if ((F = j(K).byTag("IMG")[0])) {
if ((I = j(K).byTag("span")[0]) && "" !== I.innerHTML.jTrim()) {
J = j(I.cloneNode(true)).jAddClass("mcs-caption");
J.setAttribute("magic-user", "yes")
} else {
if (((G = F.nextSibling) && 3 == G.nodeType && "" !== G.nodeValue.jTrim()) || (I && (G = I.nextSibling) && 3 == G.nodeType && "" !== G.nodeValue.jTrim())) {
J = v.$new("span", {
"class": "mcs-caption"
}).append(G.cloneNode(true))
}
}
for (H = K.childNodes.length - 1; H >= 0; H--) {
if (F !== K.childNodes[H]) {
K.removeChild(K.childNodes[H])
}
}
if (J) {
K.append(J)
}
}
} else {
if (K.tagName.toLowerCase() == "figure") {
v.$A(K.childNodes).jEach(j(function(L) {
if (L.tagName && L.tagName.toLowerCase() == "figcaption") {
G = L.getAttribute("id") || "figcaption-" + Math.floor(Math.random() * v.now());
L.setAttribute("id", G);
j(L).jAddClass("mcs-caption");
J = L;
this.cssId = v.addCSS("#" + G + ":before", {
"padding-top": (this.sizefigcaption.height + r(j(L)) / 2) / parseInt(this.firstItemSize.width) * 100 + "%"
})
}
}).jBind(this))
}
}
return {
node: K,
figcaption: J
}
},
setPercent: function(F) {
if (this.o("items") != "auto") {
F.node.jSetCssProp(this.o("orientation") == "horizontal" ? "width" : "height", 100 / this.o("items") + "%")
}
},
checkWholeItems: function(G) {
var H, F;
if (this.o("items") == "fit") {
this.set("items", Math.floor(this.wrapper.jGetSize()[this.effect.p_.size] / this.sizeFirstImg[this.effect.p_.size]))
} else {
if (this.o("items") == "auto") {
if (!this.itemCss.size[this.effect.p_.size]) {
H = this.sizeFirstImg[this.effect.p_.size] || this.firstItemSize[this.effect.p_.size];
F = this.itemsContainer.jGetSize();
if ("vertical" === this.o("orientation")) {
H = Math.min(H, F[this.effect.p_.size])
}
F = (H + n(G.content)[this.effect.p_.size] + r(G.content)[this.effect.p_.size] + i(G.content)[this.effect.p_.size] + i(G.node)[this.effect.p_.size]) / this.itemsContainer.jGetSize()[this.effect.p_.size] * 100;
if (F > 100) {
F = 100
}
G.node.jSetCssProp(this.effect.p_.size, F + "%")
}
}
}
},
push: function(G, F) {
G.show();
G = {
content: G
};
if (F.top) {
F.top.jEach(function(I) {
I.jRemove()
})
}
if (F.bottom) {
F.bottom.jEach(function(I) {
I.jRemove()
})
}
G.additionalTags = F;
var H = this.parseTag(G.content);
G.content = H.node;
G.figcaption = H.figcaption;
G.node = v.$new("div", {
"class": "mcs-item"
});
G.node.jAppendTo(this.itemsContainer);
this.checkWholeItems(G);
this.setPercent(G);
G.content.jAppendTo(this.hashBox);
this.effect.push(G)
},
show: function() {
if (this.indoc) {
return
}
this.indoc = true;
this.container.append(this.wrapper.append(this.itemsContainer)).show().setAttribute("id", this.id);
this.container.jSetCssProp("display", "inline-block");
if (this.o("arrows")) {
this.setupArrows();
this.o("loop") && this.arrows.disable("prev");
this.arrows.hide()
}
this.checkSizes_();
this.setContainerSize();
if (this.tagImg) {
if ("horizontal" === this.o("orientation") && this.container.jGetSize().width < this.sizeFirstImg.width) {
this.checkSizes_(true);
this.setContainerSize()
}
}
this.countTheNumberOfItems();
j(window).jAddEvent("resize", this.onResize.jBind(this))
},
done: function(F) {
this.effect.bindEvent("key_down", j(function(G) {
this.jump(G.direction)
}).jBind(this));
this.effect.bindEvent("show-this", j(function(G) {
this.jump(G.index)
}).jBind(this));
this.effect.bindEvent("showProgress", j(function() {
this.progress && this.progress.show()
}).jBind(this));
this.effect.bindEvent("hideProgress", j(function() {
this.progress && this.progress.hide()
}).jBind(this));
this.effect.bindEvent("complete", j(function() {
this.effect.done2(j(function() {
this.effect.bindEvent("disableHold", j(function() {
this.hold_ = false
}).jBind(this));
this.effect.bindEvent("item-click", j(function(I) {
var H = true,
G, J;
if (this.o("mode") == "carousel") {
G = 360 / this.effect.l;
J = (360 - this.effect.last * G + I.index * G) % 360;
if (J > 90 && J < 270) {
H = false
}
}
H && this.jump(I.index)
}).jBind(this));
if (this.bullets) {
this.bullets.o.items = this.effect.items.length;
this.setBullets();
this.bullets.show()
}
this.effect.bindEvent("on-item-hover", j(function(G) {
this.o("onItemHover")({
id: this.id,
item: G.itemIndex
})
}).jBind(this));
this.effect.bindEvent("on-item-out", j(function(G) {
this.o("onItemOut")({
id: this.id,
item: G.itemIndex
})
}).jBind(this));
this.effect.bindEvent("on-start-effect", j(function(G) {
this.bullets && this.bullets.setActiveBullet(G.arr, !this.o("loop") || this.o("loop") === "rewind");
this.o("onMoveStart")({
id: this.id,
items: G.arr
})
}).jBind(this));
this.effect.bindEvent("drag-start", j(function() {
this.hold_ = true;
this.o("onMoveStart")({
id: this.id,
items: []
});
this.auto()
}).jBind(this));
this.effect.bindEvent("drag-end", j(function(G) {
this.bullets && this.bullets.setActiveBullet(G.arr, !this.o("loop"));
this.hold_ = false;
this.o("onMoveEnd")({
id: this.id,
items: G.arr
});
if (this.hashBox.childNodes.length == 0) {
this.hashBox.jRemove()
}
this.auto()
}).jBind(this));
this.container.jSetCssProp("overflow", "visible");
this.scrollReady = true;
this.o("onReady").call(this, this.id);
this.o("rwd") && this.container.jAddClass("mcs-height-auto");
j(window).jAddEvent("resize", j(function() {
this.hold_ = false;
if (this._insideOptions.continuous) {
this.jump.jBind(this, "forward").jDelay(200)
} else {
this.auto()
}
}).jBind(this));
this.setEvent();
if ("vertical" === this.o("orientation") && /%$/.test(this.o("height"))) {
this.set("height", this.container.jGetSize().height);
this.setContainerSize()
}
if (this.o("autoplay") != 0) {
this.auto()
} else {
this.pause_ = true
}
if (this._insideOptions.continuous) {
this.pause_ = false;
this.jump.jBind(this, "forward").jDelay(200)
}
this.scrollReady = true
}).jBind(this))
}).jBind(this));
this.effect.done()
},
setEvent: function() {
this.bindEvent("after-scroll", j(function() {
if (this._insideOptions.autoplay != 0) {
!this._insideOptions.continuous && this.auto()
}
}).jBind(this));
if (!v.browser.touchScreen && (this._insideOptions.pause || this._insideOptions.continuous)) {
this.wrapper.jAddEvent("mouseover mouseout", j(function(G) {
G.stop();
var F = G.getRelated();
while (F && F !== this.wrapper) {
F = F.parentNode
}
if (F == this.wrapper) {
return
}
if (this._insideOptions.pause && !this.pause_) {
this.pauseHover_ = "mouseover" == G.type;
this.hovered = "mouseover" == G.type;
if (this._insideOptions.continuous) {
if (G.type == "mouseover") {
this.pauseContinuous()
} else {
this.jump("forward")
}
} else {
this.auto()
}
}
}).jBind(this))
}
if (!this._insideOptions.continuous && "animation" === this.o("mode") && this.o("scrollOnWheel")) {
this.wrapper.jAddEvent("mousescroll", j(function(F) {
var G = -1 * (Math.abs(F.deltaY) < Math.abs(F.deltaX) ? F.deltaX : -1 * F.deltaY);
G = F.isMouse ? (G) : (G * (8 / 54));
if ((true === this.o("scrollOnWheel") && F.isMouse) || "vertical" === this.o("orientation") && Math.abs(F.deltaY) > Math.abs(F.deltaX) || "horizontal" === this.o("orientation") && Math.abs(F.deltaY) < Math.abs(F.deltaX)) {
F.stop();
if (Math.abs(G) < 0.6) {
return
}
this.jump(G > 0 ? "backward" : "forward")
}
}).jBind(this))
}
},
checkSizes_: function(N) {
var M = "width",
O = "height",
J = this.o("orientation") == "vertical",
F = this.container.jGetSize(),
I = {
width: 0,
height: 0
},
K = i(this.container),
R = r(this.wrapper),
V = n(this.wrapper),
P = i(this.wrapper),
Q = n(this.firstItem),
L = v.$new("div", {
"class": "mcs-item"
}).jAppendTo(this.wrapper.firstChild),
S, T, H, U, G = i(L);
L.jRemove();
if (this.container.jGetCss("box-sizing") == "border-box") {
I = r(this.container)
}
if (J) {
M = O;
O = "width"
}
if (this.o(M) == "auto" && !parseInt(this.containerCssSize[M])) {
if (J) {
if (!isNaN(this.o("items"))) {
this.set(M, F[M] * this.o("items"))
} else {
this.set(M, F[M])
}
} else {
this.set(M, "100%")
}
}
if (this.o(O) == "auto" && !parseInt(this.containerCssSize[O]) || N) {
H = I[O] + K[O] + R[O] + Q[O] + G[O];
if (J) {
S = Math.min(this.sizeFirstImg[O], F[O])
} else {
if (this.tagImg) {
S = this.sizeFirstImg[O];
T = this.sizeFirstImg[O] / this.sizeFirstImg[M];
if (this.sizeFirstImg[M] > F[M]) {
S = F[M] * T
}
}
}
U = (S + n(j(this.originalNodes[0]))[O] + i(this.originalNodes[0])[O] + r(this.originalNodes[0])[O]) || this.firstItemSize[O] || F[O];
U += H;
U += "";
this.set(O, U)
}
},
countTheNumberOfItems: function() {
var I, H, G, K, J = true,
F = this.o("items");
if (this._insideOptions.itemSettings != "auto" && j(["scroll", "animation"]).contains(this.o("mode"))) {
K = this._insideOptions.itemSettings;
G = K.length;
H = this._insideOptions.maxSize == "scroll" ? this.container.jGetSize()[this.o("orientation") == "vertical" ? "height" : "width"] : j(window).jGetSize()[this.o("orientation") == "vertical" ? "height" : "width"];
for (I = G - 1; I >= 0; I--) {
if (H <= K[I][0] && !isNaN(K[I][1])) {
this.set("items", K[I][1]);
J = false;
break
} else {
if (0 === I) {
if (j(["carousel", "cover-flow"]).contains(this.o("mode"))) {
this.set("items", 1)
} else {
if ("animation" === this.o("mode")) {
this.set("items", "fit")
} else {
this.set("items", "fit")
}
}
}
}
}
if (F === this.o("items")) {
return
}
v.$A(this.itemsContainer.childNodes).jEach(j(function(M, L) {
this.checkWholeItems({
node: M,
content: M.firstChild
});
this.setPercent({
node: M
})
}).jBind(this));
if (this.effect.items.length > 0) {
this.effect.update()
}
}
},
onResize: function() {
this.countTheNumberOfItems()
},
resize: function() {
if (this.scrollReady) {
this.onResize();
this.effect.onResize()
}
},
pauseContinuous: function() {
this.effect.pause()
},
stop: function() {
this.container.jStore("swap-items-opacity", false);
this.effect && this.effect.stop();
this.hold_ = false;
clearTimeout(this.auto_);
this.auto_ = false
},
checkEffect: function(F) {
return F == this.o("mode")
},
registerCallback: function(G, F) {
if (!j(["onItemHover", "onItemOut", "onReady", "onMoveStart", "onMoveEnd"]).contains(G)) {
return
}
this.set(G, F)
},
dispose: function() {
var F, G, H;
this.stop();
clearTimeout(this.coreTimeout);
this.wrapper.jRemoveEvent("mouseover mouseout");
this.wrapper.jRemoveEvent("mousewheel");
this.effect && this.effect.dispose();
if (this.cachedCSS) {
for (F = 0; F < this.cachedCSS.length; F++) {
v.removeCSS("magicscroll-css", this.cachedCSS[F])
}
}
this.container.jRemoveClass("MagicScroll-bullets");
j(this.originalNodes).jEach(j(function(I) {
if (I.parentNode) {
j(I).jRemove()
}
H = I;
if (H.tagName == "FIGURE") {
H = H.firstChild
}
if (H.tagName == "A") {
H = H.firstChild
}
if (H && H.tagName == "IMG") {
G = H.getAttribute("data-src");
if (G) {
G = (G + "").jTrim();
if ("" != G) {
H.removeAttribute("src")
}
}
}
if (I.childNodes.length > 0 && I.tagName.toLowerCase() == "a") {
v.$A(I.childNodes).jEach(j(function(J) {
if (J.tagName && J.tagName.toLowerCase() == "span") {
J = j(J);
if ("yes" === J.getAttribute("magic-user")) {
J.removeAttribute("magic-user");
I.append(J)
} else {
I.append(J.childNodes[0]);
J.jRemove()
}
}
}).jBind(this))
}
I.jSetCss({
visibility: "",
opacity: "1"
})
}).jBind(this));
this.hashBox && this.hashBox.jRemove();
v.$A(this.container.childNodes).jEach(function(I) {
j(I).kill()
});
j(this.container).removeAttribute("data-mode");
j(this.container).jClearEvents().jRemoveClass().jAddClass(this.originalClasses);
this.container.jSetCss({
width: "",
height: "",
visibility: "",
display: "",
overflow: ""
});
this.container.jDel("scroll");
for (F = this.originalNodes.length - 1; F >= 0; F--) {
j(this.originalNodes[F]).jSetCss({
opacity: ""
}).jAppendTo(this.container)
}
this.o("onStop").call(this, this.id);
return null
},
play: function(F) {
if (null === F || undefined === F) {
F = this.o("autoplay")
} else {
F || (F = 1000);
F = parseInt(F);
if (isNaN(F)) {
F = this.o("autoplay")
}
}
if (!this.pause_) {
return
}
if (!this.auto_) {
this.pause_ = false;
this.effect.continuousPause = false;
this._insideOptions.autoplay = F;
this.jump("forward")
}
},
pause: function() {
if (this.pause_) {
return
}
this.pause_ = true;
if (this._insideOptions.continuous) {
this.pauseContinuous()
} else {
this.stop()
}
this.auto()
},
updateOptions: function(F) {
var I, H = {
height: "",
width: ""
},
G = this.o("mode");
this.stop();
this.container.jRemoveClass("MagicScroll-arrows-" + this.o("arrows"));
this.container.jRemoveClass("MagicScroll-" + this.o("orientation"));
this.wrapper.jRemoveEvent("mouseover mouseout mousewheel");
this.destroyEvent("after-scroll");
this.progress = null;
this.container.jRemoveClass("MagicScroll-bullets");
if ("string" == v.jTypeOf(F)) {
this.options.fromString(F || "")
} else {
this.options.fromJSON(F || {})
}
if (G != this.o("mode")) {
return false
}
this._insideOptions.autoplay = this.o("autoplay");
this.setupOptions();
this.effect.items.jEach(j(function(J) {
J.node.jSetCss(H)
}).jBind(this));
this.effect.itemsFirstClones.jEach(j(function(J) {
j(J).node.jSetCss(H)
}).jBind(this));
this.effect.itemsLastClones.jEach(j(function(J) {
j(J).node.jSetCss(H)
}).jBind(this));
this.setupArrows();
for (I = 0; I < this.cachedCSS.length; I++) {
this.cachedCSS[I] && v.removeCSS("magicscroll-css", this.cachedCSS[I])
}
this.effect.setNewOptions({
orientation: this.o("orientation"),
duration: this.o("speed"),
continuous: this._insideOptions.continuous,
timingFunction: this.o("easing"),
loop: this.o("loop"),
step: this.o("step"),
effect: this.o("mode"),
lazyLoad: this.o("lazyLoad"),
progress: this._insideOptions.progress,
stopDownload: this._insideOptions.stopDownload,
debug: this._insideOptions.debug,
scrollOnWheel: this.o("scrollOnWheel"),
draggable: this.o("draggable"),
keyboard: this.o("keyboard")
});
this.checkSizes_();
this.setContainerSize();
this.countTheNumberOfItems();
v.$A(this.itemsContainer.childNodes).jEach(j(function(K, J) {
this.checkWholeItems({
node: K,
content: K.firstChild
});
this.setPercent({
node: K
})
}).jBind(this));
this.effect.update(true);
this.initBullets();
if (this.bullets) {
this.setBullets();
this.bullets.show()
}
if (this.o("autoplay") == 0) {
this.pause()
} else {
this.pause_ = false
}
this.o("arrows") && this.arrows.show();
this.setEvent();
if (this._insideOptions.continuous) {
this.jump.jBind(this, "forward").jDelay(200);
this.pause_ = false
} else {
this.auto()
}
return true
},
auto: function() {
var F = "forward";
clearTimeout(this.auto_);
this.auto_ = false;
if (this.hold_ || this.pause_ || this.pauseHover_) {
return
}
if (this._insideOptions.autoplay != 0) {
this.auto_ = setTimeout(j(function() {
this.jump(F)
}).jBind(this), Math.abs(this._insideOptions.autoplay))
}
}
});
v.extend(B.prototype, v.customEvents);
v.Scroll.Full = B;
var C = function(G) {
var F = h(G);
if (!F) {
return
}
return {
registerCallback: F.registerCallback.jBind(F),
pause: F.pause.jBind(F),
play: j(function(H) {
this.play(H)
}).jBind(F),
forward: j(function(H) {
H = !H ? "forward" : a(H, "+");
this.jump(H)
}).jBind(F),
backward: j(function(H) {
H = !H ? "backward" : a(H, "-");
this.jump(H)
}).jBind(F),
jump: j(function(H) {
if (!H || isNaN(Math.abs(parseInt(H)))) {
H = "forward"
}
this.jump(H)
}).jBind(F),
updateOptions: j(function(H) {
if (!H || v.jTypeOf(H) != "object") {
H = {}
}
this.updateOptions(H)
}).jBind(F)
}
},
h = function(G) {
var F = null;
if (v.jTypeOf(G) == "string" && j(G) || v.jTypeOf(G) == "element") {
F = j(G).jFetch("scroll")
} else {
if (v.jTypeOf(G) == "function" && (G instanceof v.Scroll.Full) || G && G.indoc) {
F = G
}
}
return F
},
e = function(H, I, G) {
var F = h(H);
if (F) {
if (F.scrollReady) {
return F[G](I)
} else {
return false
}
} else {
I = H;
H = z
}
j(H).jEach(function(J) {
if (J.scrollReady) {
J[G](I)
}
})
},
a = function(G, F) {
if (v.jTypeOf(G) === "string") {
G = parseInt(G);
if (isNaN(G)) {
G = G
}
}
if (v.jTypeOf(G) === "number") {
G = F + G
}
return G
},
x = function(G) {
var F = v.$A((G || document).byClass("MagicScroll")).map(function(H) {
return q.start(H)
});
l = true;
return F
},
l = false,
A = function(F) {
return z = j(z).filter(function(G) {
return G.dispose()
})
},
z = [],
q = {
version: "v2.0.40",
start: function(G) {
var F = null;
if (arguments.length) {
G = j(G);
if (G && j(G).jHasClass("MagicScroll")) {
if (F = j(G).jFetch("scroll")) {
return F
} else {
F = new v.Scroll.Full(G, l ? {
autostart: true
} : {});
if (!F.o("autostart")) {
F = null;
return false
} else {
z.push(F);
return F
}
}
} else {
return false
}
} else {
return x()
}
},
stop: function(F) {
if (arguments.length) {
F = (F instanceof v.Scroll.Full) ? F : (j(F) && j(F).jFetch("scroll") || null);
if (!F) {
return
}
z.splice(j(z).indexOf(F), 1);
F.dispose()
} else {
A();
return
}
},
refresh: function(F) {
if (F) {
q.stop(F);
return q.start(F.id || F)
} else {
A();
return x()
}
},
running: function(H) {
var G, F = false;
if (H) {
G = h(H);
if (G) {
F = G.scrollReady
}
}
return F
},
getInstance: function(F) {
return C(F)
},
updateOptions: function(F, G) {
return e(F, G, "updateOptions")
},
resize: function(F) {
if (F) {
e(F, null, "resize")
} else {
j(z).jEach(function(G) {
q.resize(G)
})
}
},
jump: function(F, G) {
if (undefined != F && null != F) {
e(F, G, "jump")
}
},
pause: function(F) {
e(F, null, "pause")
},
play: function(F, G) {
e(F, G, "play")
},
forward: function(F, G) {
var H;
G = !G ? "forward" : a(G, "+");
if (!F) {
F = G
} else {
if (!h(F)) {
F = a(F, "+")
}
}
e(F, G, "jump")
},
backward: function(F, G) {
var H;
G = !G ? "backward" : a(G, "-");
if (!F) {
F = G
} else {
if (!h(F)) {
F = a(F, "-")
}
}
e(F, G, "jump")
}
};
j(document).jAddEvent("domready", function() {
p = p();
o = v.$new("div", {
"class": "msc-tmp-hdn-holder"
}).jAppendTo(document.body);
v.defined(window.MagicScrollOptions) || (window.MagicScrollOptions = {});
v.defined(window.MagicScrollMobileOptions) || (window.MagicScrollMobileOptions = {});
v.defined(window.MagicScrollExtraOptions) || (window.MagicScrollExtraOptions = {});
v.defined(window.MagicScrollMobileExtraOptions) || (window.MagicScrollMobileExtraOptions = {});
var F = window.MagicScrollMobileExtraOptions.beforeInit || window.MagicScrollExtraOptions.beforeInit || window.MagicScrollMobileOptions.beforeInit || window.MagicScrollOptions.beforeInit || v.$F;
F();
q.start.jDelay(10)
});
return q
})();
#5 JavaScript::Eval (size: 18355) - SHA256: f2770160cf74ff237e024d73350012f3a67bfb46c7518e18f4242be24ceb69dd
/**
* 2016 Revolution Slider
*
* @author SmatDataSoft <support@smartdatasoft.com>
* @copyright 2016 SmatDataSoft
* @license private
* @version 5.1.3
* International Registered Trademark & Property of SmatDataSoft
*/
/********************************************
* REVOLUTION 5.1 EXTENSION - VIDEO FUNCTIONS
* @version: 1.1.3 (13.11.2015)
* @requires jquery.themepunch.revolution.js
* @author ThemePunch
*********************************************/
! function() {
function e(e) {
return void 0 == e ? -1 : jQuery.isNumeric(e) ? e : e.split(":").length > 1 ? 60 * parseInt(e.split(":")[0], 0) + parseInt(e.split(":")[1], 0) : e
}
var t = jQuery.fn.revolution,
a = t.is_mobile();
jQuery.extend(!0, t, {
resetVideo: function(t) {
switch (t.data("videotype")) {
case "youtube":
{
t.data("player")
}
try {
if ("on" == t.data("forcerewind") && !a) {
var i = e(t.data("videostartat"));
i = -1 == i ? 0 : i, t.data("player").seekTo(i), t.data("player").pauseVideo()
}
} catch (o) {}
0 == t.find(".tp-videoposter").length && punchgs.TweenLite.to(t.find("iframe"), .3, {
autoAlpha: 1,
display: "block",
ease: punchgs.Power3.easeInOut
});
break;
case "vimeo":
var d = $f(t.find("iframe").attr("id"));
try {
if ("on" == t.data("forcerewind") && !a) {
var i = e(t.data("videostartat"));
i = -1 == i ? 0 : i, d.api("seekTo", i), d.api("pause")
}
} catch (o) {}
0 == t.find(".tp-videoposter").length && punchgs.TweenLite.to(t.find("iframe"), .3, {
autoAlpha: 1,
display: "block",
ease: punchgs.Power3.easeInOut
});
break;
case "html5":
if (a && 1 == t.data("disablevideoonmobile")) return !1;
var n = t.find("video"),
r = n[0];
if (punchgs.TweenLite.to(n, .3, {
autoAlpha: 1,
display: "block",
ease: punchgs.Power3.easeInOut
}), "on" == t.data("forcerewind") && !t.hasClass("videoisplaying")) try {
var i = e(t.data("videostartat"));
r.currentTime = -1 == i ? 0 : i
} catch (o) {}
"mute" == t.data("volume") && (r.muted = !0)
}
},
stopVideo: function(e) {
switch (e.data("videotype")) {
case "youtube":
try {
var t = e.data("player");
t.pauseVideo()
} catch (a) {}
break;
case "vimeo":
try {
var i = $f(e.find("iframe").attr("id"));
i.api("pause")
} catch (a) {}
break;
case "html5":
var o = e.find("video"),
d = o[0];
d.pause()
}
},
playVideo: function(o, n) {
switch (clearTimeout(o.data("videoplaywait")), o.data("videotype")) {
case "youtube":
if (0 == o.find("iframe").length) o.append(o.data("videomarkup")), d(o, n, !0);
else if (void 0 != o.data("player").playVideo) {
o.data("player").playVideo();
var r = e(o.data("videostartat")); - 1 != r && o.data("player").seekTo(r)
} else o.data("videoplaywait", setTimeout(function() {
t.playVideo(o, n)
}, 50));
break;
case "vimeo":
if (0 == o.find("iframe").length) o.append(o.data("videomarkup")), d(o, n, !0);
else if (o.hasClass("rs-apiready")) {
var s = o.find("iframe").attr("id"),
l = $f(s);
void 0 == l.api("play") ? o.data("videoplaywait", setTimeout(function() {
t.playVideo(o, n)
}, 50)) : setTimeout(function() {
l.api("play");
var t = e(o.data("videostartat")); - 1 != t && l.api("seekTo", t)
}, 510)
} else o.data("videoplaywait", setTimeout(function() {
t.playVideo(o, n)
}, 50));
break;
case "html5":
if (a && 1 == o.data("disablevideoonmobile")) return !1;
var p = o.find("video"),
v = p[0],
u = p.parent();
if (1 != u.data("metaloaded")) i(v, "loadedmetadata", function(a) {
t.resetVideo(a, n), v.play();
var i = e(a.data("videostartat")); - 1 != i && (v.currentTime = i)
}(o));
else {
v.play();
var r = e(o.data("videostartat")); - 1 != r && (v.currentTime = r)
}
}
},
isVideoPlaying: function(e, t) {
var a = !1;
return void 0 != t.playingvideos && jQuery.each(t.playingvideos, function(t, i) {
e.attr("id") == i.attr("id") && (a = !0)
}), a
},
prepareCoveredVideo: function(e, t, a) {
var i = a.find("iframe, video"),
o = e.split(":")[0],
d = e.split(":")[1],
n = a.closest(".tp-revslider-slidesli"),
r = n.width() / n.height(),
s = o / d,
l = r / s * 100,
p = s / r * 100;
r > s ? punchgs.TweenLite.to(i, .001, {
height: l + "%",
width: "100%",
top: -(l - 100) / 2 + "%",
left: "0px",
position: "absolute"
}) : punchgs.TweenLite.to(i, .001, {
width: p + "%",
height: "100%",
left: -(p - 100) / 2 + "%",
top: "0px",
position: "absolute"
})
},
checkVideoApis: function(e, t, a) {
var i = "https:" === location.protocol ? "https" : "http";
if ((void 0 != e.data("ytid") || e.find("iframe").length > 0 && e.find("iframe").attr("src").toLowerCase().indexOf("youtube") > 0) && (t.youtubeapineeded = !0), (void 0 != e.data("ytid") || e.find("iframe").length > 0 && e.find("iframe").attr("src").toLowerCase().indexOf("youtube") > 0) && 0 == a.addedyt) {
t.youtubestarttime = jQuery.now(), a.addedyt = 1;
var o = document.createElement("script");
o.src = "https://www.youtube.com/iframe_api";
var d = document.getElementsByTagName("script")[0],
n = !0;
jQuery("head").find("*").each(function() {
"https://www.youtube.com/iframe_api" == jQuery(this).attr("src") && (n = !1)
}), n && d.parentNode.insertBefore(o, d)
}
if ((void 0 != e.data("vimeoid") || e.find("iframe").length > 0 && e.find("iframe").attr("src").toLowerCase().indexOf("vimeo") > 0) && (t.vimeoapineeded = !0), (void 0 != e.data("vimeoid") || e.find("iframe").length > 0 && e.find("iframe").attr("src").toLowerCase().indexOf("vimeo") > 0) && 0 == a.addedvim) {
t.vimeostarttime = jQuery.now(), a.addedvim = 1;
var r = document.createElement("script"),
d = document.getElementsByTagName("script")[0],
n = !0;
r.src = i + "://f.vimeocdn.com/js/froogaloop2.min.js", jQuery("head").find("*").each(function() {
jQuery(this).attr("src") == i + "://a.vimeocdn.com/js/froogaloop2.min.js" && (n = !1)
}), n && d.parentNode.insertBefore(r, d)
}
return a
},
manageVideoLayer: function(o, r) {
var s = o.data("videoattributes"),
l = o.data("ytid"),
p = o.data("vimeoid"),
v = o.data("videpreload"),
u = o.data("videomp4"),
c = o.data("videowebm"),
f = o.data("videoogv"),
m = o.data("allowfullscreenvideo"),
h = o.data("videocontrols"),
g = "http",
y = "loop" == o.data("videoloop") ? "loop" : "loopandnoslidestop" == o.data("videoloop") ? "loop" : "",
w = void 0 != u || void 0 != c ? "html5" : void 0 != l && String(l).length > 1 ? "youtube" : void 0 != p && String(p).length > 1 ? "vimeo" : "none",
b = "html5" == w && 0 == o.find("video").length ? "html5" : "youtube" == w && 0 == o.find("iframe").length ? "youtube" : "vimeo" == w && 0 == o.find("iframe").length ? "vimeo" : "none";
switch (o.data("videotype", w), b) {
case "html5":
"controls" != h && (h = "");
var k = '<video style="object-fit:cover;background-size:cover;visible:hidden;width:100%; height:100%" class="" ' + y + ' preload="' + v + '">';
void 0 != c && "firefox" == t.get_browser().toLowerCase() && (k = k + '<source src="' + c + '" type="video/webm" />'), void 0 != u && (k = k + '<source src="' + u + '" type="video/mp4" />'), void 0 != f && (k = k + '<source src="' + f + '" type="video/ogg" />'), k += "</video>";
var T = "";
("true" === m || m === !0) && (T = '<div class="tp-video-button-wrap"><button type="button" class="tp-video-button tp-vid-full-screen">Full-Screen</button></div>'), "controls" == h && (k += '<div class="tp-video-controls"><div class="tp-video-button-wrap"><button type="button" class="tp-video-button tp-vid-play-pause">Play</button></div><div class="tp-video-seek-bar-wrap"><input type="range" class="tp-seek-bar" value="0"></div><div class="tp-video-button-wrap"><button type="button" class="tp-video-button tp-vid-mute">Mute</button></div><div class="tp-video-vol-bar-wrap"><input type="range" class="tp-volume-bar" min="0" max="1" step="0.1" value="1"></div>' + T + "</div>"), o.data("videomarkup", k), o.append(k), (a && 1 == o.data("disablevideoonmobile") || t.isIE(8)) && o.find("video").remove(), o.find("video").each(function() {
var e = this,
a = jQuery(this);
a.parent().hasClass("html5vid") || a.wrap('<div class="html5vid" style="position:relative;top:0px;left:0px;width:100%;height:100%; overflow:hidden;"></div>');
var d = a.parent();
1 != d.data("metaloaded") && i(e, "loadedmetadata", function(e) {
n(e, r), t.resetVideo(e, r)
}(o))
});
break;
case "youtube":
g = "http", "https:" === location.protocol && (g = "https"), "none" == h && (s = s.replace("controls=1", "controls=0"), -1 == s.toLowerCase().indexOf("controls") && (s += "&controls=0"));
var x = e(o.data("videostartat")),
L = e(o.data("videoendat")); - 1 != x && (s = s + "&start=" + x), -1 != L && (s = s + "&end=" + L);
var C = s.split("origin=" + g + "://"),
V = "";
C.length > 1 ? (V = C[0] + "origin=" + g + "://", self.location.href.match(/www/gi) && !C[1].match(/www/gi) && (V += "www."), V += C[1]) : V = s;
var j = "true" === m || m === !0 ? "allowfullscreen" : "";
o.data("videomarkup", '<iframe style="visible:hidden" src="' + g + "://www.youtube.com/embed/" + l + "?" + V + '" ' + j + ' width="100%" height="100%" style="width:100%;height:100%"></iframe>');
break;
case "vimeo":
"https:" === location.protocol && (g = "https"), o.data("videomarkup", '<iframe style="visible:hidden" src="' + g + "://player.vimeo.com/video/" + p + "?" + s + '" webkitallowfullscreen mozallowfullscreen allowfullscreen width="100%" height="100%" style="100%;height:100%"></iframe>')
}
var _ = 1 != a && "on" != o.data("posterOnMobile") && "on" != o.data("posteronmobile") || a;
void 0 != o.data("videoposter") && o.data("videoposter").length > 2 && _ ? (0 == o.find(".tp-videoposter").length && o.append('<div class="tp-videoposter noSwipe" style="cursor:pointer; position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:3;background-image:url(' + o.data("videoposter") + '); background-size:cover;background-position:center center;"></div>'), 0 == o.find("iframe").length && o.find(".tp-videoposter").click(function() {
if (t.playVideo(o, r), a) {
if (1 == o.data("disablevideoonmobile")) return !1;
punchgs.TweenLite.to(o.find(".tp-videoposter"), .3, {
autoAlpha: 0,
force3D: "auto",
ease: punchgs.Power3.easeInOut
}), punchgs.TweenLite.to(o.find("iframe"), .3, {
autoAlpha: 1,
display: "block",
ease: punchgs.Power3.easeInOut
})
}
})) : 0 != o.find("iframe").length || "youtube" != w && "vimeo" != w || (o.append(o.data("videomarkup")), d(o, r, !1)), "none" != o.data("dottedoverlay") && void 0 != o.data("dottedoverlay") && 1 != o.find(".tp-dottedoverlay").length && o.append('<div class="tp-dottedoverlay ' + o.data("dottedoverlay") + '"></div>'), o.addClass("HasListener"), 1 == o.data("bgvideo") && punchgs.TweenLite.set(o.find("video, iframe"), {
autoAlpha: 0
})
}
});
var i = function(e, t, a) {
e.addEventListener ? e.addEventListener(t, a, !1) : e.attachEvent(t, a, !1)
},
o = function(e, t, a) {
var i = {};
return i.video = e, i.videotype = t, i.settings = a, i
},
d = function(i, d, n) {
var l = i.find("iframe"),
p = "iframe" + Math.round(1e5 * Math.random() + 1),
v = i.data("videoloop"),
u = "loopandnoslidestop" != v;
if (v = "loop" == v || "loopandnoslidestop" == v, 1 == i.data("forcecover")) {
i.removeClass("fullscreenvideo").addClass("coverscreenvideo");
var c = i.data("aspectratio");
void 0 != c && c.split(":").length > 1 && t.prepareCoveredVideo(c, d, i)
}
if (1 == i.data("bgvideo")) {
var c = i.data("aspectratio");
void 0 != c && c.split(":").length > 1 && t.prepareCoveredVideo(c, d, i)
}
if (l.attr("id", p), n && i.data("startvideonow", !0), 1 !== i.data("videolistenerexist")) switch (i.data("videotype")) {
case "youtube":
var f = new YT.Player(p, {
events: {
onStateChange: function(t) {
var a = t.target.getVideoEmbedCode(),
i = jQuery("#" + a.split('id="')[1].split('"')[0]),
n = i.closest(".tp-simpleresponsive"),
l = i.parent(),
p = i.parent().data("player");
if (t.data == YT.PlayerState.PLAYING) punchgs.TweenLite.to(l.find(".tp-videoposter"), .3, {
autoAlpha: 0,
force3D: "auto",
ease: punchgs.Power3.easeInOut
}), punchgs.TweenLite.to(l.find("iframe"), .3, {
autoAlpha: 1,
display: "block",
ease: punchgs.Power3.easeInOut
}), "mute" == l.data("volume") ? p.mute() : (p.unMute(), p.setVolume(parseInt(l.data("volume"), 0) || 75)), d.videoplaying = !0, r(l, d), n.trigger("stoptimer"), d.c.trigger("revolution.slide.onvideoplay", o(p, "youtube", l.data()));
else {
if (0 == t.data && v) {
var u = e(l.data("videostartat")); - 1 != u && p.seekTo(u), p.playVideo()
}(0 == t.data || 2 == t.data) && "on" == l.data("showcoveronpause") && l.find(".tp-videoposter").length > 0 && (punchgs.TweenLite.to(l.find(".tp-videoposter"), .3, {
autoAlpha: 1,
force3D: "auto",
ease: punchgs.Power3.easeInOut
}), punchgs.TweenLite.to(l.find("iframe"), .3, {
autoAlpha: 0,
ease: punchgs.Power3.easeInOut
})), -1 != t.data && 3 != t.data && (d.videoplaying = !1, s(l, d), n.trigger("starttimer"), d.c.trigger("revolution.slide.onvideostop", o(p, "youtube", l.data()))), 0 == t.data && 1 == l.data("nextslideatend") ? (d.c.revnext(), s(l, d)) : (s(l, d), d.videoplaying = !1, n.trigger("starttimer"), d.c.trigger("revolution.slide.onvideostop", o(p, "youtube", l.data())))
}
},
onReady: function(t) {
{
var i = t.target.getVideoEmbedCode(),
o = jQuery("#" + i.split('id="')[1].split('"')[0]),
d = o.parent(),
n = d.data("videorate");
d.data("videostart")
}
if (d.addClass("rs-apiready"), void 0 != n && t.target.setPlaybackRate(parseFloat(n)), d.find(".tp-videoposter").unbind("click"), d.find(".tp-videoposter").click(function() {
a || f.playVideo()
}), d.data("startvideonow")) {
d.data("player").playVideo();
var r = e(d.data("videostartat")); - 1 != r && d.data("player").seekTo(r)
}
d.data("videolistenerexist", 1)
}
}
});
i.data("player", f);
break;
case "vimeo":
for (var m, h = l.attr("src"), g = {}, y = h, w = /([^&=]+)=([^&]*)/g; m = w.exec(y);) g[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
h = void 0 != g.player_id ? h.replace(g.player_id, p) : h + "&player_id=" + p;
try {
h = h.replace("api=0", "api=1")
} catch (b) {}
h += "&api=1", l.attr("src", h);
var f = i.find("iframe")[0],
k = (jQuery("#" + p), $f(p));
k.addEvent("ready", function() {
if (i.addClass("rs-apiready"), k.addEvent("play", function() {
i.data("nextslidecalled", 0), punchgs.TweenLite.to(i.find(".tp-videoposter"), .3, {
autoAlpha: 0,
force3D: "auto",
ease: punchgs.Power3.easeInOut
}), punchgs.TweenLite.to(i.find("iframe"), .3, {
autoAlpha: 1,
display: "block",
ease: punchgs.Power3.easeInOut
}), d.c.trigger("revolution.slide.onvideoplay", o(k, "vimeo", i.data())), d.videoplaying = !0, r(i, d), u && d.c.trigger("stoptimer"), "mute" == i.data("volume") ? k.api("setVolume", "0") : k.api("setVolume", parseInt(i.data("volume"), 0) / 100 || .75)
}), k.addEvent("playProgress", function(t) {
var a = e(i.data("videoendat"));
if (0 != a && Math.abs(a - t.seconds) < .3 && a > t.seconds && 1 != i.data("nextslidecalled"))
if (v) {
k.api("play");
var o = e(i.data("videostartat")); - 1 != o && k.api("seekTo", o)
} else 1 == i.data("nextslideatend") && (i.data("nextslidecalled", 1), d.c.revnext()), k.api("pause")
}), k.addEvent("finish", function() {
s(i, d), d.videoplaying = !1, d.c.trigger("starttimer"), d.c.trigger("revolution.slide.onvideostop", o(k, "vimeo", i.data())), 1 == i.data("nextslideatend") && d.c.revnext()
}), k.addEvent("pause", function() {
i.find(".tp-videoposter").length > 0 && "on" == i.data("showcoveronpause") && (punchgs.TweenLite.to(i.find(".tp-videoposter"), .3, {
autoAlpha: 1,
force3D: "auto",
ease: punchgs.Power3.easeInOut
}), punchgs.TweenLite.to(i.find("iframe"), .3, {
autoAlpha: 0,
ease: punchgs.Power3.easeInOut
})), d.videoplaying = !1, s(i, d), d.c.trigger("starttimer"), d.c.trigger("revolution.slide.onvideostop", o(k, "vimeo", i.data()))
}), i.find(".tp-videoposter").unbind("click"), i.find(".tp-videoposter").click(function() {
return a ? void 0 : (k.api("play"), !1)
}), i.data("startvideonow")) {
k.api("play");
var t = e(i.data("videostartat")); - 1 != t && k.api("seekTo", t)
}
i.data("videolistenerexist", 1)
})
} else {
var T = e(i.data("videostartat"));
switch (i.data("videotype")) {
case "youtube":
n && (i.data("player").playVideo(), -1 != T && i.data("player").seekTo());
break;
case "vimeo":
if (n) {
var k = $f(i.find("iframe").attr("id"));
k.api("play"), -1 != T && k.api("seekTo", T)
}
}
}
},
n = function(d, n) {
if (a && 1 == d.data("disablevideoonmobile")) return !1;
var l = d.find("video"),
p = l[0],
v = l.parent(),
u = d.data("videoloop"),
c = "loopandnoslidestop" != u;
if (u = "loop" == u || "loopandnoslidestop" == u, v.data("metaloaded", 1), void 0 == l.attr("control") && (0 != d.find(".tp-video-play-button").length || a || d.append('<div class="tp-video-play-button"><i class="revicon-right-dir"></i><span class="tp-revstop"> </span></div>'), d.find("video, .tp-poster, .tp-video-play-button").click(function() {
d.hasClass("videoisplaying") ? p.pause() : p.play()
})), 1 == d.data("forcecover") || d.hasClass("fullscreenvideo") || 1 == d.data("bgvideo"))
if (1 == d.data("forcecover") || 1 == d.data("bgvideo")) {
v.addClass("fullcoveredvideo");
var f = d.data("aspectratio") || "4:3";
t.prepareCoveredVideo(f, n, d)
} else v.addClass("fullscreenvideo");
var m = d.find(".tp-vid-play-pause")[0],
h = d.find(".tp-vid-mute")[0],
g = d.find(".tp-vid-full-screen")[0],
y = d.find(".tp-seek-bar")[0],
w = d.find(".tp-volume-bar")[0];
void 0 != m && i(m, "click", function() {
1 == p.paused ? p.play() : p.pause()
}), void 0 != h && i(h, "click", function() {
0 == p.muted ? (p.muted = !0, h.innerHTML = "Unmute") : (p.muted = !1, h.innerHTML = "Mute")
}), void 0 != g && g && i(g, "click", function() {
p.requestFullscreen ? p.requestFullscreen() : p.mozRequestFullScreen ? p.mozRequestFullScreen() : p.webkitRequestFullscreen && p.webkitRequestFullscreen()
}), void 0 != y && (i(y, "change", function() {
var e = p.duration * (y.value / 100);
p.currentTime = e
}), i(y, "mousedown", function() {
d.addClass("seekbardragged"), p.pause()
}), i(y, "mouseup", function() {
d.removeClass("seekbardragged"), p.play()
})), i(p, "timeupdate", function() {
var t = 100 / p.duration * p.currentTime,
a = e(d.data("videoendat")),
i = p.currentTime;
if (void 0 != y && (y.value = t), 0 != a && -1 != a && Math.abs(a - i) <= .3 && a > i && 1 != d.data("nextslidecalled"))
if (u) {
p.play();
var o = e(d.data("videostartat")); - 1 != o && (p.currentTime = o)
} else 1 == d.data("nextslideatend") && (d.data("nextslidecalled", 1), n.just_called_nextslide_at_htmltimer = !0, n.c.revnext(), setTimeout(function() {
n.just_called_nextslide_at_htmltimer = !1
}, 1e3)), p.pause()
}), void 0 != w && i(w, "change", function() {
p.volume = w.value
}), i(p, "play", function() {
d.data("nextslidecalled", 0), "mute" == d.data("volume") && (p.muted = !0), d.addClass("videoisplaying"), r(d, n), c ? (n.videoplaying = !0, n.c.trigger("stoptimer"), n.c.trigger("revolution.slide.onvideoplay", o(p, "html5", d.data()))) : (n.videoplaying = !1, n.c.trigger("starttimer"), n.c.trigger("revolution.slide.onvideostop", o(p, "html5", d.data()))), punchgs.TweenLite.to(d.find(".tp-videoposter"), .3, {
autoAlpha: 0,
force3D: "auto",
ease: punchgs.Power3.easeInOut
}), punchgs.TweenLite.to(d.find("video"), .3, {
autoAlpha: 1,
display: "block",
ease: punchgs.Power3.easeInOut
});
var e = d.find(".tp-vid-play-pause")[0],
t = d.find(".tp-vid-mute")[0];
void 0 != e && (e.innerHTML = "Pause"), void 0 != t && p.muted && (t.innerHTML = "Unmute")
}), i(p, "pause", function() {
d.find(".tp-videoposter").length > 0 && "on" == d.data("showcoveronpause") && !d.hasClass("seekbardragged") && (punchgs.TweenLite.to(d.find(".tp-videoposter"), .3, {
autoAlpha: 1,
force3D: "auto",
ease: punchgs.Power3.easeInOut
}), punchgs.TweenLite.to(d.find("video"), .3, {
autoAlpha: 0,
ease: punchgs.Power3.easeInOut
})), d.removeClass("videoisplaying"), n.videoplaying = !1, s(d, n), n.c.trigger("starttimer"), n.c.trigger("revolution.slide.onvideostop", o(p, "html5", d.data()));
var e = d.find(".tp-vid-play-pause")[0];
void 0 != e && (e.innerHTML = "Play")
}), i(p, "ended", function() {
s(d, n), n.videoplaying = !1, s(d, n), n.c.trigger("starttimer"), n.c.trigger("revolution.slide.onvideostop", o(p, "html5", d.data())), 1 == d.data("nextslideatend") && (1 == !n.just_called_nextslide_at_htmltimer && (n.c.revnext(), n.just_called_nextslide_at_htmltimer = !0), setTimeout(function() {
n.just_called_nextslide_at_htmltimer = !1
}, 1500)), d.removeClass("videoisplaying")
})
},
r = function(e, a) {
void 0 == a.playingvideos && (a.playingvideos = new Array), e.data("stopallvideos") && void 0 != a.playingvideos && a.playingvideos.length > 0 && (a.lastplayedvideos = jQuery.extend(!0, [], a.playingvideos), jQuery.each(a.playingvideos, function(e, i) {
t.stopVideo(i, a)
})), a.playingvideos.push(e)
},
s = function(e, t) {
void 0 != t.playingvideos && t.playingvideos.splice(jQuery.inArray(e, t.playingvideos), 1)
}
}(jQuery);
Executed Writes (3)
#1 JavaScript::Write (size: 382) - SHA256: ed5190be636529fe44951890e8fa47120431aae198c2f6684fd65620546c2fff
< head > < meta http - equiv = "Content-Type"
content = "text/html; charset=UTF8" > < link rel = "stylesheet"
type = "text/css"
href = "https://translate.googleapis.com/translate_static/css/translateelement.css" > < /head><body scroll="no" style="margin:0px;overflow:hidden" dir="ltr" marginHeight=0 marginWidth=0 leftMargin=0 topMargin=0 border=0><div id=":1.menuBody" class="goog-te-menu"></div > < /body>
#2 JavaScript::Write (size: 382) - SHA256: d2485660acb012ca34ca118cb59e6fbb11edb83ea98a0e050dd9bed186ee9274
< head > < meta http - equiv = "Content-Type"
content = "text/html; charset=UTF8" > < link rel = "stylesheet"
type = "text/css"
href = "https://translate.googleapis.com/translate_static/css/translateelement.css" > < /head><body scroll="no" style="margin:0px;overflow:hidden" dir="ltr" marginHeight=0 marginWidth=0 leftMargin=0 topMargin=0 border=0><div id=":2.menuBody" class="goog-te-menu"></div > < /body>
#3 JavaScript::Write (size: 2866) - SHA256: 3de15a59aba81cdb54b9433c9dde3d1ec999f82fdbeb82166a4a3291a2d98857
< head > < meta http - equiv = "Content-Type"
content = "text/html; charset=UTF8" > < link rel = "stylesheet"
type = "text/css"
href = "https://translate.googleapis.com/translate_static/css/translateelement.css" > < /head><body class="goog-te-banner" scroll="no" border=0 dir="ltr"><table border=0 cellspacing=0 cellpadding=0 width=100% height=100%><tr valign=middle><td width=1 nowrap><a href="https:/ / translate.google.com " class="
goog - logo - link " target="
_blank "><img src="
https: //www.gstatic.com/images/branding/googlelogo/1x/googlelogo_color_68x28dp.png" alt="Google Oversetter"></a></td><td width=1><img src="https://www.google.com/images/cleardot.gif" width="9" height="15" title="Innholdet p� denne sikre siden sendes til Google via en sikker tilkobling for � bli oversatt." alt="Innholdet p� denne sikre siden sendes til Google via en sikker tilkobling for � bli oversatt." style="background-image:url(https://translate.googleapis.com/translate_static/img/te_ctrl3.gif);background-position:-56px 0px;margin:0 4px"></td><td class="goog-te-banner-margin"></td><td><table border=0 cellspacing=0 cellpadding=0 height=100%><tr id=":0.promptSection" style="display:none" valign=middle><td nowrap><span class="goog-te-banner-content">Vis denne siden p�: <span id=":0.promptTargetLang"></span></span></td><td class="goog-te-banner-margin"></td><td nowrap><div class="goog-te-button"><div><button id=":0.confirm"><b>Oversett</b></button></div></div></td><td class="goog-te-banner-margin"></td><td nowrap><div class="goog-te-button"><div><button id=":0.noAutoPopup"></button></div></div></td></tr><tr id=":0.progressSection" style="display:none" valign=middle><td><span class="goog-te-banner-content">Oversettelse p�g�r <span dir="ltr">(<b id=":0.progressValue"></b>%)</span> <img src="https://translate.googleapis.com/translate_static/img/loading.gif"></span></td><td class="goog-te-banner-margin"></td><td nowrap><div class="goog-te-button"><div><button id=":0.cancel">Avbryt</button></div></div></td></tr><tr id=":0.finishSection" style="display:none"><td><span class="goog-te-banner-content">Oversatt til: <span id=":0.finishTargetLang"></span></span></td><td class="goog-te-banner-margin"></td><td nowrap><div class="goog-te-button"><div><button id=":0.restore">Vis original</button></div></div></td></tr><tr id=":0.errorSection" style="display:none" valign=middle><td><span id=":0.errorContent" class="goog-te-banner-content"></span></td></tr></table></td><td class="goog-te-banner-margin"></td><td width=1 id="options"></td><td width=1><a id=":0.close" class="goog-close-link" href="javascript:void(0)" title="Lukk"><img src="https://www.google.com/images/cleardot.gif" width="15" height="15" alt="Lukk" style="background-image:url(https://translate.googleapis.com/translate_static/img/te_ctrl3.gif);background-position:-28px 0px"></a></td></tr></table></body>