/*! copyright (c) 2011 brandon aaron (http://brandonaaron.net) * licensed under the mit license (license.txt). * * 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. * thanks to: seamus leahy for adding deltax and deltay * * version: 3.0.6 * * requires: 1.2.2+ */ (function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheeldelta&&(f=b.wheeldelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.horizontal_axis&&(g=0,e=-1*f);b.wheeldeltay!==void 0&&(g=b.wheeldeltay/120);b.wheeldeltax!==void 0&&(e=-1*b.wheeldeltax/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["dommousescroll","mousewheel"];if(d.event.fixhooks)for(var h=c.length;h;)d.event.fixhooks[c[--h]]= d.event.mousehooks;d.event.special.mousewheel={setup:function(){if(this.addeventlistener)for(var a=c.length;a;)this.addeventlistener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeeventlistener)for(var a=c.length;a;)this.removeeventlistener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jquery);