/*! copyright (c) 2011 brandon aaron (http://brandonaaron.net) * licensed under the mit license (license.txt). * * thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * thanks to: mathias bank(http://www.mathias-bank.de) for a scope bug fix. * thanks to: seamus leahy for adding deltax and deltay * * version: 3.0.6 * * requires: 1.2.2+ */ ; (function (a) { function d(b) { var c = b || window.event, d = [].slice.call(arguments, 1), e = 0, f = !0, g = 0, h = 0; return b = a.event.fix(c), b.type = "mousewheel", c.wheeldelta && (e = c.wheeldelta / 120), c.detail && (e = -c.detail / 3), h = e, c.axis !== undefined && c.axis === c.horizontal_axis && (h = 0, g = -1 * e), c.wheeldeltay !== undefined && (h = c.wheeldeltay / 120), c.wheeldeltax !== undefined && (g = -1 * c.wheeldeltax / 120), d.unshift(b, e, g, h), (a.event.dispatch || a.event.handle).apply(this, d) } var b = ["dommousescroll", "mousewheel"]; if (a.event.fixhooks) for (var c = b.length; c;) a.event.fixhooks[b[--c]] = a.event.mousehooks; a.event.special.mousewheel = { setup: function () { if (this.addeventlistener) for (var a = b.length; a;) this.addeventlistener(b[--a], d, !1); else this.onmousewheel = d }, teardown: function () { if (this.removeeventlistener) for (var a = b.length; a;) this.removeeventlistener(b[--a], d, !1); else this.onmousewheel = null } }, a.fn.extend({ mousewheel: function (a) { return a ? this.bind("mousewheel", a) : this.trigger("mousewheel") }, unmousewheel: function (a) { return this.unbind("mousewheel", a) } }) })(jquery) /* * jquery easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ */ // t: current time, b: beginning value, c: change in value, d: duration jquery.easing['jswing'] = jquery.easing['swing']; jquery.extend(jquery.easing, { def: 'easeoutquad', swing: function (x, t, b, c, d) { //alert(jquery.easing.default); return jquery.easing[jquery.easing.def](x, t, b, c, d); }, easeinquad: function (x, t, b, c, d) { return c * (t /= d) * t + b; }, easeoutquad: function (x, t, b, c, d) { return -c * (t /= d) * (t - 2) + b; }, easeinoutquad: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t + b; return -c / 2 * ((--t) * (t - 2) - 1) + b; }, easeincubic: function (x, t, b, c, d) { return c * (t /= d) * t * t + b; }, easeoutcubic: function (x, t, b, c, d) { return c * ((t = t / d - 1) * t * t + 1) + b; }, easeinoutcubic: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t + b; return c / 2 * ((t -= 2) * t * t + 2) + b; }, easeinquart: function (x, t, b, c, d) { return c * (t /= d) * t * t * t + b; }, easeoutquart: function (x, t, b, c, d) { return -c * ((t = t / d - 1) * t * t * t - 1) + b; }, easeinoutquart: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b; return -c / 2 * ((t -= 2) * t * t * t - 2) + b; }, easeinquint: function (x, t, b, c, d) { return c * (t /= d) * t * t * t * t + b; }, easeoutquint: function (x, t, b, c, d) { return c * ((t = t / d - 1) * t * t * t * t + 1) + b; }, easeinoutquint: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b; return c / 2 * ((t -= 2) * t * t * t * t + 2) + b; }, easeinsine: function (x, t, b, c, d) { return -c * math.cos(t / d * (math.pi / 2)) + c + b; }, easeoutsine: function (x, t, b, c, d) { return c * math.sin(t / d * (math.pi / 2)) + b; }, easeinoutsine: function (x, t, b, c, d) { return -c / 2 * (math.cos(math.pi * t / d) - 1) + b; }, easeinexpo: function (x, t, b, c, d) { return (t == 0) ? b : c * math.pow(2, 10 * (t / d - 1)) + b; }, easeoutexpo: function (x, t, b, c, d) { return (t == d) ? b + c : c * (-math.pow(2, -10 * t / d) + 1) + b; }, easeinoutexpo: function (x, t, b, c, d) { if (t == 0) return b; if (t == d) return b + c; if ((t /= d / 2) < 1) return c / 2 * math.pow(2, 10 * (t - 1)) + b; return c / 2 * (-math.pow(2, -10 * --t) + 2) + b; }, easeincirc: function (x, t, b, c, d) { return -c * (math.sqrt(1 - (t /= d) * t) - 1) + b; }, easeoutcirc: function (x, t, b, c, d) { return c * math.sqrt(1 - (t = t / d - 1) * t) + b; }, easeinoutcirc: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return -c / 2 * (math.sqrt(1 - t * t) - 1) + b; return c / 2 * (math.sqrt(1 - (t -= 2) * t) + 1) + b; }, easeinelastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3; if (a < math.abs(c)) { a = c; var s = p / 4; } else var s = p / (2 * math.pi) * math.asin(c / a); return -(a * math.pow(2, 10 * (t -= 1)) * math.sin((t * d - s) * (2 * math.pi) / p)) + b; }, easeoutelastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3; if (a < math.abs(c)) { a = c; var s = p / 4; } else var s = p / (2 * math.pi) * math.asin(c / a); return a * math.pow(2, -10 * t) * math.sin((t * d - s) * (2 * math.pi) / p) + c + b; }, easeinoutelastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d / 2) == 2) return b + c; if (!p) p = d * (.3 * 1.5); if (a < math.abs(c)) { a = c; var s = p / 4; } else var s = p / (2 * math.pi) * math.asin(c / a); if (t < 1) return -.5 * (a * math.pow(2, 10 * (t -= 1)) * math.sin((t * d - s) * (2 * math.pi) / p)) + b; return a * math.pow(2, -10 * (t -= 1)) * math.sin((t * d - s) * (2 * math.pi) / p) * .5 + c + b; }, easeinback: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c * (t /= d) * t * ((s + 1) * t - s) + b; }, easeoutback: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; }, easeinoutback: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b; return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; }, easeinbounce: function (x, t, b, c, d) { return c - jquery.easing.easeoutbounce(x, d - t, 0, c, d) + b; }, easeoutbounce: function (x, t, b, c, d) { if ((t /= d) < (1 / 2.75)) { return c * (7.5625 * t * t) + b; } else if (t < (2 / 2.75)) { return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b; } else if (t < (2.5 / 2.75)) { return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b; } else { return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b; } }, easeinoutbounce: function (x, t, b, c, d) { if (t < d / 2) return jquery.easing.easeinbounce(x, t * 2, 0, c, d) * .5 + b; return jquery.easing.easeoutbounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b; } });