/* jquery.nicescroll -- version 3.1.0 -- copyright 2011-12 inuyaksa*2012 -- 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 $ = 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(); // derived by http://blog.joelambert.co.uk/2011/06/01/a-better-settimeoutsetinterval/ var setanimationframe = (function(){ return window.requestanimationframe || window.webkitrequestanimationframe || window.mozrequestanimationframe || window.orequestanimationframe || window.msrequestanimationframe || false; })(); var clearanimationframe = (function(){ return window.cancelrequestanimationframe || window.webkitcancelrequestanimationframe || window.mozcancelrequestanimationframe || window.ocancelrequestanimationframe || window.mscancelrequestanimationframe || false; })(); 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.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.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