/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Date: 2/19/2008
 * @author Ariel Flesler
 * @version 1.3.3
 */
;(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

/**
 * jQuery.SerialScroll - Animated scrolling of series
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 8/3/2008
 * @author Ariel Flesler
 * @version 1.1.2
 *
 * http://flesler.blogspot.com/2008/02/jqueryserialscroll.html
 */
;(function($){var a='serialScroll',b='.'+a,c='bind',u=$[a]=function(b){$.scrollTo.window()[a](b)};u.defaults={duration:1000,axis:'x',event:'click',start:0,step:1,lock:1,cycle:1};$.fn[a]=function(q){q=$.extend({},u.defaults,q);var r=q.event,s=q.step,t=q.duration/s;return this.each(function(){var h=$(this),j=q.lazy?q.items:$(q.items,h),k=q.start,l;if(q.force)n.call(this,{},k);$(q.prev||[])[c](r,-s,m);$(q.next||[])[c](r,s,m);h[c]('prev'+b,-s,m)[c]('next'+b,s,m)[c]('goto'+b,n)[c]('start'+b,function(e,i){if(!q.interval){q.interval=i||1000;p();o()}})[c]('stop'+b,function(){p();q.interval=0});if(!q.lazy&&q.jump)j[c](r,function(e){e.data=j.index(this);n(e,this)});function m(e){e.data+=k;n(e,this)};function n(e,a){if(typeof a=='number'){e.data=a;a=this}var b=e.data,c,d=e.type,f=$(j,h),g=f.length;if(d)e.preventDefault();b%=g;if(b<0)b+=g;c=f[b];if(q.interval){p();l=setTimeout(o,q.interval)}if(isNaN(b)||d&&k==b||q.lock&&h.is(':animated')||!q.cycle&&!f[e.data]||d&&q.onBefore&&q.onBefore.call(a,e,c,h,f,b)===!1)return;if(q.stop)h.queue('fx',[]).stop();q.duration=Math.abs(t*(k-b));h.scrollTo(c,q);k=b};function o(){h.trigger('next'+b)};function p(){clearTimeout(l)}})}})(jQuery);