/* jquery.nicescroll -- version 3.5.0 beta5 -- copyright 2011-12-13 inuyaksa*2013 -- licensed under the mit -- -- http://areaaperta.com/nicescroll -- https://github.com/inuyaksa/jquery.nicescroll -- */ (function(jquery){ // globals var domfocus = false; var mousefocus = false; var zoomactive = false; var tabindexcounter = 5000; var ascrailcounter = 2000; var globalmaxzindex = 0; var $ = jquery; // sandbox // http://stackoverflow.com/questions/2161159/get-script-path function getscriptpath() { var scripts=document.getelementsbytagname('script'); var path=scripts[scripts.length-1].src.split('?')[0]; return (path.split('/').length>0) ? path.split('/').slice(0,-1).join('/')+'/' : ''; } var scriptpath = getscriptpath(); var vendors = ['ms','moz','webkit','o']; var setanimationframe = window.requestanimationframe||false; var clearanimationframe = window.cancelanimationframe||false; if (!setanimationframe) { for(var vx in vendors) { var v = vendors[vx]; if (!setanimationframe) setanimationframe = window[v+'requestanimationframe']; if (!clearanimationframe) clearanimationframe = window[v+'cancelanimationframe']||window[v+'cancelrequestanimationframe']; } } var clsmutationobserver = window.mutationobserver || window.webkitmutationobserver || false; var _globaloptions = { zindex:"auto", cursoropacitymin:0, cursoropacitymax:1, cursorcolor:"#424242", cursorwidth:"5px", cursorborder:"1px solid #fff", cursorborderradius:"5px", scrollspeed:60, mousescrollstep:8*3, touchbehavior:false, hwacceleration:true, usetransition:true, boxzoom:false, dblclickzoom:true, gesturezoom:true, grabcursorenabled:true, autohidemode:false, background:"", iframeautoresize:true, cursorminheight:32, preservenativescrolling:true, railoffset:false, bouncescroll:true, spacebarenabled:true, railpadding:{top:0,right:0,left:0,bottom:0}, disableoutline:true, horizrailenabled:true, railalign:"right", railvalign:"bottom", enabletranslate3d:true, enablemousewheel:true, enablekeyboard:true, smoothscroll:true, sensitiverail:true, enablemouselockapi:true, // cursormaxheight:false, cursorfixedheight:false, directionlockdeadzone:6, hidecursordelay:400, nativeparentscrolling:true, enablescrollonselection:true, overflowx:true, overflowy:true, cursordragspeed:0.3, rtlmode:false, cursordragontouch:false, oneaxismousemode:"auto" } var browserdetected = false; var getbrowserdetection = function() { if (browserdetected) return browserdetected; var domtest = document.createelement('div'); var d = {}; d.haspointerlock = "pointerlockelement" in document || "mozpointerlockelement" in document || "webkitpointerlockelement" in document; d.isopera = ("opera" in window); d.isopera12 = (d.isopera&&("getusermedia" in navigator)); d.isoperamini = (object.prototype.tostring.call(window.operamini) === "[object operamini]"); d.isie = (("all" in document) && ("attachevent" in domtest) && !d.isopera); d.isieold = (d.isie && !("msinterpolationmode" in domtest.style)); // ie6 and older d.isie7 = d.isie&&!d.isieold&&(!("documentmode" in document)||(document.documentmode==7)); d.isie8 = d.isie&&("documentmode" in document)&&(document.documentmode==8); d.isie9 = d.isie&&("performance" in window)&&(document.documentmode>=9); d.isie10 = d.isie&&("performance" in window)&&(document.documentmode>=10); d.isie9mobile = /iemobile.9/i.test(navigator.useragent); //wp 7.1 mango if (d.isie9mobile) d.isie9 = false; d.isie7mobile = (!d.isie9mobile&&d.isie7) && /iemobile/i.test(navigator.useragent); //wp 7.0 d.ismozilla = ("mozappearance" in domtest.style); d.iswebkit = ("webkitappearance" in domtest.style); d.ischrome = ("chrome" in window); d.ischrome22 = (d.ischrome&&d.haspointerlock); d.ischrome26 = (d.ischrome&&("transition" in domtest.style)); // issue with transform detection (maintain prefix) d.cantouch = ("ontouchstart" in document.documentelement)||("ontouchstart" in window); // detection for chrome touch emulation d.hasmstouch = (window.navigator.mspointerenabled||false); // ie10+ pointer events d.ismac = /^mac$/i.test(navigator.platform); d.isios = (d.cantouch && /iphone|ipad|ipod/i.test(navigator.platform)); d.isios4 = ((d.isios)&&!("seal" in object)); d.isandroid = (/android/i.test(navigator.useragent)); d.trstyle = false; d.hastransform = false; d.hastranslate3d = false; d.transitionstyle = false; d.hastransition = false; d.transitionend = false; var check = ['transform','mstransform','webkittransform','moztransform','otransform']; for(var a=0;a