/* 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.2
 * 
 * Requires: 1.2.2+
 */
(function(C){var A=["DOMMouseScroll","mousewheel"];C.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var D=A.length;D;){this.addEventListener(A[--D],B,false)}}else{this.onmousewheel=B}},teardown:function(){if(this.removeEventListener){for(var D=A.length;D;){this.removeEventListener(A[--D],B,false)}}else{this.onmousewheel=null}}};C.fn.extend({mousewheel:function(D){return D?this.bind("mousewheel",D):this.trigger("mousewheel")},unmousewheel:function(D){return this.unbind("mousewheel",D)}});function B(F){var D=[].slice.call(arguments,1),G=0,E=true;F=C.event.fix(F||window.event);F.type="mousewheel";if(F.wheelDelta){G=F.wheelDelta/120}if(F.detail){G=-F.detail/3}D.unshift(F,G);return C.event.handle.apply(this,D)}})(jQuery);