(function($){var ver="2.88";if($.support==undefined)$.support={opacity:!$.browser.msie};function debug(s){if($.fn.cycle.debug)log(s)}function log(){if(window.console&&window.console.log)window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2)});return this}log("terminating; zero elements found by selector"+
($.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false)return;opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return}var opts2=
buildOptions($cont,$slides,els,opts,o);if(opts2===false)return;var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.rev);if(startTime){startTime+=opts2.delay||0;if(startTime<10)startTime=10;debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts2.rev&&!opts.backwards)},startTime)}})};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined)cont.cycleStop=0;if(options===undefined||options===null)options=
{};if(options.constructor==String){switch(options){case "destroy":case "stop":var opts=$(cont).data("cycle.opts");if(!opts)return false;cont.cycleStop++;if(cont.cycleTimeout)clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy")destroy(opts);return false;case "toggle":cont.cyclePause=cont.cyclePause===1?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case "pause":cont.cyclePause=1;return false;case "resume":cont.cyclePause=0;checkInstantResume(false,
arg2,cont);return false;case "prev":case "next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false}$.fn.cycle[options](opts);return false;default:options={fx:options}}return options}else if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false}options.nextSlide=
num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0}if(typeof arg2=="string")options.oneTimeFx=arg2;go(options.elements,options,1,num>=options.currSlide);return false}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0}go(options.elements,options,1,!opts.rev&&
!opts.backwards)}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter)try{el.style.removeAttribute("filter")}catch(smother){}}function destroy(opts){if(opts.next)$(opts.next).unbind(opts.prevNextEvent);if(opts.prev)$(opts.prev).unbind(opts.prevNextEvent);if(opts.pager||opts.pagerAnchorBuilder)$.each(opts.pagerAnchors||[],function(){this.unbind().remove()});opts.pagerAnchors=null;if(opts.destroy)opts.destroy(opts)}function buildOptions($cont,$slides,els,options,o){var opts=
$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop)opts.countdown=opts.autostopCount||els.length;var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0});if(!$.support.opacity&&opts.cleartype)opts.after.push(function(){removeFilter(this,opts)});if(opts.continuous)opts.after.push(function(){go(els,
opts,0,!opts.rev&&!opts.backwards)});saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($slides);if($cont.css("position")=="static")$cont.css("position","relative");if(opts.width)$cont.width(opts.width);if(opts.height&&opts.height!="auto")$cont.height(opts.height);if(opts.startingSlide)opts.startingSlide=parseInt(opts.startingSlide);else if(opts.backwards)opts.startingSlide=els.length-1;if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++)opts.randomMap.push(i);
opts.randomMap.sort(function(a,b){return Math.random()-0.5});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1]}else if(opts.startingSlide>=els.length)opts.startingSlide=0;opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards)z=first?i<=first?els.length+(i-first):first-i:els.length-i;else z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z)});$(els[first]).css("opacity",
1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width)$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!="auto")$slides.height(opts.height);var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w)w=e.offsetWidth||e.width||$e.attr("width");if(!h)h=e.offsetHeight||e.height||$e.attr("height");maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh}if(maxw>0&&maxh>0)$cont.css({width:maxw+
"px",height:maxh+"px"})}if(opts.pause)$cont.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(supportMultiTransitions(opts)===false)return false;var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=opts.fit&&opts.height?opts.height:$el.height()||this.offsetHeight||this.height||$el.attr("height")||0;this.cycleW=opts.fit&&opts.width?opts.width:$el.width()||this.offsetWidth||this.width||$el.attr("width")||0;if($el.is("img")){var loadingIE=
$.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete;var loadingFF=$.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var loadingOp=$.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete;var loadingOther=this.cycleH==0&&this.cycleW==0&&!this.complete;if(loadingIE||loadingFF||loadingOp||loadingOther)if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",
this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options)},opts.requeueTimeout);requeue=true;return false}else log("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(requeue)return false;opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst)$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==
String)opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);if(!opts.sync)opts.speed=opts.speed/2;var buffer=opts.fx=="shuffle"?500:250;while(opts.timeout-opts.speed<buffer)opts.timeout+=opts.speed}if(opts.easing)opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)opts.speedIn=opts.speed;if(!opts.speedOut)opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex]}else if(opts.backwards)opts.nextSlide=
opts.startingSlide==0?els.length-1:opts.startingSlide-1;else opts.nextSlide=opts.startingSlide>=els.length-1?0:opts.startingSlide+1;if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))init($cont,$slides,opts);else if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false}}var e0=$slides[first];if(opts.before.length)opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)opts.after[1].apply(e0,[e0,e0,opts,
true]);if(opts.next)$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1)});if(opts.prev)$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1)});if(opts.pager||opts.pagerAnchorBuilder)buildPager(els,opts);exposeAddSlide(opts,els);return opts}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},
opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this)});$.each(opts.after,function(){opts.original.after.push(this)})}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",
fx);opts.fxs.splice(i,1);i--}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false}}else if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx))opts.fxs.push(p)}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0])}debug("randomized fx sequence: ",opts.fxs)}return true}
function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)opts.countdown++;els[prepend?"unshift":"push"](s);if(opts.els)opts.els[prepend?"unshift":"push"](s);opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($s);if(opts.fit&&opts.width)$s.width(opts.width);if(opts.fit&&
opts.height&&opts.height!="auto")$slides.height(opts.height);s.cycleH=opts.fit&&opts.height?opts.height:$s.height();s.cycleW=opts.fit&&opts.width?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder)$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if($.isFunction(opts.onAddSlide))opts.onAddSlide($s);else $s.hide()}}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);
opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this)});$.each(opts.original.after,function(){opts.after.push(this)});var init=$.fn.cycle.transitions[fx];if($.isFunction(init))init(opts.$cont,$(opts.elements),opts)};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");
$(els).stop(true,true);opts.busy=false}if(opts.busy){debug("transition active, ignoring new tx request");return}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual)return;if(!manual&&!p.cyclePause&&!opts.bounce&&(opts.autostop&&--opts.countdown<=0||opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide)){if(opts.end)opts.end(opts);return}var changed=false;if((manual||!p.cyclePause)&&opts.nextSlide!=opts.currSlide){changed=
true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length)opts.lastFx=0;fx=opts.fxs[opts.lastFx];opts.currFx=fx}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null}$.fn.cycle.resetState(opts,fx);if(opts.before.length)$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,
[curr,next,opts,fwd])});var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd])})};debug("tx firing; currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn)opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else if($.isFunction($.fn.cycle[opts.fx]))$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else $.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent)}if(changed||
opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide)opts.nextSlide=opts.currSlide==opts.slideCount-1?0:opts.currSlide+1}else if(opts.backwards){var roll=opts.nextSlide-1<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0}else{opts.nextSlide=roll?els.length-1:opts.nextSlide-
1;opts.currSlide=roll?0:opts.nextSlide+1}}else{var roll=opts.nextSlide+1==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1}}}if(changed&&opts.pager)opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);var ms=0;if(opts.timeout&&!opts.continuous)ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);else if(opts.continuous&&
p.cyclePause)ms=10;if(ms>0)p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev&&!opts.backwards)},ms)}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName)})};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(t-opts.speed<250)t+=opts.speed;debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false)return t}return opts.timeout}
$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1)};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1)};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2)opts.randomIndex=els.length-2;else if(opts.randomIndex==-1)opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex]}else if(opts.random)opts.nextSlide=
opts.randomMap[opts.randomIndex];else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return false;opts.nextSlide=els.length-1}else if(opts.nextSlide>=els.length){if(opts.nowrap)return false;opts.nextSlide=0}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb))cb(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,val>=0);return false}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts)});
opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass)}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a)}else a='<a href="#">'+(i+1)+"</a>";if(!a)return;var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0])});$a=$(arr)}else $a.appendTo($p)}opts.pagerAnchors=
opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb))cb(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide<i)});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble)$a.bind("click.cycle",function(){return false});if(opts.pauseOnPagerHover)$a.hover(function(){opts.$cont[0].cyclePause++},
function(){opts.$cont[0].cyclePause--})};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd)hops=c>l?c-l:opts.slideCount-l;else hops=c<l?l-c:l+opts.slideCount-c;return hops};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=
v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])}if(v&&v!="transparent")return v}}}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0)opts.cssBefore.width=next.cycleW;if(h!==false&&next.cycleH>0)opts.cssBefore.height=next.cycleH;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",
opts.slideCount+(rev===true?0:1))};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number")speedIn=speedOut=speedOverride;else speedIn=speedOut=1;easeIn=easeOut=null}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb)};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter)$l.css(opts.cssAfter);
if(!opts.sync)fn()});if(opts.sync)fn()};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0}}};$.fn.cycle.ver=function(){return ver};$.fn.cycle.defaults={fx:"fade",timeout:4E3,timeoutFn:null,continuous:0,speed:1E3,speedIn:null,speedOut:null,next:null,prev:null,
onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,
fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false}})(jQuery);
(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after()}};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h}};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);
var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h}};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w}};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);
var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w}};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?next.cycleW-1:1-next.cycleW;opts.animOut.left=fwd?-curr.cycleW:curr.cycleW});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0}};$.fn.cycle.transitions.scrollVert=
function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?1-next.cycleH:next.cycleH-1;opts.animOut.top=fwd?curr.cycleH:-curr.cycleH});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0}};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,
opts,false,true);opts.animIn.width=next.cycleW});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0}};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0}};$.fn.cycle.transitions.shuffle=function($cont,$slides,
opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true)});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++)opts.els.push($slides[i]);for(i=0;i<opts.currSlide;i++)opts.els.push(opts.els.shift());opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);
$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++)fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());if(fwd)for(var i=0,len=opts.els.length;i<len;i++)$(opts.els[i]).css("z-index",len-i+count);else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count)}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();
if(cb)cb()})})};opts.cssBefore={display:"block",opacity:1,top:0,left:0}};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0}};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,
next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0}};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0}};$.fn.cycle.transitions.turnRight=function($cont,
$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0}};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,
height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2}});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0}};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH}});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0}};
$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w}};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,
opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h}};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w}};$.fn.cycle.transitions.growX=
function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0}});opts.cssBefore={width:0,top:0}};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0}});opts.cssBefore=
{height:0,left:0}};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0}});opts.cssBefore={top:0,width:0}};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=
next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0}});opts.cssBefore={left:0,height:0}};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right")opts.cssBefore.left=-w;else if(d=="up")opts.cssBefore.top=h;else if(d=="down")opts.cssBefore.top=-h;else opts.cssBefore.left=
w});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0}};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right")opts.animOut.left=w;else if(d=="up")opts.animOut.top=-h;else if(d=="down")opts.animOut.top=h;else opts.animOut.left=-w});opts.animIn={left:0,top:0};opts.animOut=
{opacity:1};opts.cssBefore={top:0,left:0}};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top)opts.animOut={left:w*2,top:-h/2,opacity:0};else opts.animOut.opacity=0});opts.cssBefore={left:0,top:0};opts.animIn={left:0}};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow",
"hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip)if(/l2r/.test(opts.clip))clip="rect(0px 0px "+h+"px 0px)";else if(/r2l/.test(opts.clip))clip="rect(0px "+w+"px "+h+"px "+w+"px)";else if(/t2b/.test(opts.clip))clip="rect(0px "+w+"px 0px 0px)";else if(/b2t/.test(opts.clip))clip="rect("+h+"px "+w+"px "+h+"px 0px)";else if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)"}opts.cssBefore.clip=
opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next)return;var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt(opts.speedIn/13)-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*
((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});step++<=count?setTimeout(f,13):$curr.css("display","none")})()});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0}}})(jQuery);
(function($){var URI=location.href.replace(/#.*/,"");var $localScroll=$.localScroll=function(settings){$("body").localScroll(settings)};$localScroll.defaults={duration:1E3,axis:"y",event:"click",stop:true,target:window,reset:true,hash:true};$localScroll.hash=function(settings){if(location.hash){settings=$.extend({},$localScroll.defaults,settings);settings.hash=false;if(settings.reset){var d=settings.duration;delete settings.duration;$(settings.target).scrollTo(0,settings);settings.duration=d}scroll(0,
location,settings)}};$.fn.localScroll=function(settings){settings=$.extend({},$localScroll.defaults,settings);return settings.lazy?this.bind(settings.event,function(e){var a=$([e.target,e.target.parentNode]).filter(filter)[0];if(a)scroll(e,a,settings)}):this.find("a,area").filter(filter).bind(settings.event,function(e){scroll(e,this,settings)}).end().end();function filter(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,"")==URI&&(!settings.filter||$(this).is(settings.filter))}};function scroll(e,
link,settings){var id=link.hash.slice(1),elem=document.getElementById(id)||document.getElementsByName(id)[0];if(!elem)return;if(e)e.preventDefault();var $target=$(settings.target);if(settings.lock&&$target.is(":animated")||settings.onBefore&&settings.onBefore.call(settings,e,elem,$target)===false)return;if(settings.stop)$target.stop(true);if(settings.hash){var attr=elem.id==id?"id":"name",$a=$("<a> </a>").attr(attr,id).css({position:"absolute",top:$(window).scrollTop(),left:$(window).scrollLeft()});
elem[attr]="";$("body").prepend($a);location=link.hash;$a.remove();elem[attr]=id}$target.scrollTo(elem,settings).trigger("notify.serialScroll",[elem])}})(jQuery);
(function($){var $scrollTo=$.scrollTo=function(target,duration,settings){$(window).scrollTo(target,duration,settings)};$scrollTo.defaults={axis:"xy",duration:parseFloat($.fn.jquery)>=1.3?0:1};$scrollTo.window=function(scope){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var elem=this,isWin=!elem.nodeName||$.inArray(elem.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!isWin)return elem;var doc=(elem.contentWindow||elem).document||elem.ownerDocument||
elem;return $.browser.safari||doc.compatMode=="BackCompat"?doc.body:doc.documentElement})};$.fn.scrollTo=function(target,duration,settings){if(typeof duration=="object"){settings=duration;duration=0}if(typeof settings=="function")settings={onAfter:settings};if(target=="max")target=9E9;settings=$.extend({},$scrollTo.defaults,settings);duration=duration||settings.speed||settings.duration;settings.queue=settings.queue&&settings.axis.length>1;if(settings.queue)duration/=2;settings.offset=both(settings.offset);
settings.over=both(settings.over);return this._scrollable().each(function(){var elem=this,$elem=$(elem),targ=target,toff,attr={},win=$elem.is("html,body");switch(typeof targ){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);case "object":if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(settings.axis.split(""),function(i,axis){var Pos=axis=="x"?"Left":"Top",pos=Pos.toLowerCase(),key="scroll"+Pos,old=elem[key],max=$scrollTo.max(elem,
axis);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(targ.css("margin"+Pos))||0;attr[key]-=parseInt(targ.css("border"+Pos+"Width"))||0}attr[key]+=settings.offset[pos]||0;if(settings.over[pos])attr[key]+=targ[axis=="x"?"width":"height"]()*settings.over[pos]}else{var val=targ[pos];attr[key]=val.slice&&val.slice(-1)=="%"?parseFloat(val)/100*max:val}if(/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&settings.queue){if(old!=
attr[key])animate(settings.onAfterFirst);delete attr[key]}});animate(settings.onAfter);function animate(callback){$elem.animate(attr,duration,settings.easing,callback&&function(){callback.call(this,target,settings)})}}).end()};$scrollTo.max=function(elem,axis){var Dim=axis=="x"?"Width":"Height",scroll="scroll"+Dim;if(!$(elem).is("html,body"))return elem[scroll]-$(elem)[Dim.toLowerCase()]();var size="client"+Dim,html=elem.ownerDocument.documentElement,body=elem.ownerDocument.body;return Math.max(html[scroll],
body[scroll])-Math.min(html[size],body[size])};function both(val){return typeof val=="object"?val:{top:val,left:val}}})(jQuery);
(function($){var $serialScroll=$.serialScroll=function(settings){$.scrollTo.window().serialScroll(settings)};$serialScroll.defaults={duration:1E3,axis:"x",event:"click",start:0,step:1,lock:true,cycle:true,constant:true};$.fn.serialScroll=function(settings){settings=$.extend({},$serialScroll.defaults,settings);var event=settings.event,step=settings.step,lazy=settings.lazy;return this.each(function(){var context=settings.target?this:document,$pane=$(settings.target||this,context),pane=$pane[0],items=
settings.items,active=settings.start,auto=settings.interval,nav=settings.navigation,timer;if(!lazy)items=getItems();if(settings.force)jump({},active);$(settings.prev||[],context).bind(event,-step,move);$(settings.next||[],context).bind(event,step,move);if(!pane.ssbound)$pane.bind("prev.serialScroll",-step,move).bind("next.serialScroll",step,move).bind("goto.serialScroll",jump);if(auto)$pane.bind("start.serialScroll",function(e){if(!auto){clear();auto=true;next()}}).bind("stop.serialScroll",function(){clear();
auto=false});$pane.bind("notify.serialScroll",function(e,elem){var i=index(elem);if(i>-1)active=i});pane.ssbound=true;if(settings.jump)(lazy?$pane:getItems()).bind(event,function(e){jump(e,index(e.target))});if(nav)nav=$(nav,context).bind(event,function(e){e.data=Math.round(getItems().length/nav.length)*nav.index(this);jump(e,this)});function move(e){e.data+=active;jump(e,this)}function jump(e,button){if(!isNaN(button)){e.data=button;button=pane}var pos=e.data,n,real=e.type,$items=settings.exclude?
getItems().slice(0,-settings.exclude):getItems(),limit=$items.length,elem=$items[pos],duration=settings.duration;if(real)e.preventDefault();if(auto){clear();timer=setTimeout(next,settings.interval)}if(!elem){n=pos<0?0:limit-1;if(active!=n)pos=n;else if(!settings.cycle)return;else pos=limit-n-1;elem=$items[pos]}if(!elem||real&&active==pos||settings.lock&&$pane.is(":animated")||real&&settings.onBefore&&settings.onBefore.call(button,e,elem,$pane,getItems(),pos)===false)return;if(settings.stop)$pane.queue("fx",
[]).stop();if(settings.constant)duration=Math.abs(duration/step*(active-pos));$pane.scrollTo(elem,duration,settings).trigger("notify.serialScroll",[pos])}function next(){$pane.trigger("next.serialScroll")}function clear(){clearTimeout(timer)}function getItems(){return $(items,pane)}function index(elem){if(!isNaN(elem))return elem;var $items=getItems(),i;while((i=$items.index(elem))==-1&&elem!=pane)elem=elem.parentNode;return i}})}})(jQuery);jQuery.easing["jswing"]=jQuery.easing["swing"];
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*(--t*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/
2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,
t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return t==0?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return t==d?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},
easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*0.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*
Math.PI/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*0.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*2*Math.PI/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*0.3*1.5;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-0.5*a*Math.pow(2,10*
(t-=1))*Math.sin((t*d-s)*2*Math.PI/p)+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p)*0.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*t*t*(((s*=1.525)+1)*t-s)+b;return c/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-
jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<1/2.75)return c*7.5625*t*t+b;else if(t<2/2.75)return c*(7.5625*(t-=1.5/2.75)*t+0.75)+b;else if(t<2.5/2.75)return c*(7.5625*(t-=2.25/2.75)*t+0.9375)+b;else return c*(7.5625*(t-=2.625/2.75)*t+0.984375)+b},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*0.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b}});
$(document).ready(function(){var $panels=$("#scroll-content-inner .pane");var $container=$("#scroll-content-inner");var horizontal=true;if(horizontal){$panels.css({"float":"left",position:"relative"});$container.css("width",$panels[0].offsetWidth*$panels.length)}var $scroll=$("#scroll-content").css("overflow","hidden");function selectNav(){$(this).parents("nav").find("a").removeClass("selected").end().end().addClass("selected")}$("nav#main").find("a").click(selectNav);function trigger(data){var el=
$("nav#main").find('a[href$="'+data.id+'"]').get(0);selectNav.call(el)}if(window.location.hash)trigger({id:window.location.hash.substr(1)});else $("nav#main a:first").click();var offset_left=Math.ceil($(window).width()/2);var half_panel_width=Math.ceil($panels[0].offsetWidth/2);var scrollOptions={target:$scroll,items:$panels,navigation:"nav#main a",prev:"img.left",next:"img.right",axis:"xy",onAfter:function(){$("nav#main li").removeClass("active");showActiveTab()},duration:1E3,easing:"easeOutQuart",
offset:{left:0}};$.localScroll(scrollOptions);$.localScroll(scrollOptions);scrollOptions.duration=1;$.localScroll.hash(scrollOptions)});
(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");
this.tooltipText=this.title;$(this).removeAttr("title");this.alt=""}).mouseover(save).mouseout(hide).click(hide)},fixPNG:IE?function(){return this.each(function(){var image=$(this).css("backgroundImage");if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css("position");if(position!="absolute"&&position!=
"relative")$(this).css("position","relative")})}})}:function(){return this},unfixPNG:IE?function(){return this.each(function(){$(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><p></p><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();
if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$("p",helper.parent);helper.body=$("div.body",helper.parent);helper.url=$("div.url",helper.parent)}function settings(element){return $.data(element,"tooltip")}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else show();track=!!settings(this).track;$(document.body).bind("mousemove",update);update(event)}function save(){if($.tooltip.blocked||this==current||!this.tooltipText&&!settings(this).bodyHandler)return;
current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery)helper.body.empty().append(bodyContent);else helper.body.html(bodyContent);helper.body.show()}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;part=parts[i];i++){if(i>0)helper.body.append("<br/>");helper.body.append(part)}helper.body.hideWhenEmpty()}else{helper.title.html(title).show();
helper.body.hide()}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace("http://","")).show();else helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments)}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade)if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else helper.parent.is(":visible")?helper.parent.fadeTo(settings(current).fade,
current.tOpacity):helper.parent.fadeIn(settings(current).fade);else helper.parent.show();update()}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION")return;if(!track&&helper.parent.is(":visible"))$(document.body).unbind("mousemove",update);if(current==null){$(document.body).unbind("mousemove",update);return}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=
event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right="auto";if(settings(current).positionLeft){right=$(window).width()-left;left="auto"}helper.parent.css({left:left,right:right,top:top})}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+"px"}).addClass("viewport-right")}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+
"px"}).addClass("viewport-bottom")}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()}}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","")}if((!IE||!$.fn.bgiframe)&&tsettings.fade)if(helper.parent.is(":animated"))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else helper.parent.stop().fadeOut(tsettings.fade,
complete);else complete();if(settings(this).fixPNG)helper.parent.unfixPNG()}})(jQuery);
(function($){var types=["DOMMouseScroll","mousewheel"];$.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var i=types.length;i;)this.addEventListener(types[--i],handler,false);else this.onmousewheel=handler},teardown:function(){if(this.removeEventListener)for(var i=types.length;i;)this.removeEventListener(types[--i],handler,false);else this.onmousewheel=null}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",
fn)}});function handler(event){var orgEvent=event||window.event,args=[].slice.call(arguments,1),delta=0,returnValue=true,deltaX=0,deltaY=0;event=$.event.fix(orgEvent);event.type="mousewheel";if(event.wheelDelta)delta=event.wheelDelta/120;if(event.detail)delta=-event.detail/3;deltaY=delta;if(orgEvent.axis!==undefined&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){deltaY=0;deltaX=-1*delta}if(orgEvent.wheelDeltaY!==undefined)deltaY=orgEvent.wheelDeltaY/120;if(orgEvent.wheelDeltaX!==undefined)deltaX=-1*orgEvent.wheelDeltaX/
120;args.unshift(event,delta,deltaX,deltaY);return $.event.handle.apply(this,args)}})(jQuery);
(function($,window,undefined){$.fn.jScrollPane=function(settings){function JScrollPane(elem,s){var settings,jsp=this,pane,paneWidth,paneHeight,container,contentWidth,contentHeight,percentInViewH,percentInViewV,isScrollableV,isScrollableH,verticalDrag,dragMaxY,verticalDragPosition,horizontalDrag,dragMaxX,horizontalDragPosition,verticalBar,verticalTrack,scrollbarWidth,verticalTrackHeight,verticalDragHeight,arrowUp,arrowDown,horizontalBar,horizontalTrack,horizontalTrackWidth,horizontalDragWidth,arrowLeft,
arrowRight,reinitialiseInterval,originalPadding,originalPaddingTotalWidth,previousPaneWidth,wasAtTop=true,wasAtLeft=true,wasAtBottom=false,wasAtRight=false,mwEvent=$.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";originalPadding=elem.css("paddingTop")+" "+elem.css("paddingRight")+" "+elem.css("paddingBottom")+" "+elem.css("paddingLeft");originalPaddingTotalWidth=(parseInt(elem.css("paddingLeft"))||0)+(parseInt(elem.css("paddingRight"))||0);initialise(s);function initialise(s){var clonedElem,
tempWrapper,isMaintainingPositon,lastContentX,lastContentY,hasContainingSpaceChanged;settings=s;if(pane==undefined){elem.css({overflow:"hidden",padding:0});paneWidth=elem.innerWidth()+originalPaddingTotalWidth;paneHeight=elem.innerHeight();elem.width(paneWidth);pane=$('<div class="jspPane" />').wrap($('<div class="jspContainer" />').css({width:paneWidth+"px",height:paneHeight+"px"}));elem.wrapInner(pane.parent());container=elem.find(">.jspContainer");pane=container.find(">.jspPane");pane.css("padding",
originalPadding)}else{elem.css("width","");hasContainingSpaceChanged=elem.outerWidth()+originalPaddingTotalWidth!=paneWidth||elem.outerHeight()!=paneHeight;if(hasContainingSpaceChanged){paneWidth=elem.innerWidth()+originalPaddingTotalWidth;paneHeight=elem.innerHeight();container.css({width:paneWidth+"px",height:paneHeight+"px"})}previousPaneWidth=pane.innerWidth();if(!hasContainingSpaceChanged&&pane.outerWidth()==contentWidth&&pane.outerHeight()==contentHeight){if(isScrollableH||isScrollableV){pane.css("width",
previousPaneWidth+"px");elem.css("width",previousPaneWidth+originalPaddingTotalWidth+"px")}return}pane.css("width","");elem.css("width",paneWidth+"px");container.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}clonedElem=pane.clone().css("position","absolute");tempWrapper=$('<div style="width:1px; position: relative;" />').append(clonedElem);$("body").append(tempWrapper);contentWidth=Math.max(pane.outerWidth(),clonedElem.outerWidth());tempWrapper.remove();contentHeight=pane.outerHeight();
percentInViewH=contentWidth/paneWidth;percentInViewV=contentHeight/paneHeight;isScrollableV=percentInViewV>1;isScrollableH=percentInViewH>1;if(!(isScrollableH||isScrollableV)){elem.removeClass("jspScrollable");pane.css({top:0,width:container.width()-originalPaddingTotalWidth});removeMousewheel();removeFocusHandler();removeKeyboardNav();removeClickOnTrack();unhijackInternalLinks()}else{elem.addClass("jspScrollable");isMaintainingPositon=settings.maintainPosition&&(verticalDragPosition||horizontalDragPosition);
if(isMaintainingPositon){lastContentX=contentPositionX();lastContentY=contentPositionY()}initialiseVerticalScroll();initialiseHorizontalScroll();resizeScrollbars();if(isMaintainingPositon){scrollToX(lastContentX);scrollToY(lastContentY)}initFocusHandler();initMousewheel();if(settings.enableKeyboardNavigation)initKeyboardNav();if(settings.clickOnTrack)initClickOnTrack();observeHash();if(settings.hijackInternalLinks)hijackInternalLinks()}if(settings.autoReinitialise&&!reinitialiseInterval)reinitialiseInterval=
setInterval(function(){initialise(settings)},settings.autoReinitialiseDelay);else if(!settings.autoReinitialise&&reinitialiseInterval)clearInterval(reinitialiseInterval);elem.trigger("jsp-initialised",[isScrollableH||isScrollableV])}function initialiseVerticalScroll(){if(isScrollableV){container.append($('<div class="jspVerticalBar" />').append($('<div class="jspCap jspCapTop" />'),$('<div class="jspTrack" />').append($('<div class="jspDrag" />').append($('<div class="jspDragTop" />'),$('<div class="jspDragBottom" />'))),
$('<div class="jspCap jspCapBottom" />')));verticalBar=container.find(">.jspVerticalBar");verticalTrack=verticalBar.find(">.jspTrack");verticalDrag=verticalTrack.find(">.jspDrag");if(settings.showArrows){arrowUp=$('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",getArrowScroll(0,-1)).bind("click.jsp",nil);arrowDown=$('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",getArrowScroll(0,1)).bind("click.jsp",nil);if(settings.arrowScrollOnHover){arrowUp.bind("mouseover.jsp",getArrowScroll(0,
-1,arrowUp));arrowDown.bind("mouseover.jsp",getArrowScroll(0,1,arrowDown))}appendArrows(verticalTrack,settings.verticalArrowPositions,arrowUp,arrowDown)}verticalTrackHeight=paneHeight;container.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){verticalTrackHeight-=$(this).outerHeight()});verticalDrag.hover(function(){verticalDrag.addClass("jspHover")},function(){verticalDrag.removeClass("jspHover")}).bind("mousedown.jsp",function(e){$("html").bind("dragstart.jsp selectstart.jsp",
function(){return false});verticalDrag.addClass("jspActive");var startY=e.pageY-verticalDrag.position().top;$("html").bind("mousemove.jsp",function(e){positionDragY(e.pageY-startY,false)}).bind("mouseup.jsp mouseleave.jsp",cancelDrag);return false});sizeVerticalScrollbar()}}function sizeVerticalScrollbar(){verticalTrack.height(verticalTrackHeight+"px");verticalDragPosition=0;scrollbarWidth=settings.verticalGutter+verticalTrack.outerWidth();pane.width(paneWidth-scrollbarWidth-originalPaddingTotalWidth);
if(verticalBar.position().left==0)pane.css("margin-left",scrollbarWidth+"px")}function initialiseHorizontalScroll(){if(isScrollableH){container.append($('<div class="jspHorizontalBar" />').append($('<div class="jspCap jspCapLeft" />'),$('<div class="jspTrack" />').append($('<div class="jspDrag" />').append($('<div class="jspDragLeft" />'),$('<div class="jspDragRight" />'))),$('<div class="jspCap jspCapRight" />')));horizontalBar=container.find(">.jspHorizontalBar");horizontalTrack=horizontalBar.find(">.jspTrack");
horizontalDrag=horizontalTrack.find(">.jspDrag");if(settings.showArrows){arrowLeft=$('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",getArrowScroll(-1,0)).bind("click.jsp",nil);arrowRight=$('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",getArrowScroll(1,0)).bind("click.jsp",nil);if(settings.arrowScrollOnHover){arrowLeft.bind("mouseover.jsp",getArrowScroll(-1,0,arrowLeft));arrowRight.bind("mouseover.jsp",getArrowScroll(1,0,arrowRight))}appendArrows(horizontalTrack,settings.horizontalArrowPositions,
arrowLeft,arrowRight)}horizontalDrag.hover(function(){horizontalDrag.addClass("jspHover")},function(){horizontalDrag.removeClass("jspHover")}).bind("mousedown.jsp",function(e){$("html").bind("dragstart.jsp selectstart.jsp",function(){return false});horizontalDrag.addClass("jspActive");var startX=e.pageX-horizontalDrag.position().left;$("html").bind("mousemove.jsp",function(e){positionDragX(e.pageX-startX,false)}).bind("mouseup.jsp mouseleave.jsp",cancelDrag);return false});horizontalTrackWidth=container.innerWidth();
sizeHorizontalScrollbar()}else;}function sizeHorizontalScrollbar(){container.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){horizontalTrackWidth-=$(this).outerWidth()});horizontalTrack.width(horizontalTrackWidth+"px");horizontalDragPosition=0}function resizeScrollbars(){if(isScrollableH&&isScrollableV){var horizontalTrackHeight=horizontalTrack.outerHeight(),verticalTrackWidth=verticalTrack.outerWidth();verticalTrackHeight-=horizontalTrackHeight;$(horizontalBar).find(">.jspCap:visible,>.jspArrow").each(function(){horizontalTrackWidth+=
$(this).outerWidth()});horizontalTrackWidth-=verticalTrackWidth;paneHeight-=verticalTrackWidth;paneWidth-=horizontalTrackHeight;horizontalTrack.parent().append($('<div class="jspCorner" />').css("width",horizontalTrackHeight+"px"));sizeVerticalScrollbar();sizeHorizontalScrollbar()}if(isScrollableH)pane.width(container.outerWidth()-originalPaddingTotalWidth+"px");contentHeight=pane.outerHeight();percentInViewV=contentHeight/paneHeight;if(isScrollableH){horizontalDragWidth=1/percentInViewH*horizontalTrackWidth;
if(horizontalDragWidth>settings.horizontalDragMaxWidth)horizontalDragWidth=settings.horizontalDragMaxWidth;else if(horizontalDragWidth<settings.horizontalDragMinWidth)horizontalDragWidth=settings.horizontalDragMinWidth;horizontalDrag.width(horizontalDragWidth+"px");dragMaxX=horizontalTrackWidth-horizontalDragWidth;_positionDragX(horizontalDragPosition)}if(isScrollableV){verticalDragHeight=1/percentInViewV*verticalTrackHeight;if(verticalDragHeight>settings.verticalDragMaxHeight)verticalDragHeight=
settings.verticalDragMaxHeight;else if(verticalDragHeight<settings.verticalDragMinHeight)verticalDragHeight=settings.verticalDragMinHeight;verticalDrag.height(verticalDragHeight+"px");dragMaxY=verticalTrackHeight-verticalDragHeight;_positionDragY(verticalDragPosition)}}function appendArrows(ele,p,a1,a2){var p1="before",p2="after",aTemp;if(p=="os")p=/Mac/.test(navigator.platform)?"after":"split";if(p==p1)p2=p;else if(p==p2){p1=p;aTemp=a1;a1=a2;a2=aTemp}ele[p1](a1)[p2](a2)}function getArrowScroll(dirX,
dirY,ele){return function(){arrowScroll(dirX,dirY,this,ele);this.blur();return false}}function arrowScroll(dirX,dirY,arrow,ele){arrow=$(arrow).addClass("jspActive");var eve,doScroll=function(){if(dirX!=0)positionDragX(horizontalDragPosition+dirX*settings.arrowButtonSpeed,false);if(dirY!=0)positionDragY(verticalDragPosition+dirY*settings.arrowButtonSpeed,false)},scrollInt=setInterval(doScroll,settings.arrowRepeatFreq);doScroll();eve=ele==undefined?"mouseup.jsp":"mouseout.jsp";ele=ele||$("html");ele.bind(eve,
function(){arrow.removeClass("jspActive");clearInterval(scrollInt);ele.unbind(eve)})}function initClickOnTrack(){removeClickOnTrack();if(isScrollableV)verticalTrack.bind("mousedown.jsp",function(e){if(e.originalTarget==undefined||e.originalTarget==e.currentTarget){var clickedTrack=$(this),scrollInt=setInterval(function(){var offset=clickedTrack.offset(),pos=e.pageY-offset.top;if(verticalDragPosition+verticalDragHeight<pos)positionDragY(verticalDragPosition+settings.trackClickSpeed);else if(pos<verticalDragPosition)positionDragY(verticalDragPosition-
settings.trackClickSpeed);else cancelClick()},settings.trackClickRepeatFreq),cancelClick=function(){scrollInt&&clearInterval(scrollInt);scrollInt=null;$(document).unbind("mouseup.jsp",cancelClick)};$(document).bind("mouseup.jsp",cancelClick);return false}});if(isScrollableH)horizontalTrack.bind("mousedown.jsp",function(e){if(e.originalTarget==undefined||e.originalTarget==e.currentTarget){var clickedTrack=$(this),scrollInt=setInterval(function(){var offset=clickedTrack.offset(),pos=e.pageX-offset.left;
if(horizontalDragPosition+horizontalDragWidth<pos)positionDragX(horizontalDragPosition+settings.trackClickSpeed);else if(pos<horizontalDragPosition)positionDragX(horizontalDragPosition-settings.trackClickSpeed);else cancelClick()},settings.trackClickRepeatFreq),cancelClick=function(){scrollInt&&clearInterval(scrollInt);scrollInt=null;$(document).unbind("mouseup.jsp",cancelClick)};$(document).bind("mouseup.jsp",cancelClick);return false}})}function removeClickOnTrack(){horizontalTrack&&horizontalTrack.unbind("mousedown.jsp");
verticalTrack&&verticalTrack.unbind("mousedown.jsp")}function cancelDrag(){$("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");verticalDrag&&verticalDrag.removeClass("jspActive");horizontalDrag&&horizontalDrag.removeClass("jspActive")}function positionDragY(destY,animate){if(!isScrollableV)return;if(destY<0)destY=0;else if(destY>dragMaxY)destY=dragMaxY;if(animate==undefined)animate=settings.animateScroll;if(animate)jsp.animate(verticalDrag,"top",destY,_positionDragY);
else{verticalDrag.css("top",destY);_positionDragY(destY)}}function _positionDragY(destY){if(destY==undefined)destY=verticalDrag.position().top;container.scrollTop(0);verticalDragPosition=destY;var isAtTop=verticalDragPosition==0,isAtBottom=verticalDragPosition==dragMaxY,percentScrolled=destY/dragMaxY,destTop=-percentScrolled*(contentHeight-paneHeight);if(wasAtTop!=isAtTop||wasAtBottom!=isAtBottom){wasAtTop=isAtTop;wasAtBottom=isAtBottom;elem.trigger("jsp-arrow-change",[wasAtTop,wasAtBottom,wasAtLeft,
wasAtRight])}updateVerticalArrows(isAtTop,isAtBottom);pane.css("top",destTop);elem.trigger("jsp-scroll-y",[-destTop,isAtTop,isAtBottom])}function positionDragX(destX,animate){if(!isScrollableH)return;if(destX<0)destX=0;else if(destX>dragMaxX)destX=dragMaxX;if(animate==undefined)animate=settings.animateScroll;if(animate)jsp.animate(horizontalDrag,"left",destX,_positionDragX);else{horizontalDrag.css("left",destX);_positionDragX(destX)}}function _positionDragX(destX){if(destX==undefined)destX=horizontalDrag.position().left;
container.scrollTop(0);horizontalDragPosition=destX;var isAtLeft=horizontalDragPosition==0,isAtRight=horizontalDragPosition==dragMaxX,percentScrolled=destX/dragMaxX,destLeft=-percentScrolled*(contentWidth-paneWidth);if(wasAtLeft!=isAtLeft||wasAtRight!=isAtRight){wasAtLeft=isAtLeft;wasAtRight=isAtRight;elem.trigger("jsp-arrow-change",[wasAtTop,wasAtBottom,wasAtLeft,wasAtRight])}updateHorizontalArrows(isAtLeft,isAtRight);pane.css("left",destLeft);elem.trigger("jsp-scroll-x",[-destLeft,isAtLeft,isAtRight])}
function updateVerticalArrows(isAtTop,isAtBottom){if(settings.showArrows){arrowUp[isAtTop?"addClass":"removeClass"]("jspDisabled");arrowDown[isAtBottom?"addClass":"removeClass"]("jspDisabled")}}function updateHorizontalArrows(isAtLeft,isAtRight){if(settings.showArrows){arrowLeft[isAtLeft?"addClass":"removeClass"]("jspDisabled");arrowRight[isAtRight?"addClass":"removeClass"]("jspDisabled")}}function scrollToY(destY,animate){var percentScrolled=destY/(contentHeight-paneHeight);positionDragY(percentScrolled*
dragMaxY,animate)}function scrollToX(destX,animate){var percentScrolled=destX/(contentWidth-paneWidth);positionDragX(percentScrolled*dragMaxX,animate)}function scrollToElement(ele,stickToTop,animate){var e,eleHeight,eleTop=0,viewportTop,maxVisibleEleTop,destY;try{e=$(ele)}catch(err){return}eleHeight=e.outerHeight();container.scrollTop(0);while(!e.is(".jspPane")){eleTop+=e.position().top;e=e.offsetParent();if(/^body|html$/i.test(e[0].nodeName))return}viewportTop=contentPositionY();maxVisibleEleTop=
viewportTop+paneHeight;if(eleTop<viewportTop||stickToTop)destY=eleTop-settings.verticalGutter;else if(eleTop+eleHeight>maxVisibleEleTop)destY=eleTop-paneHeight+eleHeight+settings.verticalGutter;if(destY)scrollToY(destY,animate)}function contentPositionX(){return-pane.position().left}function contentPositionY(){return-pane.position().top}function initMousewheel(){container.unbind(mwEvent).bind(mwEvent,function(event,delta,deltaX,deltaY){var dX=horizontalDragPosition,dY=verticalDragPosition;positionDragX(horizontalDragPosition+
deltaX*settings.mouseWheelSpeed,false);positionDragY(verticalDragPosition-deltaY*settings.mouseWheelSpeed,false);return dX==horizontalDragPosition&&dY==verticalDragPosition})}function removeMousewheel(){container.unbind(mwEvent)}function nil(){return false}function initFocusHandler(){pane.unbind("focusin.jsp").bind("focusin.jsp",function(e){if(e.target===pane[0])return;scrollToElement(e.target,false)})}function removeFocusHandler(){pane.unbind("focusin.jsp")}function initKeyboardNav(){var pressed,
pressedTimer;elem.attr("tabindex",0).unbind("keydown.jsp").bind("keydown.jsp",function(e){if(e.target!==elem[0])return;var dX=horizontalDragPosition,dY=verticalDragPosition,step=pressed?2:16;switch(e.keyCode){case 40:positionDragY(verticalDragPosition+step,false);break;case 38:positionDragY(verticalDragPosition-step,false);break;case 34:case 32:scrollToY(contentPositionY()+Math.max(32,paneHeight)-16);break;case 33:scrollToY(contentPositionY()-paneHeight+16);break;case 35:scrollToY(contentHeight-paneHeight);
break;case 36:scrollToY(0);break;case 39:positionDragX(horizontalDragPosition+step,false);break;case 37:positionDragX(horizontalDragPosition-step,false);break}if(!(dX==horizontalDragPosition&&dY==verticalDragPosition)){pressed=true;clearTimeout(pressedTimer);pressedTimer=setTimeout(function(){pressed=false},260);return false}});if(settings.hideFocus){elem.css("outline","none");if("hideFocus"in container[0])elem.attr("hideFocus",true)}else{elem.css("outline","");if("hideFocus"in container[0])elem.attr("hideFocus",
false)}}function removeKeyboardNav(){elem.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp")}function observeHash(){if(location.hash&&location.hash.length>1){var e,retryInt;try{e=$(location.hash)}catch(err){return}if(e.length&&pane.find(e))if(container.scrollTop()==0)retryInt=setInterval(function(){if(container.scrollTop()>0){scrollToElement(location.hash,true);$(document).scrollTop(container.position().top);clearInterval(retryInt)}},50);else{scrollToElement(location.hash,true);$(document).scrollTop(container.position().top)}}}
function unhijackInternalLinks(){$("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function hijackInternalLinks(){unhijackInternalLinks();$("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var uriParts=this.href.split("#"),hash;if(uriParts.length>1){hash=uriParts[1];if(hash.length>0&&pane.find("#"+hash).length>0){scrollToElement("#"+hash,true);return false}}})}$.extend(jsp,{reinitialise:function(s){s=$.extend({},s,settings);initialise(s)},scrollToElement:function(ele,
stickToTop,animate){scrollToElement(ele,stickToTop,animate)},scrollTo:function(destX,destY,animate){scrollToX(destX,animate);scrollToY(destY,animate)},scrollToX:function(destX,animate){scrollToX(destX,animate)},scrollToY:function(destY,animate){scrollToY(destY,animate)},scrollBy:function(deltaX,deltaY,animate){jsp.scrollByX(deltaX,animate);jsp.scrollByY(deltaY,animate)},scrollByX:function(deltaX,animate){var destX=contentPositionX()+deltaX,percentScrolled=destX/(contentWidth-paneWidth);positionDragX(percentScrolled*
dragMaxX,animate)},scrollByY:function(deltaY,animate){var destY=contentPositionY()+deltaY,percentScrolled=destY/(contentHeight-paneHeight);positionDragY(percentScrolled*dragMaxY,animate)},animate:function(ele,prop,value,stepCallback){var params={};params[prop]=value;ele.animate(params,{duration:settings.animateDuration,ease:settings.animateEase,queue:false,step:stepCallback})},getContentPositionX:function(){return contentPositionX()},getContentPositionY:function(){return contentPositionY()},getIsScrollableH:function(){return isScrollableH},
getIsScrollableV:function(){return isScrollableV},getContentPane:function(){return pane},scrollToBottom:function(animate){positionDragY(dragMaxY,animate)},hijackInternalLinks:function(){hijackInternalLinks()}})}settings=$.extend({},$.fn.jScrollPane.defaults,settings);var ret;this.each(function(){var elem=$(this),jspApi=elem.data("jsp");if(jspApi)jspApi.reinitialise(settings);else{jspApi=new JScrollPane(elem,settings);elem.data("jsp",jspApi)}ret=ret?ret.add(elem):elem});return ret};$.fn.jScrollPane.defaults=
{showArrows:false,maintainPosition:true,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:10,arrowButtonSpeed:10,arrowRepeatFreq:100,arrowScrollOnHover:false,trackClickSpeed:30,trackClickRepeatFreq:100,verticalArrowPositions:"split",horizontalArrowPositions:"split",
enableKeyboardNavigation:true,hideFocus:false}})(jQuery,this);
