function mCustomScrollbars(){ /* malihu custom scrollbar function parameters: 1) scroll type (values: "vertical" or "horizontal") 2) scroll easing amount (0 for no easing) 3) scroll easing type 4) extra bottom scrolling space for vertical scroll type only (minimum value: 1) 5) scrollbar height/width adjustment (values: "auto" or "fixed") 6) mouse-wheel support (values: "yes" or "no") 7) scrolling via buttons support (values: "yes" or "no") 8) buttons scrolling speed (values: 1-20, 1 being the slowest) */ $("#mcs_container").mCustomScrollbar("vertical",400,"easeOutCirc",1.05,"auto","yes","yes",10); $("#mcs2_container").mCustomScrollbar("vertical",0,"easeOutCirc",1.05,"auto","yes","no",0); $("#mcs3_container").mCustomScrollbar("vertical",900,"easeOutCirc",1.05,"auto","no","no",0); $("#mcs4_container").mCustomScrollbar("vertical",200,"easeOutCirc",1.25,"fixed","yes","no",0); $("#mcs5_container").mCustomScrollbar("horizontal",500,"easeOutCirc",1,"fixed","yes","yes",20); } /* function to fix the -10000 pixel limit of jquery.animate */ $.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 r = parseFloat( jQuery.css( this.elem, this.prop ) ); return typeof r == 'undefined' ? 0 : r; } /* function to load new content dynamically */ function LoadNewContent(id,file){ $("#"+id+" .customScrollBox .content").load(file,function(){ mCustomScrollbars(); }); }