text: (function(a){a.jScrollPaneCusel={active:[]};a.fn.jScrollPaneCusel=function(b){b=a.extend({},a.fn.jScrollPaneCusel.defaults,b);var c=function(){return false};return this.each(function(){var d=a(this);var e=this.parentNode.offsetWidth;d.css("overflow","hidden");var f=this;if(a(this).parent().is(".jScrollPaneContainer")){var g=b.maintainPosition?d.position().top:0;var h=a(this).parent();var i=e;var j=h.outerHeight();var k=j;a(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",h).remove();d.css({top:0})}else{var g=0;this.originalPadding=d.css("paddingTop")+" "+d.css("paddingRight")+" "+d.css("paddingBottom")+" "+d.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(d.css("paddingLeft"))||0)+(parseInt(d.css("paddingRight"))||0);var i=e;var j=d.innerHeight();var k=j;d.wrap("<div class='jScrollPaneContainer'></div>").parent().css({height:j+"px",width:i+"px"});if(!window.navigator.userProfile){var l=parseInt(a(this).parent().css("border-left-width"))+parseInt(a(this).parent().css("border-right-width"));i-=l;a(this).css("width",i+"px").parent().css("width",i+"px")}a(document).bind("emchange",function(a,c,e){d.jScrollPaneCusel(b)})}if(b.reinitialiseOnImageLoad){var m=a.data(f,"jScrollPaneImagesToLoad")||a("img",d);var n=[];if(m.length){m.each(function(c,e){a(this).bind("load",function(){if(a.inArray(c,n)==-1){n.push(e);m=a.grep(m,function(a,b){return a!=e});a.data(f,"jScrollPaneImagesToLoad",m);b.reinitialiseOnImageLoad=false;d.jScrollPaneCusel(b)}}).each(function(a,b){if(this.complete||this.complete===undefined){this.src=this.src}})})}}var o=this.originalSidePaddingTotal;var p={height:"auto",width:i-b.scrollbarWidth-b.scrollbarMargin-o+"px"};if(b.scrollbarOnLeft){p.paddingLeft=b.scrollbarMargin+b.scrollbarWidth+"px"}else{p.paddingRight=b.scrollbarMargin+"px"}d.css(p);var q=d.outerHeight();var r=j/q;if(r<.99){var s=d.parent();s.append(a('<div class="jScrollPaneTrack"></div>').css({width:b.scrollbarWidth+"px"}).append(a('<div class="jScrollPaneDrag"></div>').css({width:b.scrollbarWidth+"px"}).append(a('<div class="jScrollPaneDragTop"></div>').css({width:b.scrollbarWidth+"px"}),a('<div class="jScrollPaneDragBottom"></div>').css({width:b.scrollbarWidth+"px"}))));var t=a(">.jScrollPaneTrack",s);var u=a(">.jScrollPaneTrack .jScrollPaneDrag",s);if(b.showArrows){var v;var w;var x;var y;var z=function(){if(y>4||y%4==0){Q(J+w*I)}y++};var A=function(b){a("html").unbind("mouseup",A);v.removeClass("jScrollActiveArrowButton");clearInterval(x)};var B=function(){a("html").bind("mouseup",A);v.addClass("jScrollActiveArrowButton");y=0;z();x=setInterval(z,100)};s.append(a("<div></div>").attr({"class":"jScrollArrowUp"}).css({width:b.scrollbarWidth+"px"}).bind("mousedown",function(){v=a(this);w=-1;B();this.blur();return false}).bind("click",c),a("<div></div>").attr({"class":"jScrollArrowDown"}).css({width:b.scrollbarWidth+"px"}).bind("mousedown",function(){v=a(this);w=1;B();this.blur();return false}).bind("click",c));var C=a(">.jScrollArrowUp",s);var D=a(">.jScrollArrowDown",s);if(b.arrowSize){k=j-b.arrowSize-b.arrowSize;t.css({height:k+"px",top:b.arrowSize+"px"})}else{var E=C.height();b.arrowSize=E;k=j-E-D.height();t.css({height:k+"px",top:E+"px"})}}var F=a(this).css({position:"absolute",overflow:"visible"});var G;var H;var I;var J=0;var K=r*j/2;var L=function(a,b){var c=b=="X"?"Left":"Top";return a["page"+b]||a["client"+b]+(document.documentElement["scroll"+c]||document.body["scroll"+c])||0};var M=function(){return false};var N=function(){cb();G=u.offset(false);G.top-=J;H=k-u[0].offsetHeight;I=2*b.wheelSpeed*H/q};var O=function(b){N();K=L(b,"Y")-J-G.top;a("html").bind("mouseup",P).bind("mousemove",R);if(a.browser.msie){a("html").bind("dragstart",M).bind("selectstart",M)}return false};var P=function(){a("html").unbind("mouseup",P).unbind("mousemove",R);K=r*j/2;if(a.browser.msie){a("html").unbind("dragstart",M).unbind("selectstart",M)}};var Q=function(a){a=a<0?0:a>H?H:a;J=a;u.css({top:a+"px"});var c=a/H;F.css({top:(j-q)*c+"px"});d.trigger("scroll");if(b.showArrows){C[a==0?"addClass":"removeClass"]("disabled");D[a==H?"addClass":"removeClass"]("disabled")}};var R=function(a){Q(L(a,"Y")-G.top-K)};var S=Math.max(Math.min(r*(j-b.arrowSize*2),b.dragMaxHeight),b.dragMinHeight);u.css({height:S+"px"}).bind("mousedown",O);var T;var U;var V;var W=function(){if(U>8||U%4==0){Q(J-(J-V)/2)}U++};var X=function(){clearInterval(T);a("html").unbind("mouseup",X).unbind("mousemove",Y)};var Y=function(a){V=L(a,"Y")-G.top-K};var Z=function(b){N();Y(b);U=0;a("html").bind("mouseup",X).bind("mousemove",Y);T=setInterval(W,100);W()};t.bind("mousedown",Z);s.bind("mousewheel",function(a,b){N();cb();var c=J;Q(J-b*I);var d=c!=J;return false});var _;var ab;function bb(){var a=(_-J)/b.animateStep;if(a>1||a<-1){Q(J+a)}else{Q(_);cb()}}var cb=function(){if(ab){clearInterval(ab);delete _}};var db=function(c,e){if(typeof c=="string"){$e=a(c,d);if(!$e.length)return;c=$e.offset().top-d.offset().top}s.scrollTop(0);cb();var f=-c/(j-q)*H;if(e||!b.animateTo){Q(f)}else{_=f;ab=setInterval(bb,b.animateInterval)}};d[0].scrollTo=db;d[0].scrollBy=function(a){var b=-parseInt(F.css("top"))||0;db(b+a)};N();db(-g,true);a("*",this).bind("focus",function(c){var e=a(this);var f=0;while(e[0]!=d[0]){f+=e.position().top;e=e.offsetParent()}var g=-parseInt(F.css("top"))||0;var h=g+j;var i=f>g&&f<h;if(!i){var k=f-b.scrollbarMargin;if(f>g){k+=a(this).height()+15+b.scrollbarMargin-j}db(k)}});if(location.hash){db(location.hash)}a(document).bind("click",function(b){$target=a(b.target);if($target.is("a")){var c=$target.attr("href");if(c.substr(0,1)=="#"){db(c)}}});a.jScrollPaneCusel.active.push(d[0])}else{d.css({height:j+"px",width:i-this.originalSidePaddingTotal+"px",padding:this.originalPadding});d.parent().unbind("mousewheel")}})};a.fn.jScrollPaneRemoveCusel=function(){a(this).each(function(){$this=a(this);var b=$this.parent();if(b.is(".jScrollPaneContainer")){$this.css({top:"",height:"",width:"",padding:"",overflow:"",position:""});$this.attr("style",$this.data("originalStyleTag"));b.after($this).remove()}})};a.fn.jScrollPaneCusel.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false};a(window).bind("unload",function(){var b=a.jScrollPaneCusel.active;for(var c=0;c<b.length;c++){b[c].scrollTo=b[c].scrollBy=null}})})(jQuery)