/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 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.
 *
 * Version: 3.0.1
 * 
 * Requires: 1.2.2+
 */
(function(a){a.event.special.mousewheel={setup:function(){var b=a.event.special.mousewheel.handler;if(this.addEventListener){this.addEventListener("DOMMouseScroll",b,false);this.addEventListener("mousewheel",b,false)}else{this.onmousewheel=b}},teardown:function(){var b=a.event.special.mousewheel.handler;if(this.removeEventListener){this.removeEventListener("DOMMouseScroll",b,false);this.removeEventListener("mousewheel",b,false)}else{this.onmousewheel=null}},handler:function(d){var b=[].slice.call(arguments,1);d=a.event.fix(d||window.event);d.currentTarget=this;var e=0,c=true;if(d.wheelDelta){e=d.wheelDelta/120}if(d.detail){e=-d.detail/3}d.data=d.data||{};d.type="mousewheel";b.unshift(e);b.unshift(d);return a.event.handle.apply(this,b)}};a.fn.extend({mousewheel:function(b){return b?this.bind("mousewheel",b):this.trigger("mousewheel")},unmousewheel:function(b){return this.unbind("mousewheel",b)}})})(jQuery);
