
(function($){$.fn.dcxScrollbar=function(d,f,g,h,i,j,k,l,m,n,o){if(d==undefined)d='vertical';if(f==undefined)f=300;if(g==undefined)g='ubs';if(h==undefined)h=1.05;if(i==undefined)i='auto';if(j==undefined)j='yes';if(k==undefined)k='no';if(l==undefined)l=15;if(m==undefined)m=true;if(n==undefined)n=false;var p=$(this);var q=p.attr("id");var r=p.children(".dscroll-box");if(r.attr("scrollToBottom")=="1")n=true;var s=r.children(".dscroll-container");var t=r.children(".dragger-container");var u=t.children(".dscroll-dragger");var v=r.children(".dscroll-upbtn");var w=r.children(".dscroll-downbtn");if(!r.data("minDraggerHeight")){r.data("minDraggerHeight",u.height())}
if(!r.data("minDraggerWidth")){r.data("minDraggerWidth",u.width())}
if(!r.data("contentHeight")){r.data("contentHeight",s.height())}
if(!r.data("contentWidth")){r.data("contentWidth",s.width())}
if(m!=false)m=true;var x=0;var y=0;var z=0;var A=0;var B=0;var C=0;var D=0;if(h<1){h=1}
u.unbind("mouseup").mouseup(function(){aqd()}).unbind("mousedown").mousedown(function(){llr()});function llr(){u.addClass("dragger-pressed")}
function aqd(){u.removeClass("dragger-pressed")}
function mwo(){if(i=="auto"){var a=Math.round(B/y*B);if(a<=z){u.css("height",z+"px").css("line-height",z+"px")}else if(a>=A){u.css("height",A-10+"px").css("line-height",A-10+"px")}else{u.css("height",a+"px").css("line-height",a+"px")}}}
t.unbind("click").click(function(e){var a=$(this);var b=(e.pageY-a.offset().top);if(b<u.position().top||b>(u.position().top+u.height())){var c=b+u.height();if(c<t.height()){u.css("top",b);Scroll()}else{u.css("top",t.height()-u.height());Scroll()}}});r.unbind("mousewheel").bind("mousewheel",function(a,b){var c=Math.abs(b*10);u.css("top",u.position().top-(b*c));Scroll();if(u.position().top<0){u.css("top",0);s.stop();Scroll()}
if(u.position().top>t.height()-u.height()){u.css("top",t.height()-u.height());s.stop();Scroll()}
return true});function Scroll(){var a=u.position().top;var b=-a*x;var c=s.position().top-b;s.stop().animate({top:"-="+c},f,g)}
var E=0;var F=0;Scroller("lto");function Scroller(a){B=r.height();y=parseInt(s.height(),10);if(y>B){E=parseInt(r.data("contentHeight"),10);F=parseInt(r.data("contentHeight2"),10);A=t.height();D=u.height();x=(y-(B/h))/(A-D);u.css("display","block");t.show();if(a!="resize"&&y!=E){if(a!="loop"){u.css("top",0);s.css("top",0)}
r.data("contentHeight",y)}
if(a=="loop"){if(y==F){setTimeout(function(){Scroller("loop")},1000);return true}
r.data("contentHeight2",y)}
mwo();if(a=="loop"){if(n){u.css("top",A-u.height());s.css("top",(B-y))}}
c=0;if(a=="lto"&&o!=undefined&&o!=null&&o.length>0){var b=o.position().top;s.css("top","-"+b+"px");var c=b*(r.height()/y);u.css("top",c+"px")}}else if(y>5){u.css("top",0).css("display","none");s.css("top",0);t.css("display","none");w.css("display","none");v.css("display","none");if(a=="loop"){r.data("contentHeight2",y)}}
setTimeout(function(){Scroller("loop")},1000)}
setTimeout(function(){u.draggable({axis:"y",containment:"parent",drag:function(a,b){Scroll()},stop:function(a,b){aqd()}})},2000);$(window).resize(function(){if(d=="horizontal"){if(u.position().left>t.width()-u.width()){u.css("left",t.width()-u.width())}}else{if(u.position().top>t.height()-u.height()){u.css("top",t.height()-u.height())}}
Scroller("resize")})}})(jQuery);jQuery.easing['jybz']=jQuery.easing['ybz'];jQuery.extend(jQuery.easing,{def:'zyv',ybz:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},khk:function(x,t,b,c,d){return c*(t/=d)*t+b},zyv:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},ldg: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},xjs:function(x,t,b,c,d){return c*(t/=d)*t*t+b},jod:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},yud: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},kzo:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},wqz:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},iwk: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},xbw:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},jhh:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},vms: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},hdd:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},wid:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},ioo:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},uua:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},gzl:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},vqw: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},ivh:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},ubs:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},ggd: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},vme: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*.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},hsp: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*.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},tia: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*(.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-.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)*.5+c+b},fol:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},gzh: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},set: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},eve:function(x,t,b,c,d){return c-jQuery.easing.tbp(x,d-t,0,c,d)+b},tbp: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+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},fgp:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.eve(x,t*2,0,c,d)*.5+b;return jQuery.easing.tbp(x,t*2-d,0,c,d)*.5+c*.5+b}});(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}
var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);