/**
 * jQuery.LocalScroll - Animated scrolling navigation, using anchors.
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 6/3/2008
 * @author Ariel Flesler
 * @version 1.2.6
 **/
;(function($){var g=location.href.replace(/#.*/,''),h=$.localScroll=function(a){$('body').localScroll(a)};h.defaults={duration:1e3,axis:'y',event:'click',stop:1};h.hash=function(a){a=$.extend({},h.defaults,a);a.hash=0;if(location.hash)setTimeout(function(){i(0,location,a)},0)};$.fn.localScroll=function(b){b=$.extend({},h.defaults,b);return(b.persistent||b.lazy)?this.bind(b.event,function(e){var a=$([e.target,e.target.parentNode]).filter(c)[0];a&&i(e,a,b)}):this.find('a,area').filter(c).bind(b.event,function(e){i(e,this,b)}).end().end();function c(){var a=this;return!!a.href&&!!a.hash&&a.href.replace(a.hash,'')==g&&(!b.filter||$(a).is(b.filter))}};function i(e,a,b){var c=a.hash.slice(1),d=document.getElementById(c)||document.getElementsByName(c)[0],f;if(d){e&&e.preventDefault();f=$(b.target||$.scrollTo.window());if(b.lock&&f.is(':animated')||b.onBefore&&b.onBefore.call(a,e,d,f)===!1)return;if(b.stop)f.queue('fx',[]).stop();f.scrollTo(d,b).trigger('notify.serialScroll',[d]);if(b.hash)f.queue(function(){location=a.hash;$(this).dequeue()})}}})(jQuery);

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 2/19/2008
 * @author Ariel Flesler
 * @version 1.3.3
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(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.scrollable 0.13. Put your HTML scroll.
 * 
 * http://flowplayer.org/tools/scrollable.html
 *
 * Copyright (c) 2008 Tero Piirainen (support@flowplayer.org)
 *
 * Released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * >> Basically you can do anything you want but leave this header as is <<
 *
 * Since  : 0.10 - 03/01/2008
 * Version: 0.13 - Fri Nov 07 2008 16:50:33 GMT-0000 (GMT+00:00)
 */
(function($){function Scrollable(el,config){var self=this;if(!Scrollable.current){Scrollable.current=this;}var opts={size:5,vertical:false,activeClass:'active',speed:300,onSeek:null,clickable:true,items:'.items',prev:'.prev',next:'.next',navi:'.navi',naviItem:'span',loop:false};this.opts=$.extend(opts,config);this.opts.horizontal=!opts.vertical;this.root=$(el);var root=this.root;var itemRoot=$(opts.items,root);if(!itemRoot.length){itemRoot=root;}itemRoot.css({position:'relative',overflow:'hidden',visibility:'visible'});itemRoot.children().wrapAll('<div class="__scrollable" style="position:absolute"/>');this.wrap=itemRoot.find(":first");this.wrap.css(opts.horizontal?"width":"height","200000em").after('<br clear="all" />');this.items=this.wrap.children();this.index=0;if(opts.horizontal){itemRoot.width(opts.size*(this.items.eq(1).offset().left-this.items.eq(0).offset().left)-2);}else{itemRoot.height(opts.size*(this.items.eq(1).offset().top-this.items.eq(0).offset().top)-2);}if($.isFunction($.fn.mousewheel)){root.bind("mousewheel.scrollable",function(e,delta){self.move(-delta,50);return false;});}if(opts.clickable){this.items.each(function(index,arg){$(this).bind("click.scrollable",function(){self.click(index);});});}this.activeIndex=0;$(opts.prev,root).click(function(){self.prev();});$(opts.next,root).click(function(){self.next();});$(opts.navi,root).each(function(){var navi=$(this);var status=self.getStatus();if(navi.is(":empty")){for(var i=0;i<status.pages;i++){var item=$("<"+opts.naviItem+"/>").attr("page",i).click(function(e){var el=$(this);el.parent().children().removeClass(opts.activeClass);el.addClass(opts.activeClass);self.setPage(el.attr("page"));e.preventDefault();});if(i===0){item.addClass(opts.activeClass);}navi.append(item);}}else{var els=navi.find("a");if(!els.length){els=navi.children();}els.each(function(i){var item=$(this);item.attr("page",i);if(i===0){item.addClass(opts.activeClass);}item.click(function(){navi.find("."+opts.activeClass).removeClass(opts.activeClass);item.addClass(opts.activeClass);self.setPage(item.attr("page"));});});}});}$.extend(Scrollable.prototype,{getVersion:function(){return'@VERSION';},click:function(index){var item=this.items.eq(index);var klass=this.opts.activeClass;if(!item.hasClass(klass)&&(index>=0||index<this.items.size())){this.items.removeClass(klass);item.addClass(klass);var delta=Math.floor(this.opts.size/2);var to=index-delta;if(to!==this.activeIndex){this.seekTo(to);}}},getStatus:function(){var len=this.items.size();return{size:this.opts.size,total:len,index:this.index,pages:Math.ceil(len/this.opts.size),page:Math.ceil(this.index/this.opts.size)};},seekTo:function(index,time){if(index<0){index=0;}var max=Math.min(index,this.items.length-this.opts.size);if(index<=max){var item=this.items.eq(index);this.index=index;if(this.opts.horizontal){var left=this.wrap.offset().left-item.offset().left;this.wrap.animate({left:left},time||this.opts.speed);}else{var top=this.wrap.offset().top-item.offset().top;this.wrap.animate({top:top},time||this.opts.speed);}Scrollable.current=this;}if($.isFunction(this.opts.onSeek)){this.opts.onSeek.call(this);}var navi=$(this.opts.navi,this.root);if(navi.length){var klass=this.opts.activeClass;var page=Math.ceil(index/this.opts.size);page=Math.min(page,navi.children().length-1);navi.children().removeClass(klass).eq(page).addClass(klass);}this.activeIndex=index;return true;},move:function(offset,time){var to=this.index+offset;if(this.opts.loop&&to>(this.items.length-this.opts.size)){to=0;}this.seekTo(to,time);},next:function(time){this.move(1,time);},prev:function(time){this.move(-1,time);},movePage:function(offset,time){this.move(this.opts.size*offset,time);},setPage:function(page,time){var size=this.opts.size;var index=size*page;var lastPage=index+size>=this.items.size();if(lastPage){index=this.items.size()-this.opts.size;}this.seekTo(index,time);},prevPage:function(time){this.setPage(this.getStatus().page-1,time);},nextPage:function(time){this.setPage(this.getStatus().page+1,time);},begin:function(time){this.seekTo(0,time);},end:function(time){this.seekTo(this.items.size()-this.opts.size,time);}});$(window).bind("keypress.scrollable",function(evt){var el=Scrollable.current;if(!el){return;}if(el.opts.horizontal&&(evt.keyCode==37||evt.keyCode==39)){el.move(evt.keyCode==37?-1:1);return evt.preventDefault();}if(!el.opts.horizontal&&(evt.keyCode==38||evt.keyCode==40)){el.move(evt.keyCode==38?-1:1);return evt.preventDefault();}return true;});jQuery.prototype.scrollable=function(opts,arg0,arg1){if(!opts||typeof opts=='number'){var index=opts||0;var el=$.data(this.get()[index],"scrollable");if(el){return el;}}this.each(function(){if(typeof opts=="string"){var el=$.data(this,"scrollable");el[opts].apply(el,[arg0,arg1]);}else{var instance=new Scrollable(this,opts);$.data(this,"scrollable",instance);}});return this;};})(jQuery);