/*!
 * jQuery Tools v1.2.5 - The missing UI library for the Web
 * 
 * scrollable/scrollable.js
 * scrollable/scrollable.autoscroll.js
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 */


(function (a) {
	a.tools = a.tools || {
		version: "@VERSION"
	}, a.tools.scrollable = {
		conf: {
			activeClass: "active",
			circular: !1,
			clonedClass: "cloned",
			disabledClass: "disabled",
			easing: "swing",
			initialIndex: 0,
			item: null,
			items: ".items",
			keyboard: !0,
			mousewheel: !1,
			next: ".next",
			prev: ".prev",
			speed: 400,
			vertical: !1,
			touch: !0,
			wheelSpeed: 0
		}
	};

	var b = a.tools.scrollable;
	b.autoscroll = {
		conf: {
			autoplay: !0,
			interval: 3e3,
			autopause: !0
		}
	}, a.fn.autoscroll = function (c) {
		typeof c == "number" && (c = {
			interval: c
		});
		var d = a.extend({}, b.autoscroll.conf, c),
            e;
		this.each(function () {
			var b = a(this).data("scrollable");
			b && (e = b);
			var c, f = !0;
			b.play = function () {
				c || (f = !1, c = setInterval(function () {
					b.next()
				}, d.interval))
			}, b.pause = function () {
				c = clearInterval(c)
			}, b.stop = function () {
				b.pause(), f = !0
			}, d.autopause && b.getRoot().add(b.getNaviButtons()).hover(b.pause, b.play), d.autoplay && b.play()
		});
		return d.api ? e : this
	}
})(jQuery)
