window.log=function(){log.history=log.history||[];log.history.push(arguments);arguments.callee=arguments.callee.caller;if(this.console){console.log(Array.prototype.slice.call(arguments))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})(window.console=window.console||{});(function(d,e,f){d.fn.jScrollPane=function(a){function c(br,bc){var bk,ba=this,a2,bF,aK,bD,a7,a1,s,aO,bi,bS,bs,aW,bh,aX,aV,a0,a6,bz,a3,aM,bv,by,bK,bC,bl,aT,bu,bm,aI,bq,bP,aZ,bf,bG=true,bb=true,bQ=false,aU=false,bA=br.clone(false,false).empty(),bN=d.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";bP=br.css("paddingTop")+" "+br.css("paddingRight")+" "+br.css("paddingBottom")+" "+br.css("paddingLeft");aZ=(parseInt(br.css("paddingLeft"),10)||0)+(parseInt(br.css("paddingRight"),10)||0);function bx(i){var k,j,o,m,n,g,h,l;bk=i;if(a2===f){h=br.scrollTop();l=br.scrollLeft();br.css({overflow:"hidden",padding:0});bF=br.innerWidth()+aZ;aK=br.innerHeight();br.width(bF);a2=d('<div class="jspPane" />').css("padding",bP).append(br.children());bD=d('<div class="jspContainer" />').css({width:bF+"px",height:aK+"px"}).append(a2).appendTo(br)}else{br.css("width","");g=br.innerWidth()+aZ!=bF||br.outerHeight()!=aK;if(g){bF=br.innerWidth()+aZ;aK=br.innerHeight();bD.css({width:bF+"px",height:aK+"px"})}if(!g&&bf==a7&&a2.outerHeight()==a1){br.width(bF);return}bf=a7;a2.css("width","");br.width(bF);bD.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}k=a2.clone(false,false).css("position","absolute");j=d('<div style="width:1px; position: relative;" />').append(k);d("body").append(j);a7=Math.max(a2.outerWidth(),k.outerWidth());j.remove();a1=a2.outerHeight();s=a7/bF;aO=a1/aK;bi=aO>1;bS=s>1;if(!(bS||bi)){br.removeClass("jspScrollable");a2.css({top:0,width:bD.width()-aZ});aR();bp();a9();aJ();bH()}else{br.addClass("jspScrollable");o=bk.maintainPosition&&(bh||a0);if(o){m=bU();n=bW()}bR();bw();bn();if(o){bd(m,false);be(n,false)}bg();bJ();bB();if(bk.enableKeyboardNavigation){a8()}if(bk.clickOnTrack){aP()}bt();if(bk.hijackInternalLinks){aS()}}if(bk.autoReinitialise&&!bq){bq=setInterval(function(){bx(bk)},bk.autoReinitialiseDelay)}else{if(!bk.autoReinitialise&&bq){clearInterval(bq)}}h&&br.scrollTop(0)&&be(h,false);l&&br.scrollLeft(0)&&bd(l,false);br.trigger("jsp-initialised",[bS||bi])}function bR(){if(bi){bD.append(d('<div class="jspVerticalBar" />').append(d('<div class="jspCap jspCapTop" />'),d('<div class="jspTrack" />').append(d('<div class="jspDrag" />').append(d('<div class="jspDragTop" />'),d('<div class="jspDragBottom" />'))),d('<div class="jspCap jspCapBottom" />')));a6=bD.find(">.jspVerticalBar");bz=a6.find(">.jspTrack");bs=bz.find(">.jspDrag");if(bk.showArrows){by=d('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",bT(0,-1)).bind("click.jsp",bV);bK=d('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",bT(0,1)).bind("click.jsp",bV);if(bk.arrowScrollOnHover){by.bind("mouseover.jsp",bT(0,-1,by));bK.bind("mouseover.jsp",bT(0,1,bK))}bE(bz,bk.verticalArrowPositions,by,bK)}aM=aK;bD.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){aM-=d(this).outerHeight()});bs.hover(function(){bs.addClass("jspHover")},function(){bs.removeClass("jspHover")}).bind("mousedown.jsp",function(h){d("html").bind("dragstart.jsp selectstart.jsp",bV);bs.addClass("jspActive");var g=h.pageY-bs.position().top;d("html").bind("mousemove.jsp",function(i){a5(i.pageY-g,false)}).bind("mouseup.jsp mouseleave.jsp",bo);return false});aQ()}}function aQ(){bz.height(aM+"px");bh=0;a3=bk.verticalGutter+bz.outerWidth();a2.width(bF-a3-aZ);if(a6.position().left===0){a2.css("margin-left",a3+"px")}}function bw(){if(bS){bD.append(d('<div class="jspHorizontalBar" />').append(d('<div class="jspCap jspCapLeft" />'),d('<div class="jspTrack" />').append(d('<div class="jspDrag" />').append(d('<div class="jspDragLeft" />'),d('<div class="jspDragRight" />'))),d('<div class="jspCap jspCapRight" />')));
bC=bD.find(">.jspHorizontalBar");bl=bC.find(">.jspTrack");aX=bl.find(">.jspDrag");if(bk.showArrows){bm=d('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",bT(-1,0)).bind("click.jsp",bV);aI=d('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",bT(1,0)).bind("click.jsp",bV);if(bk.arrowScrollOnHover){bm.bind("mouseover.jsp",bT(-1,0,bm));aI.bind("mouseover.jsp",bT(1,0,aI))}bE(bl,bk.horizontalArrowPositions,bm,aI)}aX.hover(function(){aX.addClass("jspHover")},function(){aX.removeClass("jspHover")}).bind("mousedown.jsp",function(h){d("html").bind("dragstart.jsp selectstart.jsp",bV);aX.addClass("jspActive");var g=h.pageX-aX.position().left;d("html").bind("mousemove.jsp",function(i){a4(i.pageX-g,false)}).bind("mouseup.jsp mouseleave.jsp",bo);return false});aT=bD.innerWidth();bI()}}function bI(){bD.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){aT-=d(this).outerWidth()});bl.width(aT+"px");a0=0}function bn(){if(bS&&bi){var h=bl.outerHeight(),g=bz.outerWidth();aM-=h;d(bC).find(">.jspCap:visible,>.jspArrow").each(function(){aT+=d(this).outerWidth()});aT-=g;aK-=g;bF-=h;bl.parent().append(d('<div class="jspCorner" />').css("width",h+"px"));aQ();bI()}if(bS){a2.width((bD.outerWidth()-aZ)+"px")}a1=a2.outerHeight();aO=a1/aK;if(bS){bu=Math.ceil(1/s*aT);if(bu>bk.horizontalDragMaxWidth){bu=bk.horizontalDragMaxWidth}else{if(bu<bk.horizontalDragMinWidth){bu=bk.horizontalDragMinWidth}}aX.width(bu+"px");aV=aT-bu;bL(a0)}if(bi){bv=Math.ceil(1/aO*aM);if(bv>bk.verticalDragMaxHeight){bv=bk.verticalDragMaxHeight}else{if(bv<bk.verticalDragMinHeight){bv=bk.verticalDragMinHeight}}bs.height(bv+"px");aW=aM-bv;bM(bh)}}function bE(l,j,m,h){var g="before",k="after",i;if(j=="os"){j=/Mac/.test(navigator.platform)?"after":"split"}if(j==g){k=j}else{if(j==k){g=j;i=m;m=h;h=i}}l[g](m)[k](h)}function bT(i,g,h){return function(){bj(i,g,this,h);this.blur();return false}}function bj(k,l,g,i){g=d(g).addClass("jspActive");var j,m,n=true,h=function(){if(k!==0){ba.scrollByX(k*bk.arrowButtonSpeed)}if(l!==0){ba.scrollByY(l*bk.arrowButtonSpeed)}m=setTimeout(h,n?bk.initialDelay:bk.arrowRepeatFreq);n=false};h();j=i?"mouseout.jsp":"mouseup.jsp";i=i||d("html");i.bind(j,function(){g.removeClass("jspActive");m&&clearTimeout(m);m=null;i.unbind(j)})}function aP(){aJ();if(bi){bz.bind("mousedown.jsp",function(i){if(i.originalTarget===f||i.originalTarget==i.currentTarget){var k=d(this),g=k.offset(),j=i.pageY-g.top-bh,m,n=true,h=function(){var p=k.offset(),o=i.pageY-p.top-bv/2,r=aK*bk.scrollPagePercent,q=aW*r/(a1-aK);if(j<0){if(bh-q>o){ba.scrollByY(-r)}else{a5(o)}}else{if(j>0){if(bh+q<o){ba.scrollByY(r)}else{a5(o)}}else{l();return}}m=setTimeout(h,n?bk.initialDelay:bk.trackClickRepeatFreq);n=false},l=function(){m&&clearTimeout(m);m=null;d(document).unbind("mouseup.jsp",l)};h();d(document).bind("mouseup.jsp",l);return false}})}if(bS){bl.bind("mousedown.jsp",function(i){if(i.originalTarget===f||i.originalTarget==i.currentTarget){var k=d(this),g=k.offset(),j=i.pageX-g.left-a0,m,n=true,h=function(){var p=k.offset(),o=i.pageX-p.left-bu/2,r=bF*bk.scrollPagePercent,q=aV*r/(a7-bF);if(j<0){if(a0-q>o){ba.scrollByX(-r)}else{a4(o)}}else{if(j>0){if(a0+q<o){ba.scrollByX(r)}else{a4(o)}}else{l();return}}m=setTimeout(h,n?bk.initialDelay:bk.trackClickRepeatFreq);n=false},l=function(){m&&clearTimeout(m);m=null;d(document).unbind("mouseup.jsp",l)};h();d(document).bind("mouseup.jsp",l);return false}})}}function aJ(){if(bl){bl.unbind("mousedown.jsp")}if(bz){bz.unbind("mousedown.jsp")}}function bo(){d("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");if(bs){bs.removeClass("jspActive")}if(aX){aX.removeClass("jspActive")}}function a5(g,h){if(!bi){return}if(g<0){g=0}else{if(g>aW){g=aW}}if(h===f){h=bk.animateScroll}if(h){ba.animate(bs,"top",g,bM)}else{bs.css("top",g);bM(g)}}function bM(k){if(k===f){k=bs.position().top}bD.scrollTop(0);bh=k;var h=bh===0,j=bh==aW,i=k/aW,g=-i*(a1-aK);if(bG!=h||bQ!=j){bG=h;bQ=j;br.trigger("jsp-arrow-change",[bG,bQ,bb,aU])
}aL(h,j);a2.css("top",g);br.trigger("jsp-scroll-y",[-g,h,j]).trigger("scroll")}function a4(h,g){if(!bS){return}if(h<0){h=0}else{if(h>aV){h=aV}}if(g===f){g=bk.animateScroll}if(g){ba.animate(aX,"left",h,bL)}else{aX.css("left",h);bL(h)}}function bL(k){if(k===f){k=aX.position().left}bD.scrollTop(0);a0=k;var h=a0===0,i=a0==aV,j=k/aV,g=-j*(a7-bF);if(bb!=h||aU!=i){bb=h;aU=i;br.trigger("jsp-arrow-change",[bG,bQ,bb,aU])}aN(h,i);a2.css("left",g);br.trigger("jsp-scroll-x",[-g,h,i]).trigger("scroll")}function aL(h,g){if(bk.showArrows){by[h?"addClass":"removeClass"]("jspDisabled");bK[g?"addClass":"removeClass"]("jspDisabled")}}function aN(h,g){if(bk.showArrows){bm[h?"addClass":"removeClass"]("jspDisabled");aI[g?"addClass":"removeClass"]("jspDisabled")}}function be(g,i){var h=g/(a1-aK);a5(h*aW,i)}function bd(i,g){var h=i/(a7-bF);a4(h*aV,g)}function bO(i,n,g){var p,t,r,u=0,j=0,h,o,l,m,k;try{p=d(i)}catch(q){return}t=p.outerHeight();r=p.outerWidth();bD.scrollTop(0);bD.scrollLeft(0);while(!p.is(".jspPane")){u+=p.position().top;j+=p.position().left;p=p.offsetParent();if(/^body|html$/i.test(p[0].nodeName)){return}}h=bW();o=h+aK;if(u<h||n){m=u-bk.verticalGutter}else{if(u+t>o){m=u-aK+t+bk.verticalGutter}}if(m){be(m,g)}viewportLeft=bU();l=viewportLeft+bF;if(j<viewportLeft||n){k=j-bk.horizontalGutter}else{if(j+r>l){k=j-bF+r+bk.horizontalGutter}}if(k){bd(k,g)}}function bU(){return -a2.position().left}function bW(){return -a2.position().top}function bJ(){bD.unbind(bN).bind(bN,function(i,h,j,l){var k=a0,g=bh;ba.scrollBy(j*bk.mouseWheelSpeed,-l*bk.mouseWheelSpeed,false);return k==a0&&g==bh})}function aR(){bD.unbind(bN)}function bV(){return false}function bg(){a2.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(g){bO(g.target,false)})}function bp(){a2.find(":input,a").unbind("focus.jsp")}function a8(){var g,i;a2.focus(function(){br.focus()});br.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(j){if(j.target!==this){return}var k=a0,l=bh;switch(j.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:g=j.keyCode;h();break;case 35:be(a1-aK);g=null;break;case 36:be(0);g=null;break}i=j.keyCode==g&&k!=a0||l!=bh;return !i}).bind("keypress.jsp",function(j){if(j.keyCode==g){h()}return !i});if(bk.hideFocus){br.css("outline","none");if("hideFocus" in bD[0]){br.attr("hideFocus",true)}}else{br.css("outline","");if("hideFocus" in bD[0]){br.attr("hideFocus",false)}}function h(){var j=a0,k=bh;switch(g){case 40:ba.scrollByY(bk.keyboardSpeed,false);break;case 38:ba.scrollByY(-bk.keyboardSpeed,false);break;case 34:case 32:ba.scrollByY(aK*bk.scrollPagePercent,false);break;case 33:ba.scrollByY(-aK*bk.scrollPagePercent,false);break;case 39:ba.scrollByX(bk.keyboardSpeed,false);break;case 37:ba.scrollByX(-bk.keyboardSpeed,false);break}i=j!=a0||k!=bh;return i}}function a9(){br.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function bt(){if(location.hash&&location.hash.length>1){var h,i;try{h=d(location.hash)}catch(g){return}if(h.length&&a2.find(location.hash)){if(bD.scrollTop()===0){i=setInterval(function(){if(bD.scrollTop()>0){bO(location.hash,true);d(document).scrollTop(bD.position().top);clearInterval(i)}},50)}else{bO(location.hash,true);d(document).scrollTop(bD.position().top)}}}}function bH(){d("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function aS(){bH();d("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var g=this.href.split("#"),h;if(g.length>1){h=g[1];if(h.length>0&&a2.find("#"+h).length>0){bO("#"+h,true);return false}}})}function bB(){var k,l,i,j,h,g=false;bD.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(n){var m=n.originalEvent.touches[0];k=bU();l=bW();i=m.pageX;j=m.pageY;h=false;g=true}).bind("touchmove.jsp",function(m){if(!g){return}var n=m.originalEvent.touches[0],o=a0,p=bh;ba.scrollTo(k+i-n.pageX,l+j-n.pageY);h=h||Math.abs(i-n.pageX)>5||Math.abs(j-n.pageY)>5;return o==a0&&p==bh
}).bind("touchend.jsp",function(m){g=false}).bind("click.jsp-touchclick",function(m){if(h){h=false;return false}})}function aY(){var g=bW(),h=bU();br.removeClass("jspScrollable").unbind(".jsp");br.replaceWith(bA.append(a2.children()));bA.scrollTop(g);bA.scrollLeft(h)}d.extend(ba,{reinitialise:function(g){g=d.extend({},bk,g);bx(g)},scrollToElement:function(h,i,g){bO(h,i,g)},scrollTo:function(h,g,i){bd(h,i);be(g,i)},scrollToX:function(h,g){bd(h,g)},scrollToY:function(g,h){be(g,h)},scrollToPercentX:function(h,g){bd(h*(a7-bF),g)},scrollToPercentY:function(h,g){be(h*(a1-aK),g)},scrollBy:function(i,g,h){ba.scrollByX(i,h);ba.scrollByY(g,h)},scrollByX:function(g,i){var j=bU()+g,h=j/(a7-bF);a4(h*aV,i)},scrollByY:function(g,i){var j=bW()+g,h=j/(a1-aK);a5(h*aW,i)},positionDragX:function(g,h){a4(g,h)},positionDragY:function(h,g){a4(h,g)},animate:function(k,h,g,i){var j={};j[h]=g;k.animate(j,{duration:bk.animateDuration,ease:bk.animateEase,queue:false,step:i})},getContentPositionX:function(){return bU()},getContentPositionY:function(){return bW()},getContentWidth:function(){return a7()},getContentHeight:function(){return a1()},getPercentScrolledX:function(){return bU()/(a7-bF)},getPercentScrolledY:function(){return bW()/(a1-aK)},getIsScrollableH:function(){return bS},getIsScrollableV:function(){return bi},getContentPane:function(){return a2},scrollToBottom:function(g){a5(aW,g)},hijackInternalLinks:function(){aS()},destroy:function(){aY()}});bx(bc)}a=d.extend({},d.fn.jScrollPane.defaults,a);d.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){a[this]=a[this]||a.speed});var b;this.each(function(){var j=d(this),i=j.data("jsp");if(i){i.reinitialise(a)}else{i=new c(j,a);j.data("jsp",i)}b=b?b.add(j):j});return b};d.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:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this);
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 *
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(i){var g=i||window.event,f=[].slice.call(arguments,1),j=0,h=true,e=0,d=0;i=c.event.fix(g);i.type="mousewheel";if(i.wheelDelta){j=i.wheelDelta/120}if(i.detail){j=-i.detail/3}d=j;if(g.axis!==undefined&&g.axis===g.HORIZONTAL_AXIS){d=0;e=-1*j}if(g.wheelDeltaY!==undefined){d=g.wheelDeltaY/120}if(g.wheelDeltaX!==undefined){e=-1*g.wheelDeltaX/120}f.unshift(i,j,e,d);return c.event.handle.apply(this,f)}})(jQuery);(function(a){a.fn.bxSlider=function(t){var F={mode:"horizontal",infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:"swing",pager:false,pagerSelector:null,pagerType:"full",pagerLocation:"bottom",pagerShortSeparator:"/",pagerActiveClass:"pager-active",nextText:"next",nextImage:"",nextSelector:null,prevText:"prev",prevImage:"",prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:"next",autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:"start",startImage:"",stopText:"stop",stopImage:"",ticker:false,tickerSpeed:5000,tickerDirection:"next",tickerHover:false,wrapperClass:"bx-wrapper",startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null};
var t=a.extend(F,t);var n=this;var j="";var y="";var N="";var x="";var C="";var b="";var S="";var l="";var W="";var G="";var e="";var Z="";var J="";var R="";var X="";var L=true;var z=false;var u=0;var K=0;var r=0;var Y=0;var w=0;var p=0;var s=0;var P=0;var g=0;var V=false;var O=0;var v=N.length-1;this.goToSlide=function(aa,ab){if(!V){V=true;r=aa;t.onBeforeSlide(r,N.length,N.eq(r));if(typeof(ab)=="undefined"){var ab=true}if(ab){if(t.auto){n.stopShow(true)}}slide=aa;if(slide==O){t.onFirstSlide(r,N.length,N.eq(r))}if(slide==v){t.onLastSlide(r,N.length,N.eq(r))}if(t.mode=="horizontal"){j.animate({left:"-"+B(slide,"left")+"px"},t.speed,t.easing,function(){V=false;t.onAfterSlide(r,N.length,N.eq(r))})}else{if(t.mode=="vertical"){j.animate({top:"-"+B(slide,"top")+"px"},t.speed,t.easing,function(){V=false;t.onAfterSlide(r,N.length,N.eq(r))})}else{if(t.mode=="fade"){A()}}}d();if(t.moveSlideQty>1){aa=Math.floor(aa/t.moveSlideQty)}H(aa);T()}};this.goToNextSlide=function(ad){if(typeof(ad)=="undefined"){var ad=true}if(ad){if(t.auto){n.stopShow(true)}}if(!t.infiniteLoop){if(!V){var aa=false;r=(r+(t.moveSlideQty));if(r<=v){d();t.onNextSlide(r,N.length,N.eq(r));n.goToSlide(r)}else{r-=t.moveSlideQty}}}else{if(!V){V=true;var aa=false;r=(r+t.moveSlideQty);if(r>v){r=r%N.length;aa=true}t.onNextSlide(r,N.length,N.eq(r));t.onBeforeSlide(r,N.length,N.eq(r));if(t.mode=="horizontal"){var ab=(t.moveSlideQty*S);j.animate({left:"-="+ab+"px"},t.speed,t.easing,function(){V=false;if(aa){j.css("left","-"+B(r,"left")+"px")}t.onAfterSlide(r,N.length,N.eq(r))})}else{if(t.mode=="vertical"){var ac=(t.moveSlideQty*K);j.animate({top:"-="+ac+"px"},t.speed,t.easing,function(){V=false;if(aa){j.css("top","-"+B(r,"top")+"px")}t.onAfterSlide(r,N.length,N.eq(r))})}else{if(t.mode=="fade"){A()}}}if(t.moveSlideQty>1){H(Math.ceil(r/t.moveSlideQty))}else{H(r)}T()}}};this.goToPreviousSlide=function(ad){if(typeof(ad)=="undefined"){var ad=true}if(ad){if(t.auto){n.stopShow(true)}}if(!t.infiniteLoop){if(!V){var aa=false;r=r-t.moveSlideQty;if(r<0){r=0;if(t.hideControlOnEnd){a(".bx-prev",x).hide()}}d();t.onPrevSlide(r,N.length,N.eq(r));n.goToSlide(r)}}else{if(!V){V=true;var aa=false;r=(r-(t.moveSlideQty));if(r<0){negativeOffset=(r%N.length);if(negativeOffset==0){r=0}else{r=(N.length)+negativeOffset}aa=true}t.onPrevSlide(r,N.length,N.eq(r));t.onBeforeSlide(r,N.length,N.eq(r));if(t.mode=="horizontal"){var ab=(t.moveSlideQty*S);j.animate({left:"+="+ab+"px"},t.speed,t.easing,function(){V=false;if(aa){j.css("left","-"+B(r,"left")+"px")}t.onAfterSlide(r,N.length,N.eq(r))})}else{if(t.mode=="vertical"){var ac=(t.moveSlideQty*K);j.animate({top:"+="+ac+"px"},t.speed,t.easing,function(){V=false;if(aa){j.css("top","-"+B(r,"top")+"px")}t.onAfterSlide(r,N.length,N.eq(r))})}else{if(t.mode=="fade"){A()}}}if(t.moveSlideQty>1){H(Math.ceil(r/t.moveSlideQty))}else{H(r)}T()}}};this.goToFirstSlide=function(aa){if(typeof(aa)=="undefined"){var aa=true}n.goToSlide(O,aa)};this.goToLastSlide=function(){if(typeof(aa)=="undefined"){var aa=true}n.goToSlide(v,aa)};this.getCurrentSlide=function(){return r};this.getSlideCount=function(){return N.length};this.stopShow=function(aa){clearInterval(e);if(typeof(aa)=="undefined"){var aa=true}if(aa&&t.autoControls){Z.html(R).removeClass("stop").addClass("start");L=false}};this.startShow=function(aa){if(typeof(aa)=="undefined"){var aa=true}m();if(aa&&t.autoControls){Z.html(X).removeClass("start").addClass("stop");L=true}};this.stopTicker=function(aa){j.stop();if(typeof(aa)=="undefined"){var aa=true}if(aa&&t.ticker){Z.html(R).removeClass("stop").addClass("start");L=false}};this.startTicker=function(aa){if(t.mode=="horizontal"){if(t.tickerDirection=="next"){var ac=parseInt(j.css("left"));var ae=(p+ac)+N.eq(0).width()}else{if(t.tickerDirection=="prev"){var ac=-parseInt(j.css("left"));var ae=(ac)-N.eq(0).width()}}var ad=(ae*t.tickerSpeed)/p;E(P,ae,ad)}else{if(t.mode=="vertical"){if(t.tickerDirection=="next"){var ab=parseInt(j.css("top"));var ae=(s+ab)+N.eq(0).height()}else{if(t.tickerDirection=="prev"){var ab=-parseInt(j.css("top"));
var ae=(ab)-N.eq(0).height()}}var ad=(ae*t.tickerSpeed)/s;E(g,ae,ad);if(typeof(aa)=="undefined"){var aa=true}if(aa&&t.ticker){Z.html(X).removeClass("start").addClass("stop");L=true}}}};this.initShow=function(){j=a(this);y=j.clone();N=j.children();x="";C=j.children(":first");b=C.width();u=0;S=C.outerWidth();K=0;l=f();W=U();V=false;G="";r=0;Y=0;w=0;e="";Z="";J="";R="";X="";L=true;z=false;p=0;s=0;P=0;g=0;O=0;v=N.length-1;N.each(function(ab){if(a(this).outerHeight()>K){K=a(this).outerHeight()}if(a(this).outerWidth()>u){u=a(this).outerWidth()}});if(t.randomStart){var aa=Math.floor(Math.random()*N.length);r=aa;Y=S*(t.moveSlideQty+aa);w=K*(t.moveSlideQty+aa)}else{r=t.startingSlide;Y=S*(t.moveSlideQty+t.startingSlide);w=K*(t.moveSlideQty+t.startingSlide)}o();if(t.pager&&!t.ticker){if(t.pagerType=="full"){I("full")}else{if(t.pagerType=="short"){I("short")}}}if(t.controls&&!t.ticker){i()}if(t.auto||t.ticker){if(t.autoControls){q()}if(t.autoStart){setTimeout(function(){n.startShow(true)},t.autoDelay)}else{n.stopShow(true)}if(t.autoHover&&!t.ticker){D()}}if(t.moveSlideQty>1){H(Math.ceil(r/t.moveSlideQty))}else{H(r)}d();if(t.captions){T()}t.onAfterSlide(r,N.length,N.eq(r))};this.destroyShow=function(){clearInterval(e);a(".bx-next, .bx-prev, .bx-pager, .bx-auto",x).remove();j.unwrap().unwrap().removeAttr("style");j.children().removeAttr("style").not(".pager").remove();N.removeClass("pager")};this.reloadShow=function(){n.destroyShow();n.initShow()};function o(){Q(t.startingSlide);if(t.mode=="horizontal"){j.wrap('<div class="'+t.wrapperClass+'" style="width:'+l+'px; position:relative;"></div>').wrap('<div class="bx-window" style="position:relative; overflow:hidden; width:'+l+'px;"></div>').css({width:"999999px",position:"relative",left:"-"+(Y)+"px"});j.children().css({width:b,"float":"left",listStyle:"none"});x=j.parent().parent();N.addClass("pager")}else{if(t.mode=="vertical"){j.wrap('<div class="'+t.wrapperClass+'" style="width:'+u+'px; position:relative;"></div>').wrap('<div class="bx-window" style="width:'+u+"px; height:"+W+'px; position:relative; overflow:hidden;"></div>').css({height:"999999px",position:"relative",top:"-"+(w)+"px"});j.children().css({listStyle:"none",height:K});x=j.parent().parent();N.addClass("pager")}else{if(t.mode=="fade"){j.wrap('<div class="'+t.wrapperClass+'" style="width:'+u+'px; position:relative;"></div>').wrap('<div class="bx-window" style="height:'+K+"px; width:"+u+'px; position:relative; overflow:hidden;"></div>');j.children().css({listStyle:"none",position:"absolute",top:0,left:0,zIndex:40});x=j.parent().parent();N.not(":eq("+r+")").fadeTo(0,0);N.eq(r).css("zIndex",45)}}}if(t.captions&&t.captionsSelector==null){x.append('<div class="bx-captions"></div>')}}function Q(){if(t.mode=="horizontal"||t.mode=="vertical"){var ad=M(N,0,t.moveSlideQty,"backward");a.each(ad,function(af){j.prepend(a(this))});var ac=(N.length+t.moveSlideQty)-1;var ab=N.length-t.displaySlideQty;var aa=ac-ab;var ae=M(N,0,aa,"forward");if(t.infiniteLoop){a.each(ae,function(af){j.append(a(this))})}}}function i(){if(t.nextImage!=""){nextContent=t.nextImage;nextType="image"}else{nextContent=t.nextText;nextType="text"}if(t.prevImage!=""){prevContent=t.prevImage;prevType="image"}else{prevContent=t.prevText;prevType="text"}h(nextType,nextContent,prevType,prevContent)}function m(){if(t.auto){if(!t.infiniteLoop){if(t.autoDirection=="next"){e=setInterval(function(){r+=t.moveSlideQty;if(r>v){r=r%N.length}n.goToSlide(r,false)},t.pause)}else{if(t.autoDirection=="prev"){e=setInterval(function(){r-=t.moveSlideQty;if(r<0){negativeOffset=(r%N.length);if(negativeOffset==0){r=0}else{r=(N.length)+negativeOffset}}n.goToSlide(r,false)},t.pause)}}}else{if(t.autoDirection=="next"){e=setInterval(function(){n.goToNextSlide(false)},t.pause)}else{if(t.autoDirection=="prev"){e=setInterval(function(){n.goToPreviousSlide(false)},t.pause)}}}}else{if(t.ticker){t.tickerSpeed*=10;a(".pager",x).each(function(aa){p+=a(this).width();s+=a(this).height()});if(t.tickerDirection=="prev"&&t.mode=="horizontal"){j.css("left","-"+(p+Y)+"px")
}else{if(t.tickerDirection=="prev"&&t.mode=="vertical"){j.css("top","-"+(s+w)+"px")}}if(t.mode=="horizontal"){P=parseInt(j.css("left"));E(P,p,t.tickerSpeed)}else{if(t.mode=="vertical"){g=parseInt(j.css("top"));E(g,s,t.tickerSpeed)}}if(t.tickerHover){k()}}}}function E(ab,ac,aa){if(t.mode=="horizontal"){if(t.tickerDirection=="next"){j.animate({left:"-="+ac+"px"},aa,"linear",function(){j.css("left",ab);E(ab,p,t.tickerSpeed)})}else{if(t.tickerDirection=="prev"){j.animate({left:"+="+ac+"px"},aa,"linear",function(){j.css("left",ab);E(ab,p,t.tickerSpeed)})}}}else{if(t.mode=="vertical"){if(t.tickerDirection=="next"){j.animate({top:"-="+ac+"px"},aa,"linear",function(){j.css("top",ab);E(ab,s,t.tickerSpeed)})}else{if(t.tickerDirection=="prev"){j.animate({top:"+="+ac+"px"},aa,"linear",function(){j.css("top",ab);E(ab,s,t.tickerSpeed)})}}}}}function q(){if(t.startImage!=""){startContent=t.startImage;startType="image"}else{startContent=t.startText;startType="text"}if(t.stopImage!=""){stopContent=t.stopImage;stopType="image"}else{stopContent=t.stopText;stopType="text"}c(startType,startContent,stopType,stopContent)}function D(){x.find(".bx-window").hover(function(){if(L){n.stopShow(false)}},function(){if(L){n.startShow(false)}})}function k(){j.hover(function(){if(L){n.stopTicker(false)}},function(){if(L){n.startTicker(false)}})}function A(){N.not(":eq("+r+")").fadeTo(t.speed,0).css("zIndex",40);N.eq(r).css("zIndex",45).fadeTo(t.speed,1,function(){V=false;if(jQuery.browser.msie){N.eq(r).get(0).style.removeAttribute("filter")}t.onAfterSlide(r,N.length,N.eq(r))})}function H(aa){if(t.pagerType=="full"&&t.pager){a("a",G).removeClass(t.pagerActiveClass);a("a",G).eq(aa).addClass(t.pagerActiveClass)}else{if(t.pagerType=="short"&&t.pager){a(".bx-pager-current",G).html(r+1)}}}function h(af,ae,aa,ab){var ac=a('<a href="" class="bx-next"></a>');var ad=a('<a href="" class="bx-prev"></a>');if(af=="text"){ac.html(ae)}else{ac.html('<img src="'+ae+'" />')}if(aa=="text"){ad.html(ab)}else{ad.html('<img src="'+ab+'" />')}if(t.prevSelector){a(t.prevSelector).append(ad)}else{x.append(ad)}if(t.nextSelector){a(t.nextSelector).append(ac)}else{x.append(ac)}ac.click(function(){n.goToNextSlide();return false});ad.click(function(){n.goToPreviousSlide();return false})}function I(ad){var ac=N.length;if(t.moveSlideQty>1){if(N.length%t.moveSlideQty!=0){ac=Math.ceil(N.length/t.moveSlideQty)}else{ac=N.length/t.moveSlideQty}}var ae="";if(t.buildPager){for(var aa=0;aa<ac;aa++){ae+=t.buildPager(aa,N.eq(aa*t.moveSlideQty))}}else{if(ad=="full"){for(var aa=1;aa<=ac;aa++){ae+='<a href="" class="pager-link pager-'+aa+'">'+aa+"</a>"}}else{if(ad=="short"){ae='<span class="bx-pager-current">'+(t.startingSlide+1)+"</span> "+t.pagerShortSeparator+' <span class="bx-pager-total">'+N.length+"<span>"}}}if(t.pagerSelector){a(t.pagerSelector).append(ae);G=a(t.pagerSelector)}else{var ab=a('<div class="bx-pager"></div>');ab.append(ae);if(t.pagerLocation=="top"){x.prepend(ab)}else{if(t.pagerLocation=="bottom"){x.append(ab)}}G=a(".bx-pager",x)}G.children().click(function(){if(t.pagerType=="full"){var af=G.children().index(this);if(t.moveSlideQty>1){af*=t.moveSlideQty}n.goToSlide(af)}return false})}function T(){var aa=a("img",N.eq(r)).attr("title");if(aa!=""){if(t.captionsSelector){a(t.captionsSelector).html(aa)}else{a(".bx-captions",x).html(aa)}}else{if(t.captionsSelector){a(t.captionsSelector).html(" ")}else{a(".bx-captions",x).html(" ")}}}function c(ab,ac,aa,ad){Z=a('<a href="" class="bx-start"></a>');if(ab=="text"){R=ac}else{R='<img src="'+ac+'" />'}if(aa=="text"){X=ad}else{X='<img src="'+ad+'" />'}if(t.autoControlsSelector){a(t.autoControlsSelector).append(Z)}else{x.append('<div class="bx-auto"></div>');a(".bx-auto",x).html(Z)}Z.click(function(){if(t.ticker){if(a(this).hasClass("stop")){n.stopTicker()}else{if(a(this).hasClass("start")){n.startTicker()}}}else{if(a(this).hasClass("stop")){n.stopShow(true)}else{if(a(this).hasClass("start")){n.startShow(true)}}}return false})}function d(){if(!t.infiniteLoop&&t.hideControlOnEnd){if(r==O){a(".bx-prev",x).hide()
}else{a(".bx-prev",x).show()}if(r==v){a(".bx-next",x).hide()}else{a(".bx-next",x).show()}}}function B(ac,ab){if(ab=="left"){var aa=a(".pager",x).eq(ac).position().left}else{if(ab=="top"){var aa=a(".pager",x).eq(ac).position().top}}return aa}function f(){var aa=C.outerWidth()*t.displaySlideQty;return aa}function U(){var aa=C.outerHeight()*t.displaySlideQty;return aa}function M(ag,af,ad,ae){var ac=[];var ab=ad;var aa=false;if(ae=="backward"){ag=a.makeArray(ag);ag.reverse()}while(ab>0){a.each(ag,function(ah,ai){if(ab>0){if(!aa){if(ah==af){aa=true;ac.push(a(this).clone());ab--}}else{ac.push(a(this).clone());ab--}}else{return false}})}return ac}this.each(function(){n.initShow()});return this};jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var b=parseFloat(jQuery.css(this.elem,this.prop));return b}})(jQuery);(function(a){a(".withDropdown").delegate("a","click",function(){a(this).parent().find(".dropdown").toggle(200);return false});a(".kvImage ul").bxSlider({mode:"fade",auto:true,pager:true,controls:false,pause:a(this).parent(".kvImage").data("interval")});content_width=0;a(".slider ul").children().each(function(){content_width+=a(this).width()});a(".slider ul").width(content_width+100);if(content_width>950){a(".navigation").fadeIn(200);a(".sliderMask").jScrollPane({animateScroll:true});a(".slider").delegate(".navigation","click",function(){if(a(this).hasClass("scrollLeft")){a(".sliderMask").data("jsp").scrollByX(-120,true)}else{a(".sliderMask").data("jsp").scrollByX(120,true)}});a(".slider").delegate("li","mouseenter",function(b){a(".sliderMask").data("jsp").scrollToElement(a(this))})}})(jQuery);
