YUI.add("scrollview-scrollbars",function(a,t){var l,s=a.ClassNameManager.getClassName,v=a.Transition.useNative,i="scrollbar",e="scrollview",r="verticalNode",o="horizontalNode",N="childCache",h=a.ScrollView._TRANSITION.PROPERTY,C="transform",w="scrollX",A="scrollY",T="px",y="px)";function n(){n.superclass.constructor.apply(this,arguments)}n.CLASS_NAMES={showing:s(e,i,"showing"),scrollbar:s(e,i),scrollbarV:s(e,i,"vert"),scrollbarH:s(e,i,"horiz"),scrollbarVB:s(e,i,"vert","basic"),scrollbarHB:s(e,i,"horiz","basic"),child:s(e,"child"),first:s(e,"first"),middle:s(e,"middle"),last:s(e,"last")},l=n.CLASS_NAMES,n.NAME="pluginScrollViewScrollbars",n.NS="scrollbars",n.SCROLLBAR_TEMPLATE=["<div>",'<span class="'+l.child+" "+l.first+'"></span>','<span class="'+l.child+" "+l.middle+'"></span>','<span class="'+l.child+" "+l.last+'"></span>',"</div>"].join(""),n.ATTRS={verticalNode:{setter:"_setNode",valueFn:"_defaultNode"},horizontalNode:{setter:"_setNode",valueFn:"_defaultNode"}},a.namespace("Plugin").ScrollViewScrollbars=a.extend(n,a.Plugin.Base,{initializer:function(){this._host=this.get("host"),this.afterHostEvent("scrollEnd",this._hostScrollEnd),this.afterHostMethod("scrollTo",this._update),this.afterHostMethod("_uiDimensionsChange",this._hostDimensionsChange)},_hostDimensionsChange:function(){var t=this._host,s=t._cAxis,i=t.get(w),e=t.get(A);this._dims=t._getScrollDims(),s&&s.y&&this._renderBar(this.get(r),!0,"vert"),s&&s.x&&this._renderBar(this.get(o),!0,"horiz"),this._update(i,e),a.later(500,this,"flash",!0)},_hostScrollEnd:function(){var t=this._host,s=t.get(w),t=t.get(A);this.flash(),this._update(s,t)},_renderBar:function(t,s){var i=t.inDoc(),e=this._host._bb,a=t.getData("isHoriz")?l.scrollbarHB:l.scrollbarVB;s&&!i?(e.append(t),t.toggleClass(a,this._basic),this._setChildCache(t)):!s&&i&&(t.remove(),this._clearChildCache(t))},_setChildCache:function(t){var s=t.get("children"),i=s.item(0),e=s.item(1),s=s.item(2),a=t.getData("isHoriz")?"offsetWidth":"offsetHeight";t.setStyle(h,C),e.setStyle(h,C),s.setStyle(h,C),t.setData(N,{fc:i,lc:s,mc:e,fcSize:i&&i.get(a),lcSize:s&&s.get(a)})},_clearChildCache:function(t){t.clearData(N)},_updateBar:function(t,s,i,e){var a,l,r,o,h,n,c,d,_=this._host,f=this._basic,u=0,g=1,S=t.getData(N),m=S.lc,b=S.mc,p=S.fcSize,S=S.lcSize;s=e?(o="width",h="left",n="_sbh",c=this._dims.offsetWidth,d=this._dims.scrollWidth,l="translateX(",r="scaleX(",s!==undefined?s:_.get(w)):(o="height",h="top",n="_sbv",c=this._dims.offsetHeight,d=this._dims.scrollHeight,l="translateY(",r="scaleY(",s!==undefined?s:_.get(A)),u=Math.floor(c*(c/d)),g=Math.floor(s/(d-c)*(c-u)),c-(u=c<u?1:u)<g?u-=g-(c-u):g<0?(u=g+u,g=0):isNaN(g)&&(g=0),0===(_=(_=u-(p+S))<0?0:_)&&0!==g&&(g=c-(p+S)-1),0!==i?(a={duration:i},v?a.transform=l+g+y:a[h]=g+T,t.transition(a)):v?t.setStyle(C,l+g+y):t.setStyle(h,g+T),this[n]!==_&&0<(this[n]=_)&&(0!==i?(a={duration:i},v?a.transform=r+_+")":a[o]=_+T,b.transition(a)):v?b.setStyle(C,r+_+")"):b.setStyle(o,_+T),e&&f||(s=u-S,0!==i?(a={duration:i},v?a.transform=l+s+y:a[h]=s,m.transition(a)):v?m.setStyle(C,l+s+y):m.setStyle(h,s+T)))},_update:function(t,s,i){var e=this.get(r),a=this.get(o),l=this._host._cAxis;i=(i||0)/1e3,this._showing||this.show(),l&&l.y&&e&&null!==s&&this._updateBar(e,s,i,!1),l&&l.x&&a&&null!==t&&this._updateBar(a,t,i,!0)},show:function(t){this._show(!0,t)},hide:function(t){this._show(!1,t)},_show:function(t,s){var i=this.get(r),e=this.get(o),s=s?.6:0,a=t?1:0;this._showing=t,this._flashTimer&&this._flashTimer.cancel(),t={duration:s,opacity:a},i&&i._node&&i.transition(t),e&&e._node&&e.transition(t)},flash:function(){this.show(!0),this._flashTimer=a.later(800,this,"hide",!0)},_setNode:function(t,s){s=s===o;return(t=a.one(t))&&(t.addClass(l.scrollbar),t.addClass(s?l.scrollbarH:l.scrollbarV),t.setData("isHoriz",s)),t},_defaultNode:function(){return a.Node.create(n.SCROLLBAR_TEMPLATE)},_basic:a.UA.ie&&a.UA.ie<=8})},"patched-v3.18.4",{requires:["classnamemanager","transition","plugin"],skinnable:!0});