//jquery transit (function (k) { k.transit = { version: "0.9.9", propertymap: { marginleft: "margin", marginright: "margin", marginbottom: "margin", margintop: "margin", paddingleft: "padding", paddingright: "padding", paddingbottom: "padding", paddingtop: "padding" }, enabled: true, usetransitionend: false }; var d = document.createelement("div"); var q = {}; function b(v) { if (v in d.style) { return v } var u = ["moz", "webkit", "o", "ms"]; var r = v.charat(0).touppercase() + v.substr(1); if (v in d.style) { return v } for (var t = 0; t < u.length; ++t) { var s = u[t] + r; if (s in d.style) { return s } } } function e() { d.style[q.transform] = ""; d.style[q.transform] = "rotatey(90deg)"; return d.style[q.transform] !== "" } var a = navigator.useragent.tolowercase().indexof("chrome") > -1; q.transition = b("transition"); q.transitiondelay = b("transitiondelay"); q.transform = b("transform"); q.transformorigin = b("transformorigin"); q.transform3d = e(); var i = { transition: "transitionend", moztransition: "transitionend", otransition: "otransitionend", webkittransition: "webkittransitionend", mstransition: "mstransitionend" }; var f = q.transitionend = i[q.transition] || null; for (var p in q) { if (q.hasownproperty(p) && typeof k.support[p] === "undefined") { k.support[p] = q[p] } } d = null; k.cssease = { _default: "ease", "in": "ease-in", out: "ease-out", "in-out": "ease-in-out", snap: "cubic-bezier(0,1,.5,1)", easeoutcubic: "cubic-bezier(.215,.61,.355,1)", easeinoutcubic: "cubic-bezier(.645,.045,.355,1)", easeincirc: "cubic-bezier(.6,.04,.98,.335)", easeoutcirc: "cubic-bezier(.075,.82,.165,1)", easeinoutcirc: "cubic-bezier(.785,.135,.15,.86)", easeinexpo: "cubic-bezier(.95,.05,.795,.035)", easeoutexpo: "cubic-bezier(.19,1,.22,1)", easeinoutexpo: "cubic-bezier(1,0,0,1)", easeinquad: "cubic-bezier(.55,.085,.68,.53)", easeoutquad: "cubic-bezier(.25,.46,.45,.94)", easeinoutquad: "cubic-bezier(.455,.03,.515,.955)", easeinquart: "cubic-bezier(.895,.03,.685,.22)", easeoutquart: "cubic-bezier(.165,.84,.44,1)", easeinoutquart: "cubic-bezier(.77,0,.175,1)", easeinquint: "cubic-bezier(.755,.05,.855,.06)", easeoutquint: "cubic-bezier(.23,1,.32,1)", easeinoutquint: "cubic-bezier(.86,0,.07,1)", easeinsine: "cubic-bezier(.47,0,.745,.715)", easeoutsine: "cubic-bezier(.39,.575,.565,1)", easeinoutsine: "cubic-bezier(.445,.05,.55,.95)", easeinback: "cubic-bezier(.6,-.28,.735,.045)", easeoutback: "cubic-bezier(.175, .885,.32,1.275)", easeinoutback: "cubic-bezier(.68,-.55,.265,1.55)" }; k.csshooks["transit:transform"] = { get: function (r) { return k(r).data("transform") || new j() }, set: function (s, r) { var t = r; if (!(t instanceof j)) { t = new j(t) } if (q.transform === "webkittransform" && !a) { s.style[q.transform] = t.tostring(true) } else { s.style[q.transform] = t.tostring() } k(s).data("transform", t) } }; k.csshooks.transform = { set: k.csshooks["transit:transform"].set }; if (k.fn.jquery < "1.8") { k.csshooks.transformorigin = { get: function (r) { return r.style[q.transformorigin] }, set: function (r, s) { r.style[q.transformorigin] = s } }; k.csshooks.transition = { get: function (r) { return r.style[q.transition] }, set: function (r, s) { r.style[q.transition] = s } } } n("scale"); n("translate"); n("rotate"); n("rotatex"); n("rotatey"); n("rotate3d"); n("perspective"); n("skewx"); n("skewy"); n("x", true); n("y", true); function j(r) { if (typeof r === "string") { this.parse(r) } return this } j.prototype = { setfromstring: function (t, s) { var r = (typeof s === "string") ? s.split(",") : (s.constructor === array) ? s : [s]; r.unshift(t); j.prototype.set.apply(this, r) }, set: function (s) { var r = array.prototype.slice.apply(arguments, [1]); if (this.setter[s]) { this.setter[s].apply(this, r) } else { this[s] = r.join(",") } }, get: function (r) { if (this.getter[r]) { return this.getter[r].apply(this) } else { return this[r] || 0 } }, setter: { rotate: function (r) { this.rotate = o(r, "deg") }, rotatex: function (r) { this.rotatex = o(r, "deg") }, rotatey: function (r) { this.rotatey = o(r, "deg") }, scale: function (r, s) { if (s === undefined) { s = r } this.scale = r + "," + s }, skewx: function (r) { this.skewx = o(r, "deg") }, skewy: function (r) { this.skewy = o(r, "deg") }, perspective: function (r) { this.perspective = o(r, "px") }, x: function (r) { this.set("translate", r, null) }, y: function (r) { this.set("translate", null, r) }, translate: function (r, s) { if (this._translatex === undefined) { this._translatex = 0 } if (this._translatey === undefined) { this._translatey = 0 } if (r !== null && r !== undefined) { this._translatex = o(r, "px") } if (s !== null && s !== undefined) { this._translatey = o(s, "px") } this.translate = this._translatex + "," + this._translatey } }, getter: { x: function () { return this._translatex || 0 }, y: function () { return this._translatey || 0 }, scale: function () { var r = (this.scale || "1,1").split(","); if (r[0]) { r[0] = parsefloat(r[0]) } if (r[1]) { r[1] = parsefloat(r[1]) } return (r[0] === r[1]) ? r[0] : r }, rotate3d: function () { var t = (this.rotate3d || "0,0,0,0deg").split(","); for (var r = 0; r <= 3; ++r) { if (t[r]) { t[r] = parsefloat(t[r]) } } if (t[3]) { t[3] = o(t[3], "deg") } return t } }, parse: function (s) { var r = this; s.replace(/([a-za-z0-9]+)\((.*?)\)/g, function (t, v, u) { r.setfromstring(v, u) }) }, tostring: function (t) { var s = []; for (var r in this) { if (this.hasownproperty(r)) { if ((!q.transform3d) && ((r === "rotatex") || (r === "rotatey") || (r === "perspective") || (r === "transformorigin"))) { continue } if (r[0] !== "_") { if (t && (r === "scale")) { s.push(r + "3d(" + this[r] + ",1)") } else { if (t && (r === "translate")) { s.push(r + "3d(" + this[r] + ",0)") } else { s.push(r + "(" + this[r] + ")") } } } } } return s.join(" ") } }; function m(s, r, t) { if (r === true) { s.queue(t) } else { if (r) { s.queue(r, t) } else { t() } } } function h(s) { var r = []; k.each(s, function (t) { t = k.camelcase(t); t = k.transit.propertymap[t] || k.cssprops[t] || t; t = c(t); if (k.inarray(t, r) === -1) { r.push(t) } }); return r } function g(s, v, x, r) { var t = h(s); if (k.cssease[x]) { x = k.cssease[x] } var w = "" + l(v) + " " + x; if (parseint(r, 10) > 0) { w += " " + l(r) } var u = []; k.each(t, function (z, y) { u.push(y + " " + w) }); return u.join(", ") } k.fn.transition = k.fn.transit = function (z, s, y, c) { var d = this; var u = 0; var w = true; if (typeof s === "function") { c = s; s = undefined } if (typeof y === "function") { c = y; y = undefined } if (typeof z.easing !== "undefined") { y = z.easing; delete z.easing } if (typeof z.duration !== "undefined") { s = z.duration; delete z.duration } if (typeof z.complete !== "undefined") { c = z.complete; delete z.complete } if (typeof z.queue !== "undefined") { w = z.queue; delete z.queue } if (typeof z.delay !== "undefined") { u = z.delay; delete z.delay } if (typeof s === "undefined") { s = k.fx.speeds._default } if (typeof y === "undefined") { y = k.cssease._default } s = l(s); var e = g(z, s, y, u); var b = k.transit.enabled && q.transition; var t = b ? (parseint(s, 10) + parseint(u, 10)) : 0; if (t === 0) { var a = function (f) { d.css(z); if (c) { c.apply(d) } if (f) { f() } }; m(d, w, a); return d } var x = {}; var r = function (h) { var g = false; var f = function () { if (g) { d.unbind(f, f) } if (t > 0) { d.each(function () { this.style[q.transition] = (x[this] || null) }) } if (typeof c === "function") { c.apply(d) } if (typeof h === "function") { h() } }; if ((t > 0) && (f) && (k.transit.usetransitionend)) { g = true; d.bind(f, f) } else { window.settimeout(f, t) } d.each(function () { if (t > 0) { this.style[q.transition] = e } k(this).css(z) }) }; var v = function (f) { this.offsetwidth; r(f) }; m(d, w, v); return this }; function n(s, r) { if (!r) { k.cssnumber[s] = true } k.transit.propertymap[s] = q.transform; k.csshooks[s] = { get: function (v) { var u = k(v).css("transit:transform"); return u.get(s) }, set: function (v, w) { var u = k(v).css("transit:transform"); u.setfromstring(s, w); k(v).css({ "transit:transform": u }) } } } function c(r) { return r.replace(/([a-z])/g, function (s) { return "-" + s.tolowercase() }) } function o(s, r) { if ((typeof s === "string") && (!s.match(/^[\-0-9\.]+$/))) { return s } else { return "" + s + r } } function l(s) { var r = s; if (k.fx.speeds[r]) { r = k.fx.speeds[r] } return o(r, "ms") } k.transit.gettransitionvalue = g })(jquery);