(function(b){b.tools=b.tools||{};b.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardsteps:null,disabledclass:"disabled",hoverclass:null,clickable:true,activeclass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevpage:".prevpage",nextpage:".nextpage",api:false}};var c;function a(o,m){var r=this,p=b(this),d=!m.vertical,e=o.children(),k=0,i;if(!c){c=r}b.each(m,function(s,t){if(b.isfunction(t)){p.bind(s,t)}});if(e.length>1){e=b(m.items,o)}function l(t){var s=b(t);return m.globalnav?s:o.parent().find(t)}o.data("finder",l);var f=l(m.prev),h=l(m.next),g=l(m.prevpage),n=l(m.nextpage);b.extend(r,{getindex:function(){return k},getclickindex:function(){var s=r.getitems();return s.index(s.filter("."+m.activeclass))},getconf:function(){return m},getsize:function(){return r.getitems().size()},getpageamount:function(){return math.ceil(this.getsize()/m.size)},getpageindex:function(){return math.ceil(k/m.size)},getnavibuttons:function(){return f.add(h).add(g).add(n)},getroot:function(){return o},getitemwrap:function(){return e},getitems:function(){return e.children(m.item)},getvisibleitems:function(){return r.getitems().slice(k,k+m.size)},seekto:function(s,w,t){if(s<0){s=0}if(k===s){return r}if(b.isfunction(w)){t=w}if(s>r.getsize()-m.size){return m.loop?r.begin():this.end()}var u=r.getitems().eq(s);if(!u.length){return r}var v=b.event("onbeforeseek");p.trigger(v,[s]);if(v.isdefaultprevented()){return r}if(w===undefined||b.isfunction(w)){w=m.speed}function x(){if(t){t.call(r,s)}p.trigger("onseek",[s])}if(d){e.animate({left:-u.position().left},w,m.easing,x)}else{e.animate({top:-u.position().top},w,m.easing,x)}c=r;k=s;v=b.event("onstart");p.trigger(v,[s]);if(v.isdefaultprevented()){return r}f.add(g).toggleclass(m.disabledclass,s===0);h.add(n).toggleclass(m.disabledclass,s>=r.getsize()-m.size);return r},move:function(u,t,s){i=u>0;return this.seekto(k+u,t,s)},next:function(t,s){return this.move(1,t,s)},prev:function(t,s){return this.move(-1,t,s)},movepage:function(w,v,u){i=w>0;var s=m.size*w;var t=k%m.size;if(t>0){s+=(w>0?-t:m.size-t)}return this.move(s,v,u)},prevpage:function(t,s){return this.movepage(-1,t,s)},nextpage:function(t,s){return this.movepage(1,t,s)},setpage:function(t,u,s){return this.seekto(t*m.size,u,s)},begin:function(t,s){i=false;return this.seekto(0,t,s)},end:function(t,s){i=true;var u=this.getsize()-m.size;return u>0?this.seekto(u,t,s):r},reload:function(){p.trigger("onreload");return r},focus:function(){c=r;return r},click:function(u){var v=r.getitems().eq(u),s=m.activeclass,t=m.size;if(u<0||u>=r.getsize()){return r}if(t==1){if(m.loop){return r.next()}if(u===0||u==r.getsize()-1){i=(i===undefined)?true:!i}return i===false?r.prev():r.next()}if(t==2){if(u==k){u--}r.getitems().removeclass(s);v.addclass(s);return r.seekto(u,time,fn)}if(!v.hasclass(s)){r.getitems().removeclass(s);v.addclass(s);var x=math.floor(t/2);var w=u-x;if(w>r.getsize()-t){w=r.getsize()-t}if(w!==u){return r.seekto(w)}}return r},bind:function(s,t){p.bind(s,t);return r},unbind:function(s){p.unbind(s);return r}});b.each("onbeforeseek,onstart,onseek,onreload".split(","),function(s,t){r[t]=function(u){return r.bind(t,u)}});f.addclass(m.disabledclass).click(function(){r.prev()});h.click(function(){r.next()});n.click(function(){r.nextpage()});if(r.getsize()"))}g=l.children().each(function(n){var o=b(this);o.click(function(p){i.setpage(n);return p.preventdefault()});if(d.indexed){o.text(n)}if(d.idprefix){o.attr("id",d.idprefix+n)}})}else{g=d.naviitem?l.find(d.naviitem):l.children();g.each(function(n){var o=b(this);o.click(function(p){i.setpage(n);return p.preventdefault()})})}g.eq(0).addclass(d.activeclass)}i.onstart(function(o,n){var m=d.activeclass;g.removeclass(m).eq(i.getpageindex()).addclass(m)});i.onreload(function(){j()});j();var h=g.filter("[href="+location.hash+"]");if(h.length){i.move(g.index(h))}});return d.api?c:this}})(jquery); (function(b){var a=b.tools.scrollable;a.plugins=a.plugins||{};a.plugins.autoscroll={version:"1.0.1",conf:{autoplay:true,interval:3000,autopause:true,steps:1,api:false}};b.fn.autoscroll=function(d){if(typeof d=="number"){d={interval:d}}var e=b.extend({},a.plugins.autoscroll.conf),c;b.extend(e,d);this.each(function(){var g=b(this).scrollable();if(g){c=g}var i,f,h=true;g.play=function(){if(i){return}h=false;i=setinterval(function(){g.move(e.steps)},e.interval);g.move(e.steps)};g.pause=function(){i=clearinterval(i)};g.stop=function(){g.pause();h=true};if(e.autopause){g.getroot().add(g.getnavibuttons()).hover(function(){g.pause();clearinterval(f)},function(){if(!h){f=settimeout(g.play,e.interval)}})}if(e.autoplay){settimeout(g.play,e.interval)}});return e.api?c:this}})(jquery);