/**
 * jQuery.serialScroll - Animated scrolling of series
 * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com
 * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
 * Date: 2/18/2008
 * @author Ariel Flesler
 * @version 1.0.1
 **/
;(function($){var p=$.serialScroll=function(a){$.scrollTo.window().serialScroll(a)};p.defaults={duration:1e3,axis:'x',event:'click',start:0,step:1,lock:1,cycle:1};$.fn.serialScroll=function(f){f=$.extend({},p.defaults,f);var g=f.event,h=f.step,i=f.duration/h;return this.each(function(){var d=$(this),n=f.lazy?f.items:$(f.items,d),o=f.start;if(f.force)k({data:o});$(f.prev||[]).bind(g,-h,j);$(f.next||[]).bind(g,h,j);if(!f.lazy&&f.jump)n.bind(g,function(e){e.data=n.index(this);k(e,this)});function j(e){e.data+=o;k(e,this)};function k(e,a){var b=e.data,l=$(n,d),m=l.length;if(a)e.preventDefault();b%=m;if(b<0)b+=m;var c=l[b];if(f.lock&&d.is(':animated')||!f.cycle&&!l[e.data]||a&&f.onBefore&&f.onBefore.call(a,e,c,d)===false)return;if(f.stop)d.queue('fx',[]).stop();f.duration=i*Math.abs(o-b);d.scrollTo(c,f);o=b}})}})(jQuery);