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