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