/*! Copyright (c) 2010 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.4
 * 
 * Requires: 1.2.2+
 */
(function (a) { function c(b) { var c = b || window.event, d = [].slice.call(arguments, 1), e = 0, f = true, g = 0, h = 0; b = a.event.fix(c); b.type = "mousewheel"; if (b.wheelDelta) { e = b.wheelDelta / 120 } if (b.detail) { e = -b.detail / 3 } h = e; if (c.axis !== undefined && c.axis === c.HORIZONTAL_AXIS) { h = 0; g = -1 * e } if (c.wheelDeltaY !== undefined) { h = c.wheelDeltaY / 120 } if (c.wheelDeltaX !== undefined) { g = -1 * c.wheelDeltaX / 120 } d.unshift(b, e, g, h); return a.event.handle.apply(this, d) } var b = ["DOMMouseScroll", "mousewheel"]; a.event.special.mousewheel = { setup: function () { if (this.addEventListener) { for (var a = b.length; a; ) { this.addEventListener(b[--a], c, false) } } else { this.onmousewheel = c } }, teardown: function () { if (this.removeEventListener) { for (var a = b.length; a; ) { this.removeEventListener(b[--a], c, false) } } 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)
