veezard
Version:
TECHB fork from veeva. Veeva CLM Generator & Workflow for building iRep Presentations.
469 lines (462 loc) • 37.9 kB
JavaScript
/*! jQuery UI - v1.9.2 - 2013-01-15
* http://jqueryui.com
* Includes: jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
jQuery.effects || function(e, t) {
var n = e.uiBackCompat !== !1,
r = "ui-effects-";
e.effects = { effect: {} },
function(t, n) {
function p(e, t, n) {
var r = a[t.type] || {};
return e == null ? n || !t.def ? null : t.def : (e = r.floor ? ~~e : parseFloat(e), isNaN(e) ? t.def : r.mod ? (e + r.mod) % r.mod : 0 > e ? 0 : r.max < e ? r.max : e) }
function d(e) {
var n = o(),
r = n._rgba = [];
return e = e.toLowerCase(), h(s, function(t, i) {
var s, o = i.re.exec(e),
a = o && i.parse(o),
f = i.space || "rgba";
if (a) return s = n[f](a), n[u[f].cache] = s[u[f].cache], r = n._rgba = s._rgba, !1 }), r.length ? (r.join() === "0,0,0,0" && t.extend(r, c.transparent), n) : c[e] }
function v(e, t, n) {
return n = (n + 1) % 1, n * 6 < 1 ? e + (t - e) * n * 6 : n * 2 < 1 ? t : n * 3 < 2 ? e + (t - e) * (2 / 3 - n) * 6 : e }
var r = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),
i = /^([\-+])=\s*(\d+\.?\d*)/,
s = [{ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, parse: function(e) {
return [e[1], e[2], e[3], e[4]] } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, parse: function(e) {
return [e[1] * 2.55, e[2] * 2.55, e[3] * 2.55, e[4]] } }, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function(e) {
return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)] } }, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function(e) {
return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)] } }, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function(e) {
return [e[1], e[2] / 100, e[3] / 100, e[4]] } }],
o = t.Color = function(e, n, r, i) {
return new t.Color.fn.parse(e, n, r, i) },
u = { rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" } } }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" } } } },
a = { "byte": { floor: !0, max: 255 }, percent: { max: 1 }, degrees: { mod: 360, floor: !0 } },
f = o.support = {},
l = t("<p>")[0],
c, h = t.each;
l.style.cssText = "background-color:rgba(1,1,1,.5)", f.rgba = l.style.backgroundColor.indexOf("rgba") > -1, h(u, function(e, t) { t.cache = "_" + e, t.props.alpha = { idx: 3, type: "percent", def: 1 } }), o.fn = t.extend(o.prototype, { parse: function(r, i, s, a) {
if (r === n) return this._rgba = [null, null, null, null], this;
if (r.jquery || r.nodeType) r = t(r).css(i), i = n;
var f = this,
l = t.type(r),
v = this._rgba = [];
i !== n && (r = [r, i, s, a], l = "array");
if (l === "string") return this.parse(d(r) || c._default);
if (l === "array") return h(u.rgba.props, function(e, t) { v[t.idx] = p(r[t.idx], t) }), this;
if (l === "object") return r instanceof o ? h(u, function(e, t) { r[t.cache] && (f[t.cache] = r[t.cache].slice()) }) : h(u, function(t, n) {
var i = n.cache;
h(n.props, function(e, t) {
if (!f[i] && n.to) {
if (e === "alpha" || r[e] == null) return;
f[i] = n.to(f._rgba) }
f[i][t.idx] = p(r[e], t, !0) }), f[i] && e.inArray(null, f[i].slice(0, 3)) < 0 && (f[i][3] = 1, n.from && (f._rgba = n.from(f[i]))) }), this }, is: function(e) {
var t = o(e),
n = !0,
r = this;
return h(u, function(e, i) {
var s, o = t[i.cache];
return o && (s = r[i.cache] || i.to && i.to(r._rgba) || [], h(i.props, function(e, t) {
if (o[t.idx] != null) return n = o[t.idx] === s[t.idx], n })), n }), n }, _space: function() {
var e = [],
t = this;
return h(u, function(n, r) { t[r.cache] && e.push(n) }), e.pop() }, transition: function(e, t) {
var n = o(e),
r = n._space(),
i = u[r],
s = this.alpha() === 0 ? o("transparent") : this,
f = s[i.cache] || i.to(s._rgba),
l = f.slice();
return n = n[i.cache], h(i.props, function(e, r) {
var i = r.idx,
s = f[i],
o = n[i],
u = a[r.type] || {};
if (o === null) return;
s === null ? l[i] = o : (u.mod && (o - s > u.mod / 2 ? s += u.mod : s - o > u.mod / 2 && (s -= u.mod)), l[i] = p((o - s) * t + s, r)) }), this[r](l) }, blend: function(e) {
if (this._rgba[3] === 1) return this;
var n = this._rgba.slice(),
r = n.pop(),
i = o(e)._rgba;
return o(t.map(n, function(e, t) {
return (1 - r) * i[t] + r * e })) }, toRgbaString: function() {
var e = "rgba(",
n = t.map(this._rgba, function(e, t) {
return e == null ? t > 2 ? 1 : 0 : e });
return n[3] === 1 && (n.pop(), e = "rgb("), e + n.join() + ")" }, toHslaString: function() {
var e = "hsla(",
n = t.map(this.hsla(), function(e, t) {
return e == null && (e = t > 2 ? 1 : 0), t && t < 3 && (e = Math.round(e * 100) + "%"), e });
return n[3] === 1 && (n.pop(), e = "hsl("), e + n.join() + ")" }, toHexString: function(e) {
var n = this._rgba.slice(),
r = n.pop();
return e && n.push(~~(r * 255)), "#" + t.map(n, function(e) {
return e = (e || 0).toString(16), e.length === 1 ? "0" + e : e }).join("") }, toString: function() {
return this._rgba[3] === 0 ? "transparent" : this.toRgbaString() } }), o.fn.parse.prototype = o.fn, u.hsla.to = function(e) {
if (e[0] == null || e[1] == null || e[2] == null) return [null, null, null, e[3]];
var t = e[0] / 255,
n = e[1] / 255,
r = e[2] / 255,
i = e[3],
s = Math.max(t, n, r),
o = Math.min(t, n, r),
u = s - o,
a = s + o,
f = a * .5,
l, c;
return o === s ? l = 0 : t === s ? l = 60 * (n - r) / u + 360 : n === s ? l = 60 * (r - t) / u + 120 : l = 60 * (t - n) / u + 240, f === 0 || f === 1 ? c = f : f <= .5 ? c = u / a : c = u / (2 - a), [Math.round(l) % 360, c, f, i == null ? 1 : i] }, u.hsla.from = function(e) {
if (e[0] == null || e[1] == null || e[2] == null) return [null, null, null, e[3]];
var t = e[0] / 360,
n = e[1],
r = e[2],
i = e[3],
s = r <= .5 ? r * (1 + n) : r + n - r * n,
o = 2 * r - s;
return [Math.round(v(o, s, t + 1 / 3) * 255), Math.round(v(o, s, t) * 255), Math.round(v(o, s, t - 1 / 3) * 255), i] }, h(u, function(e, r) {
var s = r.props,
u = r.cache,
a = r.to,
f = r.from;
o.fn[e] = function(e) { a && !this[u] && (this[u] = a(this._rgba));
if (e === n) return this[u].slice();
var r, i = t.type(e),
l = i === "array" || i === "object" ? e : arguments,
c = this[u].slice();
return h(s, function(e, t) {
var n = l[i === "object" ? e : t.idx];
n == null && (n = c[t.idx]), c[t.idx] = p(n, t) }), f ? (r = o(f(c)), r[u] = c, r) : o(c) }, h(s, function(n, r) {
if (o.fn[n]) return;
o.fn[n] = function(s) {
var o = t.type(s),
u = n === "alpha" ? this._hsla ? "hsla" : "rgba" : e,
a = this[u](),
f = a[r.idx],
l;
return o === "undefined" ? f : (o === "function" && (s = s.call(this, f), o = t.type(s)), s == null && r.empty ? this : (o === "string" && (l = i.exec(s), l && (s = f + parseFloat(l[2]) * (l[1] === "+" ? 1 : -1))), a[r.idx] = s, this[u](a))) } }) }), h(r, function(e, n) { t.cssHooks[n] = { set: function(e, r) {
var i, s, u = "";
if (t.type(r) !== "string" || (i = d(r))) { r = o(i || r);
if (!f.rgba && r._rgba[3] !== 1) { s = n === "backgroundColor" ? e.parentNode : e;
while ((u === "" || u === "transparent") && s && s.style) try { u = t.css(s, "backgroundColor"), s = s.parentNode } catch (a) {}
r = r.blend(u && u !== "transparent" ? u : "_default") }
r = r.toRgbaString() }
try { e.style[n] = r } catch (l) {} } }, t.fx.step[n] = function(e) { e.colorInit || (e.start = o(e.elem, n), e.end = o(e.end), e.colorInit = !0), t.cssHooks[n].set(e.elem, e.start.transition(e.end, e.pos)) } }), t.cssHooks.borderColor = { expand: function(e) {
var t = {};
return h(["Top", "Right", "Bottom", "Left"], function(n, r) { t["border" + r + "Color"] = e }), t } }, c = t.Color.names = { aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [null, null, null, 0], _default: "#ffffff" } }(jQuery),
function() {
function i() {
var t = this.ownerDocument.defaultView ? this.ownerDocument.defaultView.getComputedStyle(this, null) : this.currentStyle,
n = {},
r, i;
if (t && t.length && t[0] && t[t[0]]) { i = t.length;
while (i--) r = t[i], typeof t[r] == "string" && (n[e.camelCase(r)] = t[r]) } else
for (r in t) typeof t[r] == "string" && (n[r] = t[r]);
return n }
function s(t, n) {
var i = {},
s, o;
for (s in n) o = n[s], t[s] !== o && !r[s] && (e.fx.step[s] || !isNaN(parseFloat(o))) && (i[s] = o);
return i }
var n = ["add", "remove", "toggle"],
r = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 };
e.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(t, n) { e.fx.step[n] = function(e) {
if (e.end !== "none" && !e.setAttr || e.pos === 1 && !e.setAttr) jQuery.style(e.elem, n, e.end), e.setAttr = !0 } }), e.effects.animateClass = function(t, r, o, u) {
var a = e.speed(r, o, u);
return this.queue(function() {
var r = e(this),
o = r.attr("class") || "",
u, f = a.children ? r.find("*").andSelf() : r;
f = f.map(function() {
var t = e(this);
return { el: t, start: i.call(this) } }), u = function() { e.each(n, function(e, n) { t[n] && r[n + "Class"](t[n]) }) }, u(), f = f.map(function() {
return this.end = i.call(this.el[0]), this.diff = s(this.start, this.end), this }), r.attr("class", o), f = f.map(function() {
var t = this,
n = e.Deferred(),
r = jQuery.extend({}, a, { queue: !1, complete: function() { n.resolve(t) } });
return this.el.animate(this.diff, r), n.promise() }), e.when.apply(e, f.get()).done(function() { u(), e.each(arguments, function() {
var t = this.el;
e.each(this.diff, function(e) { t.css(e, "") }) }), a.complete.call(r[0]) }) }) }, e.fn.extend({ _addClass: e.fn.addClass, addClass: function(t, n, r, i) {
return n ? e.effects.animateClass.call(this, { add: t }, n, r, i) : this._addClass(t) }, _removeClass: e.fn.removeClass, removeClass: function(t, n, r, i) {
return n ? e.effects.animateClass.call(this, { remove: t }, n, r, i) : this._removeClass(t) }, _toggleClass: e.fn.toggleClass, toggleClass: function(n, r, i, s, o) {
return typeof r == "boolean" || r === t ? i ? e.effects.animateClass.call(this, r ? { add: n } : { remove: n }, i, s, o) : this._toggleClass(n, r) : e.effects.animateClass.call(this, { toggle: n }, r, i, s) }, switchClass: function(t, n, r, i, s) {
return e.effects.animateClass.call(this, { add: n, remove: t }, r, i, s) } }) }(),
function() {
function i(t, n, r, i) { e.isPlainObject(t) && (n = t, t = t.effect), t = { effect: t }, n == null && (n = {}), e.isFunction(n) && (i = n, r = null, n = {});
if (typeof n == "number" || e.fx.speeds[n]) i = r, r = n, n = {};
return e.isFunction(r) && (i = r, r = null), n && e.extend(t, n), r = r || n.duration, t.duration = e.fx.off ? 0 : typeof r == "number" ? r : r in e.fx.speeds ? e.fx.speeds[r] : e.fx.speeds._default, t.complete = i || n.complete, t }
function s(t) {
return !t || typeof t == "number" || e.fx.speeds[t] ? !0 : typeof t == "string" && !e.effects.effect[t] ? n && e.effects[t] ? !1 : !0 : !1 }
e.extend(e.effects, { version: "1.9.2", save: function(e, t) {
for (var n = 0; n < t.length; n++) t[n] !== null && e.data(r + t[n], e[0].style[t[n]]) }, restore: function(e, n) {
var i, s;
for (s = 0; s < n.length; s++) n[s] !== null && (i = e.data(r + n[s]), i === t && (i = ""), e.css(n[s], i)) }, setMode: function(e, t) {
return t === "toggle" && (t = e.is(":hidden") ? "show" : "hide"), t }, getBaseline: function(e, t) {
var n, r;
switch (e[0]) {
case "top":
n = 0;
break;
case "middle":
n = .5;
break;
case "bottom":
n = 1;
break;
default:
n = e[0] / t.height }
switch (e[1]) {
case "left":
r = 0;
break;
case "center":
r = .5;
break;
case "right":
r = 1;
break;
default:
r = e[1] / t.width }
return { x: r, y: n } }, createWrapper: function(t) {
if (t.parent().is(".ui-effects-wrapper")) return t.parent();
var n = { width: t.outerWidth(!0), height: t.outerHeight(!0), "float": t.css("float") },
r = e("<div></div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }),
i = { width: t.width(), height: t.height() },
s = document.activeElement;
try { s.id } catch (o) { s = document.body }
return t.wrap(r), (t[0] === s || e.contains(t[0], s)) && e(s).focus(), r = t.parent(), t.css("position") === "static" ? (r.css({ position: "relative" }), t.css({ position: "relative" })) : (e.extend(n, { position: t.css("position"), zIndex: t.css("z-index") }), e.each(["top", "left", "bottom", "right"], function(e, r) { n[r] = t.css(r), isNaN(parseInt(n[r], 10)) && (n[r] = "auto") }), t.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" })), t.css(i), r.css(n).show() }, removeWrapper: function(t) {
var n = document.activeElement;
return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t), (t[0] === n || e.contains(t[0], n)) && e(n).focus()), t }, setTransition: function(t, n, r, i) {
return i = i || {}, e.each(n, function(e, n) {
var s = t.cssUnit(n);
s[0] > 0 && (i[n] = s[0] * r + s[1]) }), i } }), e.fn.extend({ effect: function() {
function a(n) {
function u() { e.isFunction(i) && i.call(r[0]), e.isFunction(n) && n() }
var r = e(this),
i = t.complete,
s = t.mode;
(r.is(":hidden") ? s === "hide" : s === "show") ? u(): o.call(r[0], t, u) }
var t = i.apply(this, arguments),
r = t.mode,
s = t.queue,
o = e.effects.effect[t.effect],
u = !o && n && e.effects[t.effect];
return e.fx.off || !o && !u ? r ? this[r](t.duration, t.complete) : this.each(function() { t.complete && t.complete.call(this) }) : o ? s === !1 ? this.each(a) : this.queue(s || "fx", a) : u.call(this, { options: t, duration: t.duration, callback: t.complete, mode: t.mode }) }, _show: e.fn.show, show: function(e) {
if (s(e)) return this._show.apply(this, arguments);
var t = i.apply(this, arguments);
return t.mode = "show", this.effect.call(this, t) }, _hide: e.fn.hide, hide: function(e) {
if (s(e)) return this._hide.apply(this, arguments);
var t = i.apply(this, arguments);
return t.mode = "hide", this.effect.call(this, t) }, __toggle: e.fn.toggle, toggle: function(t) {
if (s(t) || typeof t == "boolean" || e.isFunction(t)) return this.__toggle.apply(this, arguments);
var n = i.apply(this, arguments);
return n.mode = "toggle", this.effect.call(this, n) }, cssUnit: function(t) {
var n = this.css(t),
r = [];
return e.each(["em", "px", "%", "pt"], function(e, t) { n.indexOf(t) > 0 && (r = [parseFloat(n), t]) }), r } }) }(),
function() {
var t = {};
e.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(e, n) { t[n] = function(t) {
return Math.pow(t, e + 2) } }), e.extend(t, { Sine: function(e) {
return 1 - Math.cos(e * Math.PI / 2) }, Circ: function(e) {
return 1 - Math.sqrt(1 - e * e) }, Elastic: function(e) {
return e === 0 || e === 1 ? e : -Math.pow(2, 8 * (e - 1)) * Math.sin(((e - 1) * 80 - 7.5) * Math.PI / 15) }, Back: function(e) {
return e * e * (3 * e - 2) }, Bounce: function(e) {
var t, n = 4;
while (e < ((t = Math.pow(2, --n)) - 1) / 11);
return 1 / Math.pow(4, 3 - n) - 7.5625 * Math.pow((t * 3 - 2) / 22 - e, 2) } }), e.each(t, function(t, n) { e.easing["easeIn" + t] = n, e.easing["easeOut" + t] = function(e) {
return 1 - n(1 - e) }, e.easing["easeInOut" + t] = function(e) {
return e < .5 ? n(e * 2) / 2 : 1 - n(e * -2 + 2) / 2 } }) }() }(jQuery);
(function(e, t) {
var n = /up|down|vertical/,
r = /up|left|vertical|horizontal/;
e.effects.effect.blind = function(t, i) {
var s = e(this),
o = ["position", "top", "bottom", "left", "right", "height", "width"],
u = e.effects.setMode(s, t.mode || "hide"),
a = t.direction || "up",
f = n.test(a),
l = f ? "height" : "width",
c = f ? "top" : "left",
h = r.test(a),
p = {},
d = u === "show",
v, m, g;
s.parent().is(".ui-effects-wrapper") ? e.effects.save(s.parent(), o) : e.effects.save(s, o), s.show(), v = e.effects.createWrapper(s).css({ overflow: "hidden" }), m = v[l](), g = parseFloat(v.css(c)) || 0, p[l] = d ? m : 0, h || (s.css(f ? "bottom" : "right", 0).css(f ? "top" : "left", "auto").css({ position: "absolute" }), p[c] = d ? g : m + g), d && (v.css(l, 0), h || v.css(c, g + m)), v.animate(p, { duration: t.duration, easing: t.easing, queue: !1, complete: function() { u === "hide" && s.hide(), e.effects.restore(s, o), e.effects.removeWrapper(s), i() } }) } })(jQuery);
(function(e, t) { e.effects.effect.bounce = function(t, n) {
var r = e(this),
i = ["position", "top", "bottom", "left", "right", "height", "width"],
s = e.effects.setMode(r, t.mode || "effect"),
o = s === "hide",
u = s === "show",
a = t.direction || "up",
f = t.distance,
l = t.times || 5,
c = l * 2 + (u || o ? 1 : 0),
h = t.duration / c,
p = t.easing,
d = a === "up" || a === "down" ? "top" : "left",
v = a === "up" || a === "left",
m, g, y, b = r.queue(),
w = b.length;
(u || o) && i.push("opacity"), e.effects.save(r, i), r.show(), e.effects.createWrapper(r), f || (f = r[d === "top" ? "outerHeight" : "outerWidth"]() / 3), u && (y = { opacity: 1 }, y[d] = 0, r.css("opacity", 0).css(d, v ? -f * 2 : f * 2).animate(y, h, p)), o && (f /= Math.pow(2, l - 1)), y = {}, y[d] = 0;
for (m = 0; m < l; m++) g = {}, g[d] = (v ? "-=" : "+=") + f, r.animate(g, h, p).animate(y, h, p), f = o ? f * 2 : f / 2;
o && (g = { opacity: 0 }, g[d] = (v ? "-=" : "+=") + f, r.animate(g, h, p)), r.queue(function() { o && r.hide(), e.effects.restore(r, i), e.effects.removeWrapper(r), n() }), w > 1 && b.splice.apply(b, [1, 0].concat(b.splice(w, c + 1))), r.dequeue() } })(jQuery);
(function(e, t) { e.effects.effect.clip = function(t, n) {
var r = e(this),
i = ["position", "top", "bottom", "left", "right", "height", "width"],
s = e.effects.setMode(r, t.mode || "hide"),
o = s === "show",
u = t.direction || "vertical",
a = u === "vertical",
f = a ? "height" : "width",
l = a ? "top" : "left",
c = {},
h, p, d;
e.effects.save(r, i), r.show(), h = e.effects.createWrapper(r).css({ overflow: "hidden" }), p = r[0].tagName === "IMG" ? h : r, d = p[f](), o && (p.css(f, 0), p.css(l, d / 2)), c[f] = o ? d : 0, c[l] = o ? 0 : d / 2, p.animate(c, { queue: !1, duration: t.duration, easing: t.easing, complete: function() { o || r.hide(), e.effects.restore(r, i), e.effects.removeWrapper(r), n() } }) } })(jQuery);
(function(e, t) { e.effects.effect.drop = function(t, n) {
var r = e(this),
i = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"],
s = e.effects.setMode(r, t.mode || "hide"),
o = s === "show",
u = t.direction || "left",
a = u === "up" || u === "down" ? "top" : "left",
f = u === "up" || u === "left" ? "pos" : "neg",
l = { opacity: o ? 1 : 0 },
c;
e.effects.save(r, i), r.show(), e.effects.createWrapper(r), c = t.distance || r[a === "top" ? "outerHeight" : "outerWidth"](!0) / 2, o && r.css("opacity", 0).css(a, f === "pos" ? -c : c), l[a] = (o ? f === "pos" ? "+=" : "-=" : f === "pos" ? "-=" : "+=") + c, r.animate(l, { queue: !1, duration: t.duration, easing: t.easing, complete: function() { s === "hide" && r.hide(), e.effects.restore(r, i), e.effects.removeWrapper(r), n() } }) } })(jQuery);
(function(e, t) { e.effects.effect.explode = function(t, n) {
function y() { c.push(this), c.length === r * i && b() }
function b() { s.css({ visibility: "visible" }), e(c).remove(), u || s.hide(), n() }
var r = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3,
i = r,
s = e(this),
o = e.effects.setMode(s, t.mode || "hide"),
u = o === "show",
a = s.show().css("visibility", "hidden").offset(),
f = Math.ceil(s.outerWidth() / i),
l = Math.ceil(s.outerHeight() / r),
c = [],
h, p, d, v, m, g;
for (h = 0; h < r; h++) { v = a.top + h * l, g = h - (r - 1) / 2;
for (p = 0; p < i; p++) d = a.left + p * f, m = p - (i - 1) / 2, s.clone().appendTo("body").wrap("<div></div>").css({ position: "absolute", visibility: "visible", left: -p * f, top: -h * l }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: f, height: l, left: d + (u ? m * f : 0), top: v + (u ? g * l : 0), opacity: u ? 0 : 1 }).animate({ left: d + (u ? 0 : m * f), top: v + (u ? 0 : g * l), opacity: u ? 1 : 0 }, t.duration || 500, t.easing, y) } } })(jQuery);
(function(e, t) { e.effects.effect.fade = function(t, n) {
var r = e(this),
i = e.effects.setMode(r, t.mode || "toggle");
r.animate({ opacity: i }, { queue: !1, duration: t.duration, easing: t.easing, complete: n }) } })(jQuery);
(function(e, t) { e.effects.effect.fold = function(t, n) {
var r = e(this),
i = ["position", "top", "bottom", "left", "right", "height", "width"],
s = e.effects.setMode(r, t.mode || "hide"),
o = s === "show",
u = s === "hide",
a = t.size || 15,
f = /([0-9]+)%/.exec(a),
l = !!t.horizFirst,
c = o !== l,
h = c ? ["width", "height"] : ["height", "width"],
p = t.duration / 2,
d, v, m = {},
g = {};
e.effects.save(r, i), r.show(), d = e.effects.createWrapper(r).css({ overflow: "hidden" }), v = c ? [d.width(), d.height()] : [d.height(), d.width()], f && (a = parseInt(f[1], 10) / 100 * v[u ? 0 : 1]), o && d.css(l ? { height: 0, width: a } : { height: a, width: 0 }), m[h[0]] = o ? v[0] : a, g[h[1]] = o ? v[1] : 0, d.animate(m, p, t.easing).animate(g, p, t.easing, function() { u && r.hide(), e.effects.restore(r, i), e.effects.removeWrapper(r), n() }) } })(jQuery);
(function(e, t) { e.effects.effect.highlight = function(t, n) {
var r = e(this),
i = ["backgroundImage", "backgroundColor", "opacity"],
s = e.effects.setMode(r, t.mode || "show"),
o = { backgroundColor: r.css("backgroundColor") };
s === "hide" && (o.opacity = 0), e.effects.save(r, i), r.show().css({ backgroundImage: "none", backgroundColor: t.color || "#ffff99" }).animate(o, { queue: !1, duration: t.duration, easing: t.easing, complete: function() { s === "hide" && r.hide(), e.effects.restore(r, i), n() } }) } })(jQuery);
(function(e, t) { e.effects.effect.pulsate = function(t, n) {
var r = e(this),
i = e.effects.setMode(r, t.mode || "show"),
s = i === "show",
o = i === "hide",
u = s || i === "hide",
a = (t.times || 5) * 2 + (u ? 1 : 0),
f = t.duration / a,
l = 0,
c = r.queue(),
h = c.length,
p;
if (s || !r.is(":visible")) r.css("opacity", 0).show(), l = 1;
for (p = 1; p < a; p++) r.animate({ opacity: l }, f, t.easing), l = 1 - l;
r.animate({ opacity: l }, f, t.easing), r.queue(function() { o && r.hide(), n() }), h > 1 && c.splice.apply(c, [1, 0].concat(c.splice(h, a + 1))), r.dequeue() } })(jQuery);
(function(e, t) { e.effects.effect.puff = function(t, n) {
var r = e(this),
i = e.effects.setMode(r, t.mode || "hide"),
s = i === "hide",
o = parseInt(t.percent, 10) || 150,
u = o / 100,
a = { height: r.height(), width: r.width(), outerHeight: r.outerHeight(), outerWidth: r.outerWidth() };
e.extend(t, { effect: "scale", queue: !1, fade: !0, mode: i, complete: n, percent: s ? o : 100, from: s ? a : { height: a.height * u, width: a.width * u, outerHeight: a.outerHeight * u, outerWidth: a.outerWidth * u } }), r.effect(t) }, e.effects.effect.scale = function(t, n) {
var r = e(this),
i = e.extend(!0, {}, t),
s = e.effects.setMode(r, t.mode || "effect"),
o = parseInt(t.percent, 10) || (parseInt(t.percent, 10) === 0 ? 0 : s === "hide" ? 0 : 100),
u = t.direction || "both",
a = t.origin,
f = { height: r.height(), width: r.width(), outerHeight: r.outerHeight(), outerWidth: r.outerWidth() },
l = { y: u !== "horizontal" ? o / 100 : 1, x: u !== "vertical" ? o / 100 : 1 };
i.effect = "size", i.queue = !1, i.complete = n, s !== "effect" && (i.origin = a || ["middle", "center"], i.restore = !0), i.from = t.from || (s === "show" ? { height: 0, width: 0, outerHeight: 0, outerWidth: 0 } : f), i.to = { height: f.height * l.y, width: f.width * l.x, outerHeight: f.outerHeight * l.y, outerWidth: f.outerWidth * l.x }, i.fade && (s === "show" && (i.from.opacity = 0, i.to.opacity = 1), s === "hide" && (i.from.opacity = 1, i.to.opacity = 0)), r.effect(i) }, e.effects.effect.size = function(t, n) {
var r, i, s, o = e(this),
u = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"],
a = ["position", "top", "bottom", "left", "right", "overflow", "opacity"],
f = ["width", "height", "overflow"],
l = ["fontSize"],
c = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
h = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
p = e.effects.setMode(o, t.mode || "effect"),
d = t.restore || p !== "effect",
v = t.scale || "both",
m = t.origin || ["middle", "center"],
g = o.css("position"),
y = d ? u : a,
b = { height: 0, width: 0, outerHeight: 0, outerWidth: 0 };
p === "show" && o.show(), r = { height: o.height(), width: o.width(), outerHeight: o.outerHeight(), outerWidth: o.outerWidth() }, t.mode === "toggle" && p === "show" ? (o.from = t.to || b, o.to = t.from || r) : (o.from = t.from || (p === "show" ? b : r), o.to = t.to || (p === "hide" ? b : r)), s = { from: { y: o.from.height / r.height, x: o.from.width / r.width }, to: { y: o.to.height / r.height, x: o.to.width / r.width } };
if (v === "box" || v === "both") s.from.y !== s.to.y && (y = y.concat(c), o.from = e.effects.setTransition(o, c, s.from.y, o.from), o.to = e.effects.setTransition(o, c, s.to.y, o.to)), s.from.x !== s.to.x && (y = y.concat(h), o.from = e.effects.setTransition(o, h, s.from.x, o.from), o.to = e.effects.setTransition(o, h, s.to.x, o.to));
(v === "content" || v === "both") && s.from.y !== s.to.y && (y = y.concat(l).concat(f), o.from = e.effects.setTransition(o, l, s.from.y, o.from), o.to = e.effects.setTransition(o, l, s.to.y, o.to)), e.effects.save(o, y), o.show(), e.effects.createWrapper(o), o.css("overflow", "hidden").css(o.from), m && (i = e.effects.getBaseline(m, r), o.from.top = (r.outerHeight - o.outerHeight()) * i.y, o.from.left = (r.outerWidth - o.outerWidth()) * i.x, o.to.top = (r.outerHeight - o.to.outerHeight) * i.y, o.to.left = (r.outerWidth - o.to.outerWidth) * i.x), o.css(o.from);
if (v === "content" || v === "both") c = c.concat(["marginTop", "marginBottom"]).concat(l), h = h.concat(["marginLeft", "marginRight"]), f = u.concat(c).concat(h), o.find("*[width]").each(function() {
var n = e(this),
r = { height: n.height(), width: n.width(), outerHeight: n.outerHeight(), outerWidth: n.outerWidth() };
d && e.effects.save(n, f), n.from = { height: r.height * s.from.y, width: r.width * s.from.x, outerHeight: r.outerHeight * s.from.y, outerWidth: r.outerWidth * s.from.x }, n.to = { height: r.height * s.to.y, width: r.width * s.to.x, outerHeight: r.height * s.to.y, outerWidth: r.width * s.to.x }, s.from.y !== s.to.y && (n.from = e.effects.setTransition(n, c, s.from.y, n.from), n.to = e.effects.setTransition(n, c, s.to.y, n.to)), s.from.x !== s.to.x && (n.from = e.effects.setTransition(n, h, s.from.x, n.from), n.to = e.effects.setTransition(n, h, s.to.x, n.to)), n.css(n.from), n.animate(n.to, t.duration, t.easing, function() { d && e.effects.restore(n, f) }) });
o.animate(o.to, { queue: !1, duration: t.duration, easing: t.easing, complete: function() { o.to.opacity === 0 && o.css("opacity", o.from.opacity), p === "hide" && o.hide(), e.effects.restore(o, y), d || (g === "static" ? o.css({ position: "relative", top: o.to.top, left: o.to.left }) : e.each(["top", "left"], function(e, t) { o.css(t, function(t, n) {
var r = parseInt(n, 10),
i = e ? o.to.left : o.to.top;
return n === "auto" ? i + "px" : r + i + "px" }) })), e.effects.removeWrapper(o), n() } }) } })(jQuery);
(function(e, t) { e.effects.effect.shake = function(t, n) {
var r = e(this),
i = ["position", "top", "bottom", "left", "right", "height", "width"],
s = e.effects.setMode(r, t.mode || "effect"),
o = t.direction || "left",
u = t.distance || 20,
a = t.times || 3,
f = a * 2 + 1,
l = Math.round(t.duration / f),
c = o === "up" || o === "down" ? "top" : "left",
h = o === "up" || o === "left",
p = {},
d = {},
v = {},
m, g = r.queue(),
y = g.length;
e.effects.save(r, i), r.show(), e.effects.createWrapper(r), p[c] = (h ? "-=" : "+=") + u, d[c] = (h ? "+=" : "-=") + u * 2, v[c] = (h ? "-=" : "+=") + u * 2, r.animate(p, l, t.easing);
for (m = 1; m < a; m++) r.animate(d, l, t.easing).animate(v, l, t.easing);
r.animate(d, l, t.easing).animate(p, l / 2, t.easing).queue(function() { s === "hide" && r.hide(), e.effects.restore(r, i), e.effects.removeWrapper(r), n() }), y > 1 && g.splice.apply(g, [1, 0].concat(g.splice(y, f + 1))), r.dequeue() } })(jQuery);
(function(e, t) { e.effects.effect.slide = function(t, n) {
var r = e(this),
i = ["position", "top", "bottom", "left", "right", "width", "height"],
s = e.effects.setMode(r, t.mode || "show"),
o = s === "show",
u = t.direction || "left",
a = u === "up" || u === "down" ? "top" : "left",
f = u === "up" || u === "left",
l, c = {};
e.effects.save(r, i), r.show(), l = t.distance || r[a === "top" ? "outerHeight" : "outerWidth"](!0), e.effects.createWrapper(r).css({ overflow: "hidden" }), o && r.css(a, f ? isNaN(l) ? "-" + l : -l : l), c[a] = (o ? f ? "+=" : "-=" : f ? "-=" : "+=") + l, r.animate(c, { queue: !1, duration: t.duration, easing: t.easing, complete: function() { s === "hide" && r.hide(), e.effects.restore(r, i), e.effects.removeWrapper(r), n() } }) } })(jQuery);
(function(e, t) { e.effects.effect.transfer = function(t, n) {
var r = e(this),
i = e(t.to),
s = i.css("position") === "fixed",
o = e("body"),
u = s ? o.scrollTop() : 0,
a = s ? o.scrollLeft() : 0,
f = i.offset(),
l = { top: f.top - u, left: f.left - a, height: i.innerHeight(), width: i.innerWidth() },
c = r.offset(),
h = e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(t.className).css({ top: c.top - u, left: c.left - a, height: r.innerHeight(), width: r.innerWidth(), position: s ? "fixed" : "absolute" }).animate(l, t.duration, t.easing, function() { h.remove(), n() }) } })(jQuery);