/*
 * jQuery TOOLS plugin :: scrollable.mousewheel 1.0.1
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/scrollable.html#mousewheel
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 *
 * Launch  : September 2009
 * Date: ${date}
 * Revision: ${revision} 
 *
 * 
 * jquery.event.wheel.js - rev 1 
 * Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
 * Liscensed under the MIT License (MIT-LICENSE.txt)
 * http://www.opensource.org/licenses/mit-license.php
 * Created: 2008-07-01 | Updated: 2008-07-14
 */
(function(b) { b.fn.wheel = function(e) { return this[e ? "bind" : "trigger"]("wheel", e) }; b.event.special.wheel = { setup: function() { b.event.add(this, d, c, {}) }, teardown: function() { b.event.remove(this, d, c) } }; var d = !b.browser.mozilla ? "mousewheel" : "DOMMouseScroll" + (b.browser.version < "1.9" ? " mousemove" : ""); function c(e) { switch (e.type) { case "mousemove": return b.extend(e.data, { clientX: e.clientX, clientY: e.clientY, pageX: e.pageX, pageY: e.pageY }); case "DOMMouseScroll": b.extend(e, e.data); e.delta = -e.detail / 3; break; case "mousewheel": e.delta = e.wheelDelta / 120; break } e.type = "wheel"; return b.event.handle.call(this, e, e.delta) } var a = b.tools.scrollable; a.plugins = a.plugins || {}; a.plugins.mousewheel = { version: "1.0.1", conf: { api: false, speed: 50} }; b.fn.mousewheel = function(f) { var g = b.extend({}, a.plugins.mousewheel.conf), e; if (typeof f == "number") { f = { speed: f} } f = b.extend(g, f); this.each(function() { var h = b(this).scrollable(); if (h) { e = h } h.getRoot().wheel(function(i, j) { h.move(j < 0 ? 1 : -1, f.speed || 50); return false }) }); return f.api ? e : this } })(jQuery);
