(function(n){n.fn.scroller=function(a){a=n.extend({totalWidth:void 0,totalwidth:void 0,settings_multiplier:3,settings_smoothing:"onf",settings_scrollbary_class:"simple-scrollbary",settings_scrollbarybg_class:"simple-scrollbary-bg",settings_scrollbarx_class:"simple-scrollbarx",settings_scrollbarxbg_class:"simple-scrollbarx-bg",settings_scrollbar:"on",settings_scrollbyhover:"off",settings_fadeoutonleave:"off",settings_replacewheelxwithy:"off",settings_refresh:0,settings_forcesameheight:"off",settings_fullwidth:"off", settings_hidedefaultsidebars:"off",scrollBg:"off",force_onlyy:"off"},a);this.each(function(){function E(){var h=0;i==!0&&(h=parseInt(f.css("left"))/b,a.settings_fullwidth=="on"&&(b=n(window).width(),c.css("width",b)));l==!0&&(parseInt(g.css("top")),a.settings_fullheight=="on"&&(d=n(window).height(),c.css("height",d)));d=c.height();j=e.width();k=e.height();e.find(".real-inner").length==1&&(j=e.find(".real-inner").width(),k=e.find(".real-inner").height());F==0&&(F=j+50);A.css({width:b,height:d});is_ios()== !1?c.css({width:b,height:d,overflow:"inherit"}):(c.css({width:b,height:d,overflow:"auto"}),e.css({width:F,overflow:"auto"}));i==!0&&o.css("width",b);i&&b>j&&f.css("display")=="block"&&(o.hide(),f.hide(),h=0);i&&bj&&a.settings_fullwidth=="on"&&e.css("left",0);a.settings_fullwidth=="on"&&f.css("left",h*b)}function w(){l&&(m>0&&(m=0),m<-(k-d)&&(m=-(k-d)),p<0&&(p=0),p>d-x&&(p=d-x),a.settings_smoothing!="on"?(e.css({top:m}), g.css({top:p}),a.scrollBg=="on"&&c.css("background-position","center "+m+"px")):(e.animate({top:m},{queue:!1,duration:B}),g.animate({top:p},{queue:!1,duration:B})));i&&(q>0&&(q=0),q<-(j-b)&&(q=-(j-b)),r<0&&(r=0),r>b-u&&(r=b-u),a.settings_smoothing!="on"?(e.css({left:q}),f.css({left:r})):(e.animate({left:q},{queue:!1,duration:B}),f.animate({left:r},{queue:!1,duration:B})))}function G(){var a=c.width()-e.width(),i=e.position().left,f=c.height()-e.height(),j=e.position().top;r=i/a*(b-u);p=j/f*(d-u); w()}var b=0,d=0,j=0,k=0,e,A,s=0,v=0,p=0,r=0,g,t,f,o,c=n(this),y=0,z=0,C=!1,D=!1,x=0,u=0,q=0,m=0,i=!0,l=!0,F=0,B=60;e=c.find(".inner");is_ios()?c.css("overflow","auto"):e.wrap('
');A=c.find(".scroller");(function(){b=a.totalWidth!=void 0?a.totalWidth:c.width();d=a.totalHeight!=void 0?a.totalHeight:c.height();a.settings_fullwidth=="on"&&(b=jQuery(window).width());A.css({width:b,height:d});is_ios()==!1&&c.css({width:b,height:d,overflow:"inherit"});is_ios()&&c.css({width:b, height:d,overflow:"auto"});jQuery.browser.msie!=void 0&&jQuery.browser.version==7&&c.css("overflow","visible");e.css({});a.settings_hidedefaultsidebars=="on"&&(c.css("overflow","hidden"),n("html").css("overflow","hidden"));j=e.width();k=e.height();e.find(".real-inner").length==1&&(j=e.find(".real-inner").width(),k=e.find(".real-inner").height());a.settings_forcesameheight=="on"&&(d=k,c.height(d),A.height(d));a.scrollBg=="on"&&(k=c.height(),d=n(window).height());k<=d&&(l=!1);j<=b&&(i=!1);a.settings_fullwidth== "on"&&(i=!0);a.force_onlyy=="on"&&(l=!0,i=!1);if(!(l==!1&&i==!1)){var h;h=c;is_ios()==!0&&(c.wrap('
'),h=c.parent(),h.css({width:b,height:d,overflow:"visible"}));a.settings_scrollbar=="on"&&(l&&(h.append('
'),h.append('
')),i&&(h.append('
'),h.append('
'))); l&&(g=h.children("."+a.settings_scrollbary_class),t=h.children("."+a.settings_scrollbarybg_class),x=g.height(),t.css("height",d),a.settings_fadeoutonleave=="on"&&(g.css("opacity",0),t.css("opacity",0)));i&&(f=h.children("."+a.settings_scrollbarx_class),o=h.children("."+a.settings_scrollbarxbg_class),u=f.width(),o.css("width",b),a.settings_fadeoutonleave=="on"&&(f.css("opacity",0),o.css("opacity",0)),j<=b&&a.settings_fullwidth=="on"&&(f.hide(),o.hide()));c.css("opacity")==0&&(c.animate({opacity:1}, 600),c.parent().children(".preloader").fadeOut("slow"));a.settings_refresh>0&&setInterval(E,a.settings_refresh);a.settings_refreshonresize=="on"&&n(window).resize(E)}})();n.fn.scroller.reinit=function(){E()};a.settings_scrollbyhover!="on"&&is_ios()==!1&&c.mousewheel(function(c,e,f,g){s=-Math.floor(f);v=Math.floor(g);a.settings_replacewheelxwithy=="on"&&(s=Math.floor(g));l&&(g>0&&vg&&v--,m+=v*a.settings_multiplier,p=m/(k-d)*-(d-x));i&&(f<0&&s>f&&s++,f>0&&s0&&sb+20||z>d+20))){if(l== !0&&(C==!0||a.settings_scrollbyhover=="on"))p=z/d*(d-x),m=z/d*(d-k),w();if(i==!0&&(D==!0||a.settings_scrollbyhover=="on"))r=y/b*(b-u),q=y/b*(b-j),w();a.settings_fadeoutonleave=="on"&&(g.animate({opacity:1},{queue:!1,duration:500}),t.animate({opacity:1},{queue:!1,duration:500}))}});is_ios()==!1&&jQuery(document).mouseup(function(){D=C=!1});a.settings_fadeoutonleave=="on"&&is_ios()==!1&&c.mouseout(function(){g.animate({opacity:0},{queue:!1,duration:500});t.animate({opacity:0},{queue:!1,duration:500})}); is_ios()==!0&&setInterval(G,70);return this})}})(jQuery);function is_ios(){return navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1};