(function($){$.event.special.mousewheel={setup:function(){var b=$.event.special.mousewheel.handler;if($.browser.mozilla)$(this).bind('mousemove.mousewheel',function(a){$.data(this,'mwcursorposdata',{pageX:a.pageX,pageY:a.pageY,clientX:a.clientX,clientY:a.clientY})});if(this.addEventListener)this.addEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),b,false);else this.onmousewheel=b},teardown:function(){var a=$.event.special.mousewheel.handler;$(this).unbind('mousemove.mousewheel');if(this.removeEventListener)this.removeEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),a,false);else this.onmousewheel=function(){};$.removeData(this,'mwcursorposdata')},handler:function(a){var b=Array.prototype.slice.call(arguments,1);a=$.event.fix(a||window.event);$.extend(a,$.data(this,'mwcursorposdata')||{});var c=0,returnValue=true;if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;a.data=a.data||{};a.type="mousewheel";b.unshift(c);b.unshift(a);return $.event.handle.apply(this,b)}};$.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);