├── .gitignore ├── MIT.LICENSE ├── README.md ├── bower.json ├── changelog_3.7.6.txt ├── demo ├── browser.html ├── iframe │ └── lgpl-3.0-standalone.html ├── index.html ├── js │ ├── jquery.nicescroll.min.js │ └── zoomico.png └── rtlmode │ ├── horizontal.html │ └── index.html ├── dist ├── jquery.nicescroll.iframehelper.js ├── jquery.nicescroll.iframehelper.min.js ├── jquery.nicescroll.js ├── jquery.nicescroll.min.js └── zoomico.png ├── jquery.nicescroll.iframehelper.js ├── jquery.nicescroll.iframehelper.min.js ├── jquery.nicescroll.js ├── jquery.nicescroll.min.js ├── package.json └── zoomico.png /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /MIT.LICENSE: -------------------------------------------------------------------------------- 1 | Open Source Initiative OSI - The MIT License (MIT):Licensing 2 | [OSI Approved License] 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2011-17 InuYaksa 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 8 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation 9 | the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 15 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 16 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 17 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jQuery.NiceScroll 2 | v. 3.7.6 3 | 4 | ## The best nicescroll release ever - extremely smooth and consistent in modern browsers and mobile devices, with low resource usage 5 | 6 | - [Web Site: nicescroll.areaaperta.com](https://nicescroll.areaaperta.com) 7 | - [Repo: github.com/inuyaksa/jquery.nicescroll](https://github.com/inuyaksa/jquery.nicescroll) 8 | - [Twitter: @nicescroll](https://twitter.com/nicescroll) 9 | 10 | [](https://gitter.im/inuyaksa/jquery.nicescroll?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 11 | 12 | > Nicescroll as a Greasemonkey plugin: http://userscripts.org/scripts/show/119910 (freezed) 13 | 14 | 15 | > Nicescroll is a jQuery plugin, for nice scrollbars with a very similar ios/mobile style. 16 | 17 | - HORIZONAL scrollbar support! 18 | - It supports DIVs, IFrames, textarea, and document page (body) scrollbars. 19 | - Compatible with all recent desktop browsers and older: Chrome, Firefox, Edge, IE8+, Safari (win/mac), Opera. (all A-grade browsers) 20 | - Compatible with mobile devices: iPad/iPhone/iPod, Android 4+, Blackberry phones and Playbook (WebWorks/Table OS), Windows Phone 8 and 10. 21 | - Compatible with all touch devices: iPad, Android tablets, Window Surface. 22 | - Compabible with multi-input devices (mouse with touch or pen): Window Surface, Chrome Desktop on touch notebook. 23 | - Compatible with 2-directional mice: Apple Magic Mouse, Apple Mouser with 2-dir wheel, PC mouse with 2-dir wheel (if browser support it). 24 | 25 | What you get: customizable and scrollable divs with momentum for iPad and consistent scrollable areas for all desktop and mobile platforms. 26 | 27 | Sexy zoom feature: you can "zoom in" on the content of any nicescroll enabled DIV. 28 | Nice to use and nice to see: all the content of the DIV in fullscreen mode. 29 | It works on desktop (double click on div) either in mobile/touch devices using the pinch gesture. 30 | 31 | On modern browsers hardware accelerated scrolling has been implemented. 32 | Using animationFrame for smoother and cpu-saving scroll animations. (when browser supports) 33 | 34 | "Use strict" tested script for maximum code quality. 35 | Bower and AMD ready. 36 | 37 | Warning for IE6/IE7 users: support for your browser has been deprecated. (Why do you still use this? Please upgrade to a more stable and modern browser) 38 | 39 | 40 | ## FEATURES 41 | 42 | - Simple installation and activation: functions with NO modification of your code. (some exceptions can happen, in which case you can write to me.) 43 | - Very stylish scrollbars with no occupation on your window: original browser scrollbars need some of page space and reduces window/div usable width. 44 | - You can style main document scrollbar (body) too! (not all devices/browsers support this feature yet) 45 | - You can scroll by dragging the cursor, mouse wheel (speed customizable), keyboard navigation (cursor keys, pagup/down keys, home/end keys) on all browsers. 46 | - Scrolling is smooth (like modern tablet browsing). Speed is customizable. 47 | - Zoom feature. 48 | - Hardware accelerated scroll (where available). 49 | - Animation frame support for smooth scrolling and cpu-saving. 50 | - Dragging scroll mode with scrolling momentum (like touch devices). 51 | - Tested for all major mobile and desktop browser versions. 52 | - Support for touch devices. 53 | - Support for multi-input devices (MSPointer/Pointer support). 54 | - Compatible with many other browsers and webkit derivatives! 55 | - Scrollbar has a lot a customizable features. 56 | - Native scroll events are working. 57 | - Fully integrated with jQuery. 58 | - Compatibile with jQuery UI, jQuery Touch, jQuery Mobile 59 | 60 | 61 | ## DEPENDENCIES 62 | >> jQuery is required to be included in your scripts. 63 | >> Works with jQuery 1.x / 2.x / 3.x branch (slim version don't works) 64 | 65 | 66 | * INSTALLATION 67 | Put loading script tag after jquery script tag and loading the zoom image in the same folder of the script: 68 | 69 | <script src="jquery.nicescroll.js"></script> 70 | 71 | When using the zoom feature, copy "zoomico.png" in to the same folder as jquery.nicescroll.js. 72 | 73 | 74 | * HOW TO USE 75 | 76 | ALWAYS Initialize nicescroll in a (document) ready statement. 77 | ```javascript 78 | // 1. Simple mode, it styles document scrollbar: 79 | $(function() { 80 | $("body").niceScroll(); 81 | }); 82 | 83 | // 2. Instance with object returned: 84 | var nice = false; 85 | $(function() { 86 | nice = $("body").niceScroll(); 87 | }); 88 | 89 | // 3. Style a DIV and change cursor color: 90 | $(function() { 91 | $("#thisdiv").niceScroll({cursorcolor:"#00F"}); 92 | }); 93 | 94 | // 4. DIV with "wrapper", formed by two divs, the first is the vieport, the latter is the content: 95 | $(function() { 96 | $("#viewportdiv").niceScroll("#wrapperdiv",{cursorcolor:"#00F"}); 97 | }); 98 | 99 | // 5. Get nicescroll object: 100 | var nice = $("#mydiv").getNiceScroll(); 101 | 102 | // 6. Hide scrollbars: 103 | $("#mydiv").getNiceScroll().hide(); 104 | 105 | // 7. Check for scrollbars resize (when content or position have changed): 106 | $("#mydiv").getNiceScroll().resize(); 107 | 108 | // 8. Scrolling to a position: 109 | $("#mydiv").getNiceScroll(0).doScrollLeft(x, duration); // Scroll X Axis 110 | $("#mydiv").getNiceScroll(0).doScrollTop(y, duration); // Scroll Y Axis 111 | ``` 112 | 113 | ## CONFIGURATION PARAMETERS 114 | When you call "niceScroll" you can pass some parameters to custom visual aspects: 115 | 116 | ```javascript 117 | $("#thisdiv").niceScroll({ 118 | cursorcolor: "#424242", // change cursor color in hex 119 | cursoropacitymin: 0, // change opacity when cursor is inactive (scrollabar "hidden" state), range from 1 to 0 120 | cursoropacitymax: 1, // change opacity when cursor is active (scrollabar "visible" state), range from 1 to 0 121 | cursorwidth: "5px", // cursor width in pixel (you can also write "5px") 122 | cursorborder: "1px solid #fff", // css definition for cursor border 123 | cursorborderradius: "5px", // border radius in pixel for cursor 124 | zindex: "auto" | [number], // change z-index for scrollbar div 125 | scrollspeed: 60, // scrolling speed 126 | mousescrollstep: 40, // scrolling speed with mouse wheel (pixel) 127 | touchbehavior: false, // DEPRECATED!! use "emulatetouch" 128 | emulatetouch: false, // enable cursor-drag scrolling like touch devices in desktop computer 129 | hwacceleration: true, // use hardware accelerated scroll when supported 130 | boxzoom: false, // enable zoom for box content 131 | dblclickzoom: true, // (only when boxzoom=true) zoom activated when double click on box 132 | gesturezoom: true, // (only when boxzoom=true and with touch devices) zoom activated when pinch out/in on box 133 | grabcursorenabled: true // (only when touchbehavior=true) display "grab" icon 134 | autohidemode: true, // how hide the scrollbar works, possible values: 135 | true | // hide when no scrolling 136 | "cursor" | // only cursor hidden 137 | false | // do not hide, 138 | "leave" | // hide only if pointer leaves content 139 | "hidden" | // hide always 140 | "scroll", // show only on scroll 141 | background: "", // change css for rail background 142 | iframeautoresize: true, // autoresize iframe on load event 143 | cursorminheight: 32, // set the minimum cursor height (pixel) 144 | preservenativescrolling: true, // you can scroll native scrollable areas with mouse, bubbling mouse wheel event 145 | railoffset: false, // you can add offset top/left for rail position 146 | bouncescroll: false, // (only hw accell) enable scroll bouncing at the end of content as mobile-like 147 | spacebarenabled: true, // enable page down scrolling when space bar has pressed 148 | railpadding: { top: 0, right: 0, left: 0, bottom: 0 }, // set padding for rail bar 149 | disableoutline: true, // for chrome browser, disable outline (orange highlight) when selecting a div with nicescroll 150 | horizrailenabled: true, // nicescroll can manage horizontal scroll 151 | railalign: right, // alignment of vertical rail 152 | railvalign: bottom, // alignment of horizontal rail 153 | enabletranslate3d: true, // nicescroll can use css translate to scroll content 154 | enablemousewheel: true, // nicescroll can manage mouse wheel events 155 | enablekeyboard: true, // nicescroll can manage keyboard events 156 | smoothscroll: true, // scroll with ease movement 157 | sensitiverail: true, // click on rail make a scroll 158 | enablemouselockapi: true, // can use mouse caption lock API (same issue on object dragging) 159 | cursorfixedheight: false, // set fixed height for cursor in pixel 160 | hidecursordelay: 400, // set the delay in microseconds to fading out scrollbars 161 | directionlockdeadzone: 6, // dead zone in pixels for direction lock activation 162 | nativeparentscrolling: true, // detect bottom of content and let parent to scroll, as native scroll does 163 | enablescrollonselection: true, // enable auto-scrolling of content when selection text 164 | cursordragspeed: 0.3, // speed of selection when dragged with cursor 165 | rtlmode: "auto", // horizontal div scrolling starts at left side 166 | cursordragontouch: false, // drag cursor in touch / touchbehavior mode also 167 | oneaxismousemode: "auto", // it permits horizontal scrolling with mousewheel on horizontal only content, if false (vertical-only) mousewheel don't scroll horizontally, if value is auto detects two-axis mouse 168 | scriptpath: "" // define custom path for boxmode icons ("" => same script path) 169 | preventmultitouchscrolling: true // prevent scrolling on multitouch events 170 | disablemutationobserver: false // force MutationObserver disabled, 171 | enableobserver: true // enable DOM changing observer, it tries to resize/hide/show when parent or content div had changed 172 | scrollbarid: false // set a custom ID for nicescroll bars 173 | }); 174 | ``` 175 | 176 | Related projects 177 | ---------------- 178 | 179 | * [Nicescroll for Angular](https://github.com/tushariscoolster/angular-nicescroll) 180 | 181 | * LICENSE 182 | 183 | ## Copyright 2011-17 InuYaksa 184 | 185 | ###### Licensed under the MIT License, http://www.opensource.org/licenses/mit-license.php 186 | 187 | ###### Images used for zoom icons have derived from OLPC interface, http://laptop.org/8.2.0/manual/Browse_ChangingView.html 188 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery.nicescroll", 3 | "main": [ 4 | "./jquery.nicescroll.min.js" 5 | ], 6 | "ignore": [ 7 | "**/.*", 8 | "demo", 9 | "package.json" 10 | ], 11 | "dependencies": { 12 | "jquery": ">=1.8.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /changelog_3.7.6.txt: -------------------------------------------------------------------------------- 1 | Changelog nicescroll release 3.7.6 2 | https://nicescroll.areaaperta.com/ 3 | https://github.com/inuyaksa/jquery.nicescroll 4 | 5 | 6 | 7 | Fixes 8 | - Error in remove() using angular nicescroll with modal popup #683 9 | 10 | Changes 11 | - none -------------------------------------------------------------------------------- /demo/browser.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 | <html xmlns="http://www.w3.org/1999/xhtml"> 3 | <head> 4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 | <title>jQuery NiceScroll Browser Detection</title> 6 | <style type="text/css"> 7 | .testok { 8 | background-color: #71FF71; 9 | } 10 | .testko { 11 | background-color: #FF6C6C; 12 | } 13 | body { 14 | font-family: Verdana, Arial, Helvetica, sans-serif; 15 | font-size: 12px; 16 | } 17 | .divs { 18 | padding-top: 4px; 19 | } 20 | .num { 21 | font-size: 10px; 22 | color: #525252; 23 | vertical-align: super; 24 | } 25 | </style> 26 | 27 | <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 28 | <script src="js/jquery.nicescroll.min.js"></script> 29 | 30 | <script> 31 | var nice = false; 32 | 33 | $(function() { 34 | nice = $("html").niceScroll(); 35 | }); 36 | 37 | var obj = window; 38 | 39 | console.log(obj.length); 40 | console.log("selector" in obj); 41 | 42 | </script> 43 | 44 | <script> 45 | 46 | function toCell(px,py,ok) { 47 | $("#tab1").find('tr').eq(py).find('td').eq(px).addClass((ok)?'testok':'testko'); 48 | }; 49 | 50 | $(window).load(function() { 51 | $("#div1").html($("#div1").html()+' '+nice.version); 52 | $("#div2").html($("#div2").html()+' '+navigator.userAgent); 53 | 54 | toCell(1,1,nice.detected.ismozilla); 55 | 56 | toCell(2,1,(nice.detected.iswebkit)); 57 | 58 | toCell(3,1,nice.detected.isie); 59 | toCell(3,2,nice.detected.isie10); 60 | toCell(3,3,nice.detected.isie9); 61 | toCell(3,4,nice.detected.isie8); 62 | toCell(3,5,nice.detected.isie7); 63 | toCell(3,6,nice.detected.isieold); 64 | 65 | toCell(7,1,nice.detected.isie11); 66 | toCell(7,2,nice.detected.ismsedge); 67 | 68 | toCell(4,1,nice.detected.isopera); 69 | toCell(4,2,nice.detected.isopera12); 70 | toCell(4,3,nice.detected.isoperamini); 71 | 72 | toCell(5,1,nice.detected.isios); 73 | toCell(5,2,nice.detected.isios4); 74 | toCell(5,3,nice.detected.isios8); 75 | toCell(5,4,nice.detected.isios10); 76 | 77 | toCell(6,1,nice.detected.ischrome); 78 | toCell(6,2,nice.detected.ischrome22); 79 | toCell(6,3,nice.detected.ischrome26); 80 | 81 | 82 | toCell(0,8,nice.detected.cantouch); 83 | toCell(3,8,nice.detected.hasmstouch); 84 | toCell(7,8,nice.detected.hasw3ctouch); 85 | 86 | toCell(1,10,nice.detected.hastransform); 87 | toCell(1,11,nice.detected.hastranslate3d); 88 | toCell(2,10,nice.detected.hastransition); 89 | toCell(2,11,!!nice.detected.transitionend); 90 | toCell(3,10,nice.hasanimationframe); 91 | toCell(3,11,nice.hascancelanimationframe); 92 | toCell(4,10,nice.detected.hasMutationObserver); 93 | 94 | toCell(1,12,nice.detected.hasmousecapture); 95 | toCell(2,12,((nice.detected.cursorgrabvalue!='')&&(nice.detected.cursorgrabvalue.substr(0,3)!='url'))); 96 | toCell(3,12,nice.detected.haspointerlock); 97 | 98 | toCell(1,14,!nice.detected.cantouch); 99 | toCell(2,14,!nice.detected.cantouch); 100 | toCell(3,14,nice.detected.cantouch||nice.istouchcapable||nice.hasmstouch||nice.detected.hasw3ctouch); 101 | //toCell(4,14,nice.detected.isie9mobile); 102 | 103 | }); 104 | 105 | </script> 106 | 107 | </head> 108 | 109 | <body> 110 | <p>CHECK YOU BROWSER PAGE</p> 111 | <div id="div1">NiceScroll version:</div> 112 | <div id="div2">You browser user agent:</div> 113 | <table border="0" cellpadding="6" cellspacing="2" id="tab1"> 114 | <tr> 115 | <td> </td> 116 | <td> </td> 117 | <td> </td> 118 | <td> </td> 119 | <td> </td> 120 | <td> </td> 121 | <td> </td> 122 | </tr> 123 | <tr> 124 | <td bgcolor="#E0E0E9">Browser class</td> 125 | <td bgcolor="#E0E0E9">Mozilla</td> 126 | <td bgcolor="#E0E0E9">WebKit</td> 127 | <td bgcolor="#E0E0E9">IE</td> 128 | <td bgcolor="#E0E0E9">Opera</td> 129 | <td bgcolor="#E0E0E9">iOS <span class="num">(7)</span></td> 130 | <td bgcolor="#E0E0E9">Chrome</td> 131 | <td bgcolor="#E0E0E9">IE11+</td> 132 | </tr> 133 | <tr> 134 | <td bgcolor="#E0E0E9">Families</td> 135 | <td bgcolor="#E0E0E9"> </td> 136 | <td bgcolor="#E0E0E9"> </td> 137 | <td bgcolor="#E0E0E9">IE10+</td> 138 | <td bgcolor="#E0E0E9">Opera 12</td> 139 | <td bgcolor="#E0E0E9">iOS4- <span class="num">(6)</span></td> 140 | <td bgcolor="#E0E0E9">Chrome 22+</td> 141 | <td bgcolor="#E0E0E9">MSEdge</td> 142 | </tr> 143 | <tr> 144 | <td bgcolor="#E0E0E9"> </td> 145 | <td bgcolor="#E0E0E9"> </td> 146 | <td bgcolor="#E0E0E9"> </td> 147 | <td bgcolor="#E0E0E9">IE9+</td> 148 | <td bgcolor="#E0E0E9">Opera Mini</td> 149 | <td bgcolor="#E0E0E9">iOS8</td> 150 | <td bgcolor="#E0E0E9">Chrome 26+</td> 151 | <td bgcolor="#E0E0E9"> </td> 152 | </tr> 153 | <tr> 154 | <td bgcolor="#E0E0E9"> </td> 155 | <td bgcolor="#E0E0E9"> </td> 156 | <td bgcolor="#E0E0E9"> </td> 157 | <td bgcolor="#E0E0E9">IE8</td> 158 | <td bgcolor="#E0E0E9"> </td> 159 | <td bgcolor="#E0E0E9">iOS10</td> 160 | <td bgcolor="#E0E0E9"> </td> 161 | <td bgcolor="#E0E0E9"> </td> 162 | </tr> 163 | <tr> 164 | <td bgcolor="#E0E0E9"> </td> 165 | <td bgcolor="#E0E0E9"> </td> 166 | <td bgcolor="#E0E0E9"> </td> 167 | <td bgcolor="#E0E0E9">IE7</td> 168 | <td bgcolor="#E0E0E9"> </td> 169 | <td bgcolor="#E0E0E9"> </td> 170 | <td bgcolor="#E0E0E9"> </td> 171 | <td bgcolor="#E0E0E9"> </td> 172 | </tr> 173 | <tr> 174 | <td bgcolor="#E0E0E9"> </td> 175 | <td bgcolor="#E0E0E9"> </td> 176 | <td bgcolor="#E0E0E9"> </td> 177 | <td bgcolor="#E0E0E9">IE6- <span class="num">(1)</span></td> 178 | <td bgcolor="#E0E0E9"> </td> 179 | <td bgcolor="#E0E0E9"> </td> 180 | <td bgcolor="#E0E0E9"> </td> 181 | <td bgcolor="#E0E0E9"> </td> 182 | </tr> 183 | <tr> 184 | <td> </td> 185 | <td> </td> 186 | <td> </td> 187 | <td> </td> 188 | <td> </td> 189 | <td> </td> 190 | <td> </td> 191 | <td> </td> 192 | </tr> 193 | <tr bgcolor="#E0E0E9"> 194 | <td>Touch</td> 195 | <td> </td> 196 | <td> </td> 197 | <td>MSPointer</td> 198 | <td> </td> 199 | <td> </td> 200 | <td> </td> 201 | <td>Pointer (W3C)</td> 202 | </tr> 203 | <tr> 204 | <td> </td> 205 | <td> </td> 206 | <td> </td> 207 | <td> </td> 208 | <td> </td> 209 | <td> </td> 210 | <td> </td> 211 | <td> </td> 212 | </tr> 213 | <tr> 214 | <td bgcolor="#E0E0E9">Browser capabilities</td> 215 | <td bgcolor="#E0E0E9">Transform <span class="num">(2)</span></td> 216 | <td bgcolor="#E0E0E9">Transition <span class="num">(4)</span></td> 217 | <td bgcolor="#E0E0E9">AnimationFrame <span class="num">(5)</span></td> 218 | <td bgcolor="#E0E0E9">MutationObserver</td> 219 | <td bgcolor="#E0E0E9"> </td> 220 | <td bgcolor="#E0E0E9"> </td> 221 | <td bgcolor="#E0E0E9"> </td> 222 | </tr> 223 | <tr> 224 | <td bgcolor="#E0E0E9"> </td> 225 | <td bgcolor="#E0E0E9">translate3d <span class="num">(3)</span></td> 226 | <td bgcolor="#E0E0E9">transitionEnd</td> 227 | <td bgcolor="#E0E0E9">cancelAnimationFrame</td> 228 | <td bgcolor="#E0E0E9"> </td> 229 | <td bgcolor="#E0E0E9"> </td> 230 | <td bgcolor="#E0E0E9"> </td> 231 | <td bgcolor="#E0E0E9"> </td> 232 | </tr> 233 | <tr> 234 | <td bgcolor="#E0E0E9"> </td> 235 | <td bgcolor="#E0E0E9">setCapture</td> 236 | <td bgcolor="#E0E0E9">cursor:grab</td> 237 | <td bgcolor="#E0E0E9">Pointer Lock API</td> 238 | <td bgcolor="#E0E0E9"> </td> 239 | <td bgcolor="#E0E0E9"> </td> 240 | <td bgcolor="#E0E0E9"> </td> 241 | <td bgcolor="#E0E0E9"> </td> 242 | </tr> 243 | <tr> 244 | <td> </td> 245 | <td> </td> 246 | <td> </td> 247 | <td> </td> 248 | <td> </td> 249 | <td> </td> 250 | <td> </td> 251 | <td> </td> 252 | </tr> 253 | <tr bgcolor="#E0E0E9"> 254 | <td>Input</td> 255 | <td>Keyboard</td> 256 | <td>Mouse</td> 257 | <td>Touch/Pen</td> 258 | <td> </td> 259 | <td> </td> 260 | <td> </td> 261 | <td> </td> 262 | </tr> 263 | </table> 264 | <p> </p> 265 | 266 | <p>(1) position:fixed not supported, scrollbar for page and zoom features disabled<br /> 267 | (2) hardware scroll for wrapped div<br /> 268 | (3) hardware scroll preferable for mobile devices<br /> 269 | (4) transition (animation) used for scroll content (hw full implementation)<br /> 270 | (5) more smooth native scroll and cpu saving<br /> 271 | (6) some problem with zoom feature for browser limitation<br /> 272 | (7) use native scrollbar for page<br /> 273 | </p> 274 | <p> </p> 275 | 276 | <script type="text/javascript"> 277 | 278 | var _gaq = _gaq || []; 279 | _gaq.push(['_setAccount', 'UA-26840957-1']); 280 | _gaq.push(['_setDomainName', '.areaaperta.com']); 281 | _gaq.push(['_trackPageview']); 282 | 283 | (function() { 284 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 285 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 286 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 287 | })(); 288 | 289 | </script> 290 | 291 | </body> 292 | </html> 293 | -------------------------------------------------------------------------------- /demo/iframe/lgpl-3.0-standalone.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 | <html><head> 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4 | <title>GNU Lesser General Public License v3.0 - GNU Project - Free Software Foundation (FSF)</title> 5 | <link rel="alternate" type="application/rdf+xml" href="http://www.gnu.org/licenses/lgpl-3.0.rdf"> 6 | </head> 7 | <body> 8 | <h3 style="text-align: center;">GNU LESSER GENERAL PUBLIC LICENSE</h3> 9 | <p style="text-align: center;">Version 3, 29 June 2007</p> 10 | 11 | <p>Copyright © 2007 Free Software Foundation, Inc. 12 | <<a href="http://fsf.org/">http://fsf.org/</a>></p><p> 13 | Everyone is permitted to copy and distribute verbatim copies 14 | of this license document, but changing it is not allowed.</p> 15 | 16 | <p>This version of the GNU Lesser General Public License incorporates 17 | the terms and conditions of version 3 of the GNU General Public 18 | License, supplemented by the additional permissions listed below.</p> 19 | 20 | <h4><a name="section0"></a>0. Additional Definitions.</h4> 21 | 22 | <p>As used herein, “this License” refers to version 3 of the GNU Lesser 23 | General Public License, and the “GNU GPL” refers to version 3 of the GNU 24 | General Public License.</p> 25 | 26 | <p>“The Library” refers to a covered work governed by this License, 27 | other than an Application or a Combined Work as defined below.</p> 28 | 29 | <p>An “Application” is any work that makes use of an interface provided 30 | by the Library, but which is not otherwise based on the Library. 31 | Defining a subclass of a class defined by the Library is deemed a mode 32 | of using an interface provided by the Library.</p> 33 | 34 | <p>A “Combined Work” is a work produced by combining or linking an 35 | Application with the Library. The particular version of the Library 36 | with which the Combined Work was made is also called the “Linked 37 | Version”.</p> 38 | 39 | <p>The “Minimal Corresponding Source” for a Combined Work means the 40 | Corresponding Source for the Combined Work, excluding any source code 41 | for portions of the Combined Work that, considered in isolation, are 42 | based on the Application, and not on the Linked Version.</p> 43 | 44 | <p>The “Corresponding Application Code” for a Combined Work means the 45 | object code and/or source code for the Application, including any data 46 | and utility programs needed for reproducing the Combined Work from the 47 | Application, but excluding the System Libraries of the Combined Work.</p> 48 | 49 | <h4><a name="section1"></a>1. Exception to Section 3 of the GNU GPL.</h4> 50 | 51 | <p>You may convey a covered work under sections 3 and 4 of this License 52 | without being bound by section 3 of the GNU GPL.</p> 53 | 54 | <h4><a name="section2"></a>2. Conveying Modified Versions.</h4> 55 | 56 | <p>If you modify a copy of the Library, and, in your modifications, a 57 | facility refers to a function or data to be supplied by an Application 58 | that uses the facility (other than as an argument passed when the 59 | facility is invoked), then you may convey a copy of the modified 60 | version:</p> 61 | 62 | <ul> 63 | <li>a) under this License, provided that you make a good faith effort to 64 | ensure that, in the event an Application does not supply the 65 | function or data, the facility still operates, and performs 66 | whatever part of its purpose remains meaningful, or</li> 67 | 68 | <li>b) under the GNU GPL, with none of the additional permissions of 69 | this License applicable to that copy.</li> 70 | </ul> 71 | 72 | <h4><a name="section3"></a>3. Object Code Incorporating Material from Library Header Files.</h4> 73 | 74 | <p>The object code form of an Application may incorporate material from 75 | a header file that is part of the Library. You may convey such object 76 | code under terms of your choice, provided that, if the incorporated 77 | material is not limited to numerical parameters, data structure 78 | layouts and accessors, or small macros, inline functions and templates 79 | (ten or fewer lines in length), you do both of the following:</p> 80 | 81 | <ul> 82 | <li>a) Give prominent notice with each copy of the object code that the 83 | Library is used in it and that the Library and its use are 84 | covered by this License.</li> 85 | 86 | <li>b) Accompany the object code with a copy of the GNU GPL and this license 87 | document.</li> 88 | </ul> 89 | 90 | <h4><a name="section4"></a>4. Combined Works.</h4> 91 | 92 | <p>You may convey a Combined Work under terms of your choice that, 93 | taken together, effectively do not restrict modification of the 94 | portions of the Library contained in the Combined Work and reverse 95 | engineering for debugging such modifications, if you also do each of 96 | the following:</p> 97 | 98 | <ul> 99 | <li>a) Give prominent notice with each copy of the Combined Work that 100 | the Library is used in it and that the Library and its use are 101 | covered by this License.</li> 102 | 103 | <li>b) Accompany the Combined Work with a copy of the GNU GPL and this license 104 | document.</li> 105 | 106 | <li>c) For a Combined Work that displays copyright notices during 107 | execution, include the copyright notice for the Library among 108 | these notices, as well as a reference directing the user to the 109 | copies of the GNU GPL and this license document.</li> 110 | 111 | <li>d) Do one of the following: 112 | 113 | <ul> 114 | <li>0) Convey the Minimal Corresponding Source under the terms of this 115 | License, and the Corresponding Application Code in a form 116 | suitable for, and under terms that permit, the user to 117 | recombine or relink the Application with a modified version of 118 | the Linked Version to produce a modified Combined Work, in the 119 | manner specified by section 6 of the GNU GPL for conveying 120 | Corresponding Source.</li> 121 | 122 | <li>1) Use a suitable shared library mechanism for linking with the 123 | Library. A suitable mechanism is one that (a) uses at run time 124 | a copy of the Library already present on the user's computer 125 | system, and (b) will operate properly with a modified version 126 | of the Library that is interface-compatible with the Linked 127 | Version.</li> 128 | </ul></li> 129 | 130 | <li>e) Provide Installation Information, but only if you would otherwise 131 | be required to provide such information under section 6 of the 132 | GNU GPL, and only to the extent that such information is 133 | necessary to install and execute a modified version of the 134 | Combined Work produced by recombining or relinking the 135 | Application with a modified version of the Linked Version. (If 136 | you use option 4d0, the Installation Information must accompany 137 | the Minimal Corresponding Source and Corresponding Application 138 | Code. If you use option 4d1, you must provide the Installation 139 | Information in the manner specified by section 6 of the GNU GPL 140 | for conveying Corresponding Source.)</li> 141 | </ul> 142 | 143 | <h4><a name="section5"></a>5. Combined Libraries.</h4> 144 | 145 | <p>You may place library facilities that are a work based on the 146 | Library side by side in a single library together with other library 147 | facilities that are not Applications and are not covered by this 148 | License, and convey such a combined library under terms of your 149 | choice, if you do both of the following:</p> 150 | 151 | <ul> 152 | <li>a) Accompany the combined library with a copy of the same work based 153 | on the Library, uncombined with any other library facilities, 154 | conveyed under the terms of this License.</li> 155 | 156 | <li>b) Give prominent notice with the combined library that part of it 157 | is a work based on the Library, and explaining where to find the 158 | accompanying uncombined form of the same work.</li> 159 | </ul> 160 | 161 | <h4><a name="section6"></a>6. Revised Versions of the GNU Lesser General Public License.</h4> 162 | 163 | <p>The Free Software Foundation may publish revised and/or new versions 164 | of the GNU Lesser General Public License from time to time. Such new 165 | versions will be similar in spirit to the present version, but may 166 | differ in detail to address new problems or concerns.</p> 167 | 168 | <p>Each version is given a distinguishing version number. If the 169 | Library as you received it specifies that a certain numbered version 170 | of the GNU Lesser General Public License “or any later version” 171 | applies to it, you have the option of following the terms and 172 | conditions either of that published version or of any later version 173 | published by the Free Software Foundation. If the Library as you 174 | received it does not specify a version number of the GNU Lesser 175 | General Public License, you may choose any version of the GNU Lesser 176 | General Public License ever published by the Free Software Foundation.</p> 177 | 178 | <p>If the Library as you received it specifies that a proxy can decide 179 | whether future versions of the GNU Lesser General Public License shall 180 | apply, that proxy's public statement of acceptance of any version is 181 | permanent authorization for you to choose that version for the 182 | Library.</p> 183 | 184 | 185 | </body></html> -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 | <html xmlns="http://www.w3.org/1999/xhtml"> 3 | <head> 4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 | <title>jQuery NiceScroll Test Page</title> 6 | <style type="text/css"> 7 | #boxscroll { 8 | padding: 40px; 9 | height: 220px; 10 | width: 300px; 11 | border: 2px solid #00F; 12 | overflow: auto; 13 | margin-bottom:30px; 14 | } 15 | #boxscroll2 { 16 | padding: 40px; 17 | height: 120px; 18 | width: 730px; 19 | border: 2px solid #F00; 20 | overflow: auto; 21 | } 22 | #boxscroll3 { 23 | overflow: hidden; 24 | } 25 | #boxframe { 26 | position:absolute; 27 | top:28px; 28 | left:420px; 29 | width:400px; 30 | height:300px; 31 | overflow:auto; 32 | border: 2px solid #0F0; 33 | } 34 | #boxscroll4 { 35 | height: 300px; 36 | margin-top: 40px; 37 | background-color: #00FF66; 38 | font-family: Georgia, "Times New Roman", Times, serif; 39 | font-size: 18px; 40 | padding: 20px; 41 | color: #006633; 42 | overflow: auto; 43 | } 44 | </style> 45 | 46 | <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 47 | <script src="js/jquery.nicescroll.min.js"></script> 48 | 49 | <script> 50 | $(document).ready(function() { 51 | 52 | var nice = $("html").niceScroll(); // The document page (body) 53 | 54 | $("#div1").html($("#div1").html()+' '+nice.version); 55 | 56 | $("#boxscroll").niceScroll({cursorborder:"",cursorcolor:"#00F",boxzoom:true}); // First scrollable DIV 57 | 58 | $("#boxscroll2").niceScroll("#contentscroll2",{cursorcolor:"#F00",cursoropacitymax:0.7,boxzoom:true,touchbehavior:true}); // Second scrollable DIV 59 | $("#boxframe").niceScroll("#boxscroll3",{cursorcolor:"#0F0",cursoropacitymax:0.7,boxzoom:true,touchbehavior:true}); // This is an IFrame (iPad compatible) 60 | 61 | $("#boxscroll4").niceScroll("#boxscroll4 .wrapper",{boxzoom:true}); // hw acceleration enabled when using wrapper 62 | 63 | }); 64 | </script> 65 | 66 | <meta name="viewport" content="user-scalable=no" /> 67 | 68 | </head> 69 | 70 | <body> 71 | 72 | <div id="div1"><strong>NiceScroll version:</strong></div> 73 | 74 | <div id="boxscroll"> 75 | THIS IS A SIMPLE SCROLLABLE DIV 76 | <h2> Package Description </h2> 77 | <p>Release Date: August 10, 2010</p> 78 | <p>The <a title="http://www.openprinting.org/show_driver.cgi?driver=hpijs" rel="nofollow" href="http://www.openprinting.org/show_driver.cgi?driver=hpijs">HPIJS</a> driver is the free, <a title="http://hplipopensource.com/hplip-web/index.html" rel="nofollow" href="http://hplipopensource.com/hplip-web/index.html">open-source driver</a> issued by HP for their DeskJet and LaserJet printers. For most <a title="" href="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/hpijs#Printers">supported printers</a>, this driver produces output quality equivalent to the proprietary HP drivers. In photo mode, with photo paper, the output quality is very high, especially for the HP DeskJet 990C and later models, which auto-detect the paper type in hardware. Photo printing is fully supported in the newer 6- and 7-ink models.</p> 79 | <p>A major advantage of using this driver over those supplied by HP is the direct interface between HPIJS and the native CUPS spooler, which allows printing from any printer over any available connection such as USB, AppleTalk, TCP/IP (via LPD and IPP), HP JetDirect, and shared windows printers via SAMBA. Additionally, this driver utilizes the existing Mac OS X USB "backend" and thus does not install any software that might interfere with standard USB operation.</p> 80 | <p>Please note:</p> 81 | <ul> 82 | <li>HP does not provide any support for HPLIP or HPIJS on the Mac OS X platform.</li> 83 | <li><a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">Several HP USB devices</a> may not print successfully over the standard Mac OS X USB "backend". Please <a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">see this note</a> for more information.</li> 84 | </ul> 85 | <h2>Release Notes</h2> 86 | <ul> 87 | <li>This release fixes a problem with the PPDs that caused many job options such as page orientation, color/grayscale mode, duplex printing, etc. to fail.</li> 88 | <li>HPIJS is HP's universal printer driver for most of their non-PostScript printers. It comes as a part of HPLIP, HP Linux Imaging and Printing.</li> 89 | <li>The PPDs for HP printers are now sourced from the HPLIP package rather than the OpenPrinting.org database.</li> 90 | <li>PPDs for printers from other manufacturers are provided by OpenPrinting.org.</li> 91 | <li>Some printers are only partially supported. Printers such as<br /> 92 | HP LaserJet 1022<br /> 93 | HP LaserJet p1505n<br /> 94 | HP LaserJet p12014<br /> 95 | HP LaserJet p2035<br /> 96 | require a proprietary plug-in for full support. This package does not contain or support such plug-ins.</li> 97 | </ul> 98 | <p><a name="Printer_Set_Up_Instructions" id="Printer_Set_Up_Instructions"></a></p> 99 | <h2> Printer Set Up Instructions </h2> 100 | <p>To add a printer queue, Leopard (Mac OS X 10.5.x) users should use the Print & Fax from System Preferences. Click on the + (plus) icon at the lower left. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 101 | <p>Tiger users should open the Printer Setup Utility and click on the Add icon at the top of the Printer List window. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 102 | <p>Jaguar (OS X 10.2.x) and Panther (OS X 10.3.x) users should open Print Center (Jaguar) or Printer Setup Utility (Panther), hold down the Option key, and click the Add Printer button in the Print Center toolbar. Within the setup sheet, choose Advanced from the top popup menu; then in the "Device:" popup menu select your printer by name (it should be the last item in the menu list). Finally, select the correct PPD from the model browser and click Add.</p> 103 | </div> 104 | 105 | <div id="boxscroll2"> 106 | <div id="contentscroll2"> 107 | THIS IS A DIV + WRAPPER 108 | <h2>Package Description </h2> 109 | <p>Release Date: August 10, 2010</p> 110 | <p>The <a title="http://www.openprinting.org/show_driver.cgi?driver=hpijs" rel="nofollow" href="http://www.openprinting.org/show_driver.cgi?driver=hpijs">HPIJS</a> driver is the free, <a title="http://hplipopensource.com/hplip-web/index.html" rel="nofollow" href="http://hplipopensource.com/hplip-web/index.html">open-source driver</a> issued by HP for their DeskJet and LaserJet printers. For most <a title="" href="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/hpijs#Printers">supported printers</a>, this driver produces output quality equivalent to the proprietary HP drivers. In photo mode, with photo paper, the output quality is very high, especially for the HP DeskJet 990C and later models, which auto-detect the paper type in hardware. Photo printing is fully supported in the newer 6- and 7-ink models.</p> 111 | <p>A major advantage of using this driver over those supplied by HP is the direct interface between HPIJS and the native CUPS spooler, which allows printing from any printer over any available connection such as USB, AppleTalk, TCP/IP (via LPD and IPP), HP JetDirect, and shared windows printers via SAMBA. Additionally, this driver utilizes the existing Mac OS X USB "backend" and thus does not install any software that might interfere with standard USB operation.</p> 112 | <p>Please note:</p> 113 | <ul> 114 | <li>HP does not provide any support for HPLIP or HPIJS on the Mac OS X platform.</li> 115 | <li><a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">Several HP USB devices</a> may not print successfully over the standard Mac OS X USB "backend". Please <a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">see this note</a> for more information.</li> 116 | </ul> 117 | <h2>Release Notes</h2> 118 | <ul> 119 | <li>This release fixes a problem with the PPDs that caused many job options such as page orientation, color/grayscale mode, duplex printing, etc. to fail.</li> 120 | <li>HPIJS is HP's universal printer driver for most of their non-PostScript printers. It comes as a part of HPLIP, HP Linux Imaging and Printing.</li> 121 | <li>The PPDs for HP printers are now sourced from the HPLIP package rather than the OpenPrinting.org database.</li> 122 | <li>PPDs for printers from other manufacturers are provided by OpenPrinting.org.</li> 123 | <li>Some printers are only partially supported. Printers such as<br /> 124 | HP LaserJet 1022<br /> 125 | HP LaserJet p1505n<br /> 126 | HP LaserJet p12014<br /> 127 | HP LaserJet p2035<br /> 128 | require a proprietary plug-in for full support. This package does not contain or support such plug-ins.</li> 129 | </ul> 130 | <p><a name="Printer_Set_Up_Instructions" id="Printer_Set_Up_Instructions"></a></p> 131 | <h2> Printer Set Up Instructions </h2> 132 | <p>To add a printer queue, Leopard (Mac OS X 10.5.x) users should use the Print & Fax from System Preferences. Click on the + (plus) icon at the lower left. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 133 | <p>Tiger users should open the Printer Setup Utility and click on the Add icon at the top of the Printer List window. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 134 | <p>Jaguar (OS X 10.2.x) and Panther (OS X 10.3.x) users should open Print Center (Jaguar) or Printer Setup Utility (Panther), hold down the Option key, and click the Add Printer button in the Print Center toolbar. Within the setup sheet, choose Advanced from the top popup menu; then in the "Device:" popup menu select your printer by name (it should be the last item in the menu list). Finally, select the correct PPD from the model browser and click Add.</p> 135 | </div> 136 | </div> 137 | 138 | <div id="boxframe"> 139 | <iframe id="boxscroll3" src="iframe/lgpl-3.0-standalone.html" height="100%" width="100%" frameborder="0" onload="$(this).height($(this).contents().height());"></iframe> 140 | </div> 141 | 142 | 143 | <div id="boxscroll4"> 144 | <div class="wrapper"> 145 | <p><strong>Goggles</strong><br /> 146 | From Wikipedia, the free encyclopedia<br /> 147 | http://en.wikipedia.org/wiki/Goggles</p> 148 | <p><br /> 149 | Page semi-protected<br /> 150 | SealMask watersport goggles made by AquaSphere</p> 151 | <p>Goggles or safety glasses are forms of protective eyewear that usually enclose or protect the area surrounding the eye in order to prevent particulates, water or chemicals from striking the eyes. They are used in chemistry laboratories and in woodworking. They are often used in snow sports as well, and in swimming. Goggles are often worn when using power tools such as drills or chainsaws to prevent flying particles from damaging the eyes. Many types of goggles are available as prescription goggles for those with vision problems.<br /> 152 | Contents<br /> 153 | [hide] </p> 154 | <p> 1 History<br /> 155 | 2 Types<br /> 156 | 3 Fashion<br /> 157 | 4 Non-human<br /> 158 | 5 See also<br /> 159 | 6 References</p> 160 | <p>History</p> 161 | <p>The Eskimos carved Inuit snow goggles from caribou antler, and wood and shell, to help prevent snow blindness. The goggles were curved to fit the user's face and had a large groove cut in the back to allow for the nose. A long thin slit was cut through the goggles to allow in a small amount of light, diminishing subsequent ultraviolet rays. The goggles were held to the head by a cord made of caribou sinew.</p> 162 | <p>In the early 20th century, goggles were worn by drivers of uncovered cars to prevent irritation of the eyes by dust or wind. [1] Likewise in the first ten years after the invention of the airplane in 1903 goggles became a necessity as wind blow became more severe as aircraft speeds increased and as protection against bugstrikes at high altitudes. The first pilot to wear goggles was probably Charles Manly in his failed attempt to fly Samuel Langley's aerodrome in 1903.</p> 163 | <p> Traditional Inuit goggles used to combat snow blindness</p> 164 | <p> Metal nenets goggles</p> 165 | <p> Blowtorching goggles and safety helmet</p> 166 | <p> Swimming goggles</p> 167 | <p>Types</p> 168 | <p>The requirements for goggles varies depending on the use. Some examples:</p> 169 | <p> Cold weather: Most modern cold-weather goggles have two layers of lens to prevent the interior from becoming "foggy". With only a single lens, the interior water vapor condenses onto the lens because the lens is colder than the vapor, although anti-fog agents can be used. The reasoning behind dual layer lens is that the inner lens will be warm while the outer lens will be cold. As long as the temperature of the inner lens is close to that of the interior water vapor, the vapor should not condense. However, if water vapor gets between the layers of the lens, condensation can occur between the lenses and is almost impossible to get rid of; thus, properly constructed and maintained dual-layer lenses should be air-tight to prevent water vapor from getting in between the lenses.<br /> 170 | Swimming: Must be watertight to prevent water, such as salt water when swimming in the ocean, or chlorinated water when swimming in a pool, from irritating the eyes or blurring vision. Allows swimmers to see clearly underwater. They will not be usable more than a few feet underwater, because the water pressure will press them tightly against the face. Examples of these include the Swedish goggles.<br /> 171 | Power tools: Must be made of an unbreakable material that prevents chunks of metal, wood, plastic, concrete, and so on from hitting or piercing the eye. Usually has some sort of ventilation to prevent sweat from building up inside the goggles and fogging the surface.<br /> 172 | Blowtorch goggles: These protect the eyes from glare and flying sparks and hot metal splashes while using or near as blowtorch. They are not the correct filters for arc welding.<br /> 173 | Welding goggles: Includes all goggles for eye protection during welding or cutting. They provide protection against debris, the heat from welding, and, with the proper filters, the optical radiation resulting from the welding, which can otherwise cause arc eye.<br /> 174 | Motorcycle riding and other open-air activities: Prevents insects, dust, and so on from hitting the eyes.<br /> 175 | Laboratory and research: Combines impact resistance with side shields to prevent chemical splashes reaching the eyes. May also include laser protection which would be covered by EN 207 (Europe) and ANSI Z 136 (United States). Examples of these include red adaptation goggles.<br /> 176 | Racquetball: Protect the eyes from racquets swinging in an enclosed area and from impact from hard rubber ball.<br /> 177 | Winter sports: Protect the eyes from glare and from icy particles flying up from the ground.<br /> 178 | Astronomy and meteorology: dark adaptor goggles are used before going outside at night, in order to help the eyes adapt to the dark.<br /> 179 | Basketball: Several NBA players have worn goggles during play, including Kareem Abdul-Jabbar, James Worthy, Horace Grant, Kurt Rambis and Amar'e Stoudemire; they prevent a fellow player from scratching or hitting the eyes when trying to grab the basketball.<br /> 180 | Aviation: In open cockpit aircraft, such as old biplanes, aviators, such as Amelia Earhart and Charles Kingsford Smith, would wear goggles to help protect from the wind and are still in use today. Examples of these include the AN-6530 goggles.<br /> 181 | Virtual reality: A virtual reality headset, sometimes called "goggles", is a wrap-around visual interface to display computer output. Commonly the computer display information is presented as a three-dimensional representation of real-world environments.</p> 182 | <p>Fashion</p> 183 | <p>Goggles are often worn as a fashion statement in certain subcultures, most often as part of the cybergoth subculture. They are usually worn over the eyes or up on the forehead to secure 'falls': a type of long, often brightly-coloured, synthetic hairpiece. Fans of the steampunk genre or subculture also frequently wear steampunk-styled goggles, particularly when performing in a live action role-playing game.</p> 184 | <p>Goggles are also frequently used by anime and manga characters as a fashion statement. For example, it is an idiosyncrasy of team leader characters in the Digimon anime to wear goggles. Other notable characters who wear goggles are the young Naruto Uzumaki and Konohamaru from Naruto, Matt from Death Note and Usopp from One Piece.<br /> 185 | Non-human<br /> 186 | Bullfighting horse wearing eye protection<br /> 187 | A US Military working dog attached to a helicopter hoist in Afghanistan.</p> 188 | <p>Goggles are available for horses used in speed sports such as horse racing.[2] In some traditions of horse mounted bullfighting, the horse may wear a protective cloth over its eyes.</p> 189 | <p>Goggles have been used on military working dogs, for protection in harsh conditions, such as sandstorms and rotorwash from helicopters. One of the brands of these types of goggles are Doggles.<br /> 190 | See also<br /> 191 | Wikimedia Commons has media related to: Goggles</p> 192 | <p> Ballistic Eye Wear<br /> 193 | Beer goggles<br /> 194 | Google Goggles<br /> 195 | Night vision device<br /> 196 | Personal protective equipment<br /> 197 | Safety engineering<br /> 198 | Visor</p> 199 | <p>References</p> 200 | <p> ^ Alfred C. Harmsworth (1904). Motors and Motor-driving.<br /> 201 | ^ Landers T. A. (2006) Professional Care of the Racehorse, Revised Edition: A Guide to Grooming, Feeding, and Handling the Equine Athlete. Blood Horse Publications. 308 pages. Page 138.</p> 202 | <p></p> 203 | </div> 204 | </div> 205 | 206 | </body> 207 | </html> 208 | -------------------------------------------------------------------------------- /demo/js/zoomico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inuyaksa/jquery.nicescroll/fa29e019220e10b7c67a10c07018c3377596b02c/demo/js/zoomico.png -------------------------------------------------------------------------------- /demo/rtlmode/horizontal.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title></title> 5 | <meta charset="utf-8"> 6 | <style> 7 | .nice { 8 | width: 200px; 9 | height: 200px; 10 | margin: 50px; 11 | background: salmon; 12 | } 13 | 14 | .nice p { 15 | width: 1000px; 16 | } 17 | 18 | .vertical-rl { 19 | writing-mode: tb-rl; 20 | writing-mode: vertical-rl; 21 | -ms-writing-mode: vertical-rl; 22 | -moz-writing-mode: vertical-rl; 23 | -webkit-writing-mode: vertical-rl; 24 | } 25 | 26 | .vertical-lr { 27 | writing-mode: tb-lr; 28 | writing-mode: vertical-lr; 29 | -ms-writing-mode: vertical-lr; 30 | -moz-writing-mode: vertical-lr; 31 | -webkit-writing-mode: vertical-lr; 32 | } 33 | </style> 34 | <script src="../js/jquery.min.js"></script> 35 | <script src="../../jquery.nicescroll.js"></script> 36 | <script> 37 | $(document).ready(function() { 38 | $(".nice").niceScroll(); 39 | }); 40 | </script> 41 | </head> 42 | <body> 43 | <h3>RTL horizontal</h3> 44 | <div dir="rtl" class="dir-rtl nice"> 45 | <p> 46 | هناك حقيقة مثبتة منذ زمن طويل وهي أن المحتوى المقروء لصفحة ما سيلهي القارئ عن التركيز على الشكل الخارجي للنص أو شكل توضع الفقرات في الصفحة التي يقرأها. ولذلك يتم استخدام طريقة لوريم إيبسوم لأنها تعطي توزيعاَ طبيعياَ -إلى حد ما- للأحرف عوضاً عن استخدام "هنا يوجد محتوى نصي، هنا يوجد محتوى نصي" فتجعلها تبدو (أي الأحرف) وكأنها نص مقروء. العديد من برامح النشر المكتبي وبرامح تحرير صفحات الويب تستخدم لوريم إيبسوم بشكل إفتراضي كنموذج عن النص، وإذا قمت بإدخال "lorem ipsum" في أي محرك بحث ستظهر العديد من المواقع الحديثة العهد في نتائج البحث. على مدى السنين ظهرت نسخ جديدة ومختلفة من نص لوريم إيبسوم، أحياناً عن طريق الصدفة، وأحياناً عن عمد كإدخال بعض العبارات الفكاهية إليها. 47 | </p> 48 | </div> 49 | <h3>RTL vertical</h3> 50 | <div class="vertical-rl nice"> 51 | <p> 52 | 「天は人の上に人を造らず人の下に人を造らず」と言えり。 53 | されば天より人を生ずるには、万人は万人みな同じ位にして、生まれながら貴賤上下の差別なく、 54 | 万物の霊たる身と心との働きをもって天地の間にあるよろずの物を資り、もって衣食住の用を達し、 55 | 自由自在、互いに人の妨げをなさずしておのおの安楽にこの世を渡らしめ給うの趣意なり。 56 | されども今、広くこの人間世界を見渡すに、かしこき人あり、おろかなる人あり、貧しきもあり、 57 | 富めるもあり、貴人もあり、下人もありて、その有様雲と泥との相違あるに似たるはなんぞや。 58 | その次第はなはだ明らかなり。『実語教』に、「人学ばざれば智なし、智なき者は愚人なり」とあり。 59 | されば賢人と愚人との別は学ぶと学ばざるとによりてできるものなり。 60 | また世の中にむずかしき仕事もあり、やすき仕事もあり。 61 | そのむずかしき仕事をする者を身分重き人と名づけ、やすき仕事をする者を身分軽き人という。 62 | すべて心を用い、心配する仕事はむずかしくして、手足を用うる力役はやすし。 63 | ゆえに医者、学者、政府の役人、または大なる商売をする町人、 64 | あまたの奉公人を召し使う大百姓などは、身分重くして貴き者と言うべし。 65 | </p> 66 | </div> 67 | <h3>LTR horizontal</h3> 68 | <div dir="ltr" class="dir-ltr nice"> 69 | <p> 70 | هناك حقيقة مثبتة منذ زمن طويل وهي أن المحتوى المقروء لصفحة ما سيلهي القارئ عن التركيز على الشكل الخارجي للنص أو شكل توضع الفقرات في الصفحة التي يقرأها. ولذلك يتم استخدام طريقة لوريم إيبسوم لأنها تعطي توزيعاَ طبيعياَ -إلى حد ما- للأحرف عوضاً عن استخدام "هنا يوجد محتوى نصي، هنا يوجد محتوى نصي" فتجعلها تبدو (أي الأحرف) وكأنها نص مقروء. العديد من برامح النشر المكتبي وبرامح تحرير صفحات الويب تستخدم لوريم إيبسوم بشكل إفتراضي كنموذج عن النص، وإذا قمت بإدخال "lorem ipsum" في أي محرك بحث ستظهر العديد من المواقع الحديثة العهد في نتائج البحث. على مدى السنين ظهرت نسخ جديدة ومختلفة من نص لوريم إيبسوم، أحياناً عن طريق الصدفة، وأحياناً عن عمد كإدخال بعض العبارات الفكاهية إليها. 71 | </p> 72 | </div> 73 | <h3>LTR vertical</h3> 74 | <div class="vertical-lr nice"> 75 | <p> 76 | 「天は人の上に人を造らず人の下に人を造らず」と言えり。 77 | されば天より人を生ずるには、万人は万人みな同じ位にして、生まれながら貴賤上下の差別なく、 78 | 万物の霊たる身と心との働きをもって天地の間にあるよろずの物を資り、もって衣食住の用を達し、 79 | 自由自在、互いに人の妨げをなさずしておのおの安楽にこの世を渡らしめ給うの趣意なり。 80 | されども今、広くこの人間世界を見渡すに、かしこき人あり、おろかなる人あり、貧しきもあり、 81 | 富めるもあり、貴人もあり、下人もありて、その有様雲と泥との相違あるに似たるはなんぞや。 82 | その次第はなはだ明らかなり。『実語教』に、「人学ばざれば智なし、智なき者は愚人なり」とあり。 83 | されば賢人と愚人との別は学ぶと学ばざるとによりてできるものなり。 84 | また世の中にむずかしき仕事もあり、やすき仕事もあり。 85 | そのむずかしき仕事をする者を身分重き人と名づけ、やすき仕事をする者を身分軽き人という。 86 | すべて心を用い、心配する仕事はむずかしくして、手足を用うる力役はやすし。 87 | ゆえに医者、学者、政府の役人、または大なる商売をする町人、 88 | あまたの奉公人を召し使う大百姓などは、身分重くして貴き者と言うべし。 89 | </p> 90 | </div> 91 | </body> 92 | </html> 93 | -------------------------------------------------------------------------------- /demo/rtlmode/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html xmlns="http://www.w3.org/1999/xhtml"> 3 | <head> 4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 | <title>jQuery NiceScroll Test Page</title> 6 | <style> 7 | *{ 8 | -moz-box-sizing: border-box; 9 | -webkit-box-sizing: border-box; 10 | -ms-box-sizing: border-box; 11 | -o-box-sizing: border-box; 12 | box-sizing: border-box; 13 | } 14 | .main{ 15 | width:960px; 16 | margin:0 auto; 17 | } 18 | .row{ 19 | margin:10px 0; 20 | } 21 | .row:after, 22 | .row:before{ 23 | content:''; 24 | display: table; 25 | } 26 | .row > div{ 27 | float: right; 28 | width:460px; 29 | height: 280px; 30 | margin:0 10px; 31 | border:solid 2px #37418b; 32 | overflow: hidden; 33 | } 34 | 35 | .too-long{ 36 | width:600px; 37 | min-height: 1px; 38 | } 39 | 40 | .row > div .wrap{ 41 | width:600px; 42 | } 43 | 44 | #rtl-native, 45 | #rtl-test, 46 | #rtl-test-nowrap{ 47 | direction: rtl; 48 | } 49 | 50 | #ltr-native, 51 | #ltr-test, 52 | #ltr-test-nowrap{ 53 | direction: ltr; 54 | } 55 | 56 | #ltr-native, 57 | #rtl-native{ 58 | overflow: scroll; 59 | } 60 | 61 | </style> 62 | <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> 63 | <script src="../../jquery.nicescroll.min.js"></script> 64 | 65 | <script> 66 | $(document).ready(function() { 67 | 68 | var nice = $("html").niceScroll(); // The document page (body) 69 | 70 | 71 | // because of some bugs in hw acceleration when using wrapper in rtl mode, disbale hw acceleration 72 | $("#rtl-test").niceScroll('#rtl-test .wrap',{railalign:'left',rtlmode:true,hwacceleration:false}); 73 | 74 | $("#rtl-test-nowrap").niceScroll({railalign:'left',rtlmode:true}); 75 | 76 | $("#ltr-test").niceScroll('#ltr-test .wrap'); 77 | 78 | $("#ltr-test-nowrap").niceScroll(); 79 | 80 | }); 81 | </script> 82 | 83 | <meta name="viewport" content="user-scalable=no" /> 84 | 85 | </head> 86 | 87 | <body style="direction:rtl;"> 88 | <div class="main"> 89 | 90 | <div class="row"> 91 | 92 | <div id="rtl-native"> 93 | <div class="too-long"></div> 94 | <h2>RTL Browser default</h2> 95 | THIS IS A SIMPLE SCROLLABLE DIV 96 | <h2> Package Description </h2> 97 | <p>Release Date: August 10, 2010</p> 98 | <p>The <a title="http://www.openprinting.org/show_driver.cgi?driver=hpijs" rel="nofollow" href="http://www.openprinting.org/show_driver.cgi?driver=hpijs">HPIJS</a> driver is the free, <a title="http://hplipopensource.com/hplip-web/index.html" rel="nofollow" href="http://hplipopensource.com/hplip-web/index.html">open-source driver</a> issued by HP for their DeskJet and LaserJet printers. For most <a title="" href="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/hpijs#Printers">supported printers</a>, this driver produces output quality equivalent to the proprietary HP drivers. In photo mode, with photo paper, the output quality is very high, especially for the HP DeskJet 990C and later models, which auto-detect the paper type in hardware. Photo printing is fully supported in the newer 6- and 7-ink models.</p> 99 | <p>A major advantage of using this driver over those supplied by HP is the direct interface between HPIJS and the native CUPS spooler, which allows printing from any printer over any available connection such as USB, AppleTalk, TCP/IP (via LPD and IPP), HP JetDirect, and shared windows printers via SAMBA. Additionally, this driver utilizes the existing Mac OS X USB "backend" and thus does not install any software that might interfere with standard USB operation.</p> 100 | <p>Please note:</p> 101 | <ul> 102 | <li>HP does not provide any support for HPLIP or HPIJS on the Mac OS X platform.</li> 103 | <li><a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">Several HP USB devices</a> may not print successfully over the standard Mac OS X USB "backend". Please <a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">see this note</a> for more information.</li> 104 | </ul> 105 | <h2>Release Notes</h2> 106 | <ul> 107 | <li>This release fixes a problem with the PPDs that caused many job options such as page orientation, color/grayscale mode, duplex printing, etc. to fail.</li> 108 | <li>HPIJS is HP's universal printer driver for most of their non-PostScript printers. It comes as a part of HPLIP, HP Linux Imaging and Printing.</li> 109 | <li>The PPDs for HP printers are now sourced from the HPLIP package rather than the OpenPrinting.org database.</li> 110 | <li>PPDs for printers from other manufacturers are provided by OpenPrinting.org.</li> 111 | <li>Some printers are only partially supported. Printers such as<br /> 112 | HP LaserJet 1022<br /> 113 | HP LaserJet p1505n<br /> 114 | HP LaserJet p12014<br /> 115 | HP LaserJet p2035<br /> 116 | require a proprietary plug-in for full support. This package does not contain or support such plug-ins.</li> 117 | </ul> 118 | <p><a name="Printer_Set_Up_Instructions" ></a></p> 119 | <h2> Printer Set Up Instructions </h2> 120 | <p>To add a printer queue, Leopard (Mac OS X 10.5.x) users should use the Print & Fax from System Preferences. Click on the + (plus) icon at the lower left. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 121 | <p>Tiger users should open the Printer Setup Utility and click on the Add icon at the top of the Printer List window. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 122 | <p>Jaguar (OS X 10.2.x) and Panther (OS X 10.3.x) users should open Print Center (Jaguar) or Printer Setup Utility (Panther), hold down the Option key, and click the Add Printer button in the Print Center toolbar. Within the setup sheet, choose Advanced from the top popup menu; then in the "Device:" popup menu select your printer by name (it should be the last item in the menu list). Finally, select the correct PPD from the model browser and click Add.</p> 123 | </div> 124 | 125 | <div id="ltr-native"> 126 | <div class="too-long"></div> 127 | <h2>LTR Browser default</h2> 128 | THIS IS A SIMPLE SCROLLABLE DIV 129 | <h2> Package Description </h2> 130 | <p>Release Date: August 10, 2010</p> 131 | <p>The <a title="http://www.openprinting.org/show_driver.cgi?driver=hpijs" rel="nofollow" href="http://www.openprinting.org/show_driver.cgi?driver=hpijs">HPIJS</a> driver is the free, <a title="http://hplipopensource.com/hplip-web/index.html" rel="nofollow" href="http://hplipopensource.com/hplip-web/index.html">open-source driver</a> issued by HP for their DeskJet and LaserJet printers. For most <a title="" href="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/hpijs#Printers">supported printers</a>, this driver produces output quality equivalent to the proprietary HP drivers. In photo mode, with photo paper, the output quality is very high, especially for the HP DeskJet 990C and later models, which auto-detect the paper type in hardware. Photo printing is fully supported in the newer 6- and 7-ink models.</p> 132 | <p>A major advantage of using this driver over those supplied by HP is the direct interface between HPIJS and the native CUPS spooler, which allows printing from any printer over any available connection such as USB, AppleTalk, TCP/IP (via LPD and IPP), HP JetDirect, and shared windows printers via SAMBA. Additionally, this driver utilizes the existing Mac OS X USB "backend" and thus does not install any software that might interfere with standard USB operation.</p> 133 | <p>Please note:</p> 134 | <ul> 135 | <li>HP does not provide any support for HPLIP or HPIJS on the Mac OS X platform.</li> 136 | <li><a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">Several HP USB devices</a> may not print successfully over the standard Mac OS X USB "backend". Please <a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">see this note</a> for more information.</li> 137 | </ul> 138 | <h2>Release Notes</h2> 139 | <ul> 140 | <li>This release fixes a problem with the PPDs that caused many job options such as page orientation, color/grayscale mode, duplex printing, etc. to fail.</li> 141 | <li>HPIJS is HP's universal printer driver for most of their non-PostScript printers. It comes as a part of HPLIP, HP Linux Imaging and Printing.</li> 142 | <li>The PPDs for HP printers are now sourced from the HPLIP package rather than the OpenPrinting.org database.</li> 143 | <li>PPDs for printers from other manufacturers are provided by OpenPrinting.org.</li> 144 | <li>Some printers are only partially supported. Printers such as<br /> 145 | HP LaserJet 1022<br /> 146 | HP LaserJet p1505n<br /> 147 | HP LaserJet p12014<br /> 148 | HP LaserJet p2035<br /> 149 | require a proprietary plug-in for full support. This package does not contain or support such plug-ins.</li> 150 | </ul> 151 | <p><a></a></p> 152 | <h2> Printer Set Up Instructions </h2> 153 | <p>To add a printer queue, Leopard (Mac OS X 10.5.x) users should use the Print & Fax from System Preferences. Click on the + (plus) icon at the lower left. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 154 | <p>Tiger users should open the Printer Setup Utility and click on the Add icon at the top of the Printer List window. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 155 | <p>Jaguar (OS X 10.2.x) and Panther (OS X 10.3.x) users should open Print Center (Jaguar) or Printer Setup Utility (Panther), hold down the Option key, and click the Add Printer button in the Print Center toolbar. Within the setup sheet, choose Advanced from the top popup menu; then in the "Device:" popup menu select your printer by name (it should be the last item in the menu list). Finally, select the correct PPD from the model browser and click Add.</p> 156 | </div> 157 | 158 | </div> 159 | <div class="row"> 160 | 161 | <div id="rtl-test"> 162 | <div class="wrap"> 163 | <h2>RTL with wrap</h2> 164 | THIS IS A SIMPLE SCROLLABLE DIV 165 | <h2> Package Description </h2> 166 | <p>Release Date: August 10, 2010</p> 167 | <p>The <a title="http://www.openprinting.org/show_driver.cgi?driver=hpijs" rel="nofollow" href="http://www.openprinting.org/show_driver.cgi?driver=hpijs">HPIJS</a> driver is the free, <a title="http://hplipopensource.com/hplip-web/index.html" rel="nofollow" href="http://hplipopensource.com/hplip-web/index.html">open-source driver</a> issued by HP for their DeskJet and LaserJet printers. For most <a title="" href="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/hpijs#Printers">supported printers</a>, this driver produces output quality equivalent to the proprietary HP drivers. In photo mode, with photo paper, the output quality is very high, especially for the HP DeskJet 990C and later models, which auto-detect the paper type in hardware. Photo printing is fully supported in the newer 6- and 7-ink models.</p> 168 | <p>A major advantage of using this driver over those supplied by HP is the direct interface between HPIJS and the native CUPS spooler, which allows printing from any printer over any available connection such as USB, AppleTalk, TCP/IP (via LPD and IPP), HP JetDirect, and shared windows printers via SAMBA. Additionally, this driver utilizes the existing Mac OS X USB "backend" and thus does not install any software that might interfere with standard USB operation.</p> 169 | <p>Please note:</p> 170 | <ul> 171 | <li>HP does not provide any support for HPLIP or HPIJS on the Mac OS X platform.</li> 172 | <li><a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">Several HP USB devices</a> may not print successfully over the standard Mac OS X USB "backend". Please <a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">see this note</a> for more information.</li> 173 | </ul> 174 | <h2>Release Notes</h2> 175 | <ul> 176 | <li>This release fixes a problem with the PPDs that caused many job options such as page orientation, color/grayscale mode, duplex printing, etc. to fail.</li> 177 | <li>HPIJS is HP's universal printer driver for most of their non-PostScript printers. It comes as a part of HPLIP, HP Linux Imaging and Printing.</li> 178 | <li>The PPDs for HP printers are now sourced from the HPLIP package rather than the OpenPrinting.org database.</li> 179 | <li>PPDs for printers from other manufacturers are provided by OpenPrinting.org.</li> 180 | <li>Some printers are only partially supported. Printers such as<br /> 181 | HP LaserJet 1022<br /> 182 | HP LaserJet p1505n<br /> 183 | HP LaserJet p12014<br /> 184 | HP LaserJet p2035<br /> 185 | require a proprietary plug-in for full support. This package does not contain or support such plug-ins.</li> 186 | </ul> 187 | <p><a></a></p> 188 | <h2> Printer Set Up Instructions </h2> 189 | <p>To add a printer queue, Leopard (Mac OS X 10.5.x) users should use the Print & Fax from System Preferences. Click on the + (plus) icon at the lower left. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 190 | <p>Tiger users should open the Printer Setup Utility and click on the Add icon at the top of the Printer List window. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 191 | <p>Jaguar (OS X 10.2.x) and Panther (OS X 10.3.x) users should open Print Center (Jaguar) or Printer Setup Utility (Panther), hold down the Option key, and click the Add Printer button in the Print Center toolbar. Within the setup sheet, choose Advanced from the top popup menu; then in the "Device:" popup menu select your printer by name (it should be the last item in the menu list). Finally, select the correct PPD from the model browser and click Add.</p> 192 | </div> 193 | </div> 194 | 195 | <div id="ltr-test"> 196 | <div class="wrap"> 197 | <h2>LTR with wrap</h2> 198 | THIS IS A SIMPLE SCROLLABLE DIV 199 | <h2> Package Description </h2> 200 | <p>Release Date: August 10, 2010</p> 201 | <p>The <a title="http://www.openprinting.org/show_driver.cgi?driver=hpijs" rel="nofollow" href="http://www.openprinting.org/show_driver.cgi?driver=hpijs">HPIJS</a> driver is the free, <a title="http://hplipopensource.com/hplip-web/index.html" rel="nofollow" href="http://hplipopensource.com/hplip-web/index.html">open-source driver</a> issued by HP for their DeskJet and LaserJet printers. For most <a title="" href="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/hpijs#Printers">supported printers</a>, this driver produces output quality equivalent to the proprietary HP drivers. In photo mode, with photo paper, the output quality is very high, especially for the HP DeskJet 990C and later models, which auto-detect the paper type in hardware. Photo printing is fully supported in the newer 6- and 7-ink models.</p> 202 | <p>A major advantage of using this driver over those supplied by HP is the direct interface between HPIJS and the native CUPS spooler, which allows printing from any printer over any available connection such as USB, AppleTalk, TCP/IP (via LPD and IPP), HP JetDirect, and shared windows printers via SAMBA. Additionally, this driver utilizes the existing Mac OS X USB "backend" and thus does not install any software that might interfere with standard USB operation.</p> 203 | <p>Please note:</p> 204 | <ul> 205 | <li>HP does not provide any support for HPLIP or HPIJS on the Mac OS X platform.</li> 206 | <li><a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">Several HP USB devices</a> may not print successfully over the standard Mac OS X USB "backend". Please <a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">see this note</a> for more information.</li> 207 | </ul> 208 | <h2>Release Notes</h2> 209 | <ul> 210 | <li>This release fixes a problem with the PPDs that caused many job options such as page orientation, color/grayscale mode, duplex printing, etc. to fail.</li> 211 | <li>HPIJS is HP's universal printer driver for most of their non-PostScript printers. It comes as a part of HPLIP, HP Linux Imaging and Printing.</li> 212 | <li>The PPDs for HP printers are now sourced from the HPLIP package rather than the OpenPrinting.org database.</li> 213 | <li>PPDs for printers from other manufacturers are provided by OpenPrinting.org.</li> 214 | <li>Some printers are only partially supported. Printers such as<br /> 215 | HP LaserJet 1022<br /> 216 | HP LaserJet p1505n<br /> 217 | HP LaserJet p12014<br /> 218 | HP LaserJet p2035<br /> 219 | require a proprietary plug-in for full support. This package does not contain or support such plug-ins.</li> 220 | </ul> 221 | <p><a ></a></p> 222 | <h2> Printer Set Up Instructions </h2> 223 | <p>To add a printer queue, Leopard (Mac OS X 10.5.x) users should use the Print & Fax from System Preferences. Click on the + (plus) icon at the lower left. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 224 | <p>Tiger users should open the Printer Setup Utility and click on the Add icon at the top of the Printer List window. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 225 | <p>Jaguar (OS X 10.2.x) and Panther (OS X 10.3.x) users should open Print Center (Jaguar) or Printer Setup Utility (Panther), hold down the Option key, and click the Add Printer button in the Print Center toolbar. Within the setup sheet, choose Advanced from the top popup menu; then in the "Device:" popup menu select your printer by name (it should be the last item in the menu list). Finally, select the correct PPD from the model browser and click Add.</p> 226 | </div> 227 | </div> 228 | 229 | </div> 230 | <div class="row"> 231 | 232 | <div id="rtl-test-nowrap"> 233 | <div class="too-long"></div> 234 | <h2>RTL without wrap</h2> 235 | THIS IS A SIMPLE SCROLLABLE DIV 236 | <h2> Package Description </h2> 237 | <p>Release Date: August 10, 2010</p> 238 | <p>The <a title="http://www.openprinting.org/show_driver.cgi?driver=hpijs" rel="nofollow" href="http://www.openprinting.org/show_driver.cgi?driver=hpijs">HPIJS</a> driver is the free, <a title="http://hplipopensource.com/hplip-web/index.html" rel="nofollow" href="http://hplipopensource.com/hplip-web/index.html">open-source driver</a> issued by HP for their DeskJet and LaserJet printers. For most <a title="" href="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/hpijs#Printers">supported printers</a>, this driver produces output quality equivalent to the proprietary HP drivers. In photo mode, with photo paper, the output quality is very high, especially for the HP DeskJet 990C and later models, which auto-detect the paper type in hardware. Photo printing is fully supported in the newer 6- and 7-ink models.</p> 239 | <p>A major advantage of using this driver over those supplied by HP is the direct interface between HPIJS and the native CUPS spooler, which allows printing from any printer over any available connection such as USB, AppleTalk, TCP/IP (via LPD and IPP), HP JetDirect, and shared windows printers via SAMBA. Additionally, this driver utilizes the existing Mac OS X USB "backend" and thus does not install any software that might interfere with standard USB operation.</p> 240 | <p>Please note:</p> 241 | <ul> 242 | <li>HP does not provide any support for HPLIP or HPIJS on the Mac OS X platform.</li> 243 | <li><a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">Several HP USB devices</a> may not print successfully over the standard Mac OS X USB "backend". Please <a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">see this note</a> for more information.</li> 244 | </ul> 245 | <h2>Release Notes</h2> 246 | <ul> 247 | <li>This release fixes a problem with the PPDs that caused many job options such as page orientation, color/grayscale mode, duplex printing, etc. to fail.</li> 248 | <li>HPIJS is HP's universal printer driver for most of their non-PostScript printers. It comes as a part of HPLIP, HP Linux Imaging and Printing.</li> 249 | <li>The PPDs for HP printers are now sourced from the HPLIP package rather than the OpenPrinting.org database.</li> 250 | <li>PPDs for printers from other manufacturers are provided by OpenPrinting.org.</li> 251 | <li>Some printers are only partially supported. Printers such as<br /> 252 | HP LaserJet 1022<br /> 253 | HP LaserJet p1505n<br /> 254 | HP LaserJet p12014<br /> 255 | HP LaserJet p2035<br /> 256 | require a proprietary plug-in for full support. This package does not contain or support such plug-ins.</li> 257 | </ul> 258 | <p><a ></a></p> 259 | <h2> Printer Set Up Instructions </h2> 260 | <p>To add a printer queue, Leopard (Mac OS X 10.5.x) users should use the Print & Fax from System Preferences. Click on the + (plus) icon at the lower left. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 261 | <p>Tiger users should open the Printer Setup Utility and click on the Add icon at the top of the Printer List window. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 262 | <p>Jaguar (OS X 10.2.x) and Panther (OS X 10.3.x) users should open Print Center (Jaguar) or Printer Setup Utility (Panther), hold down the Option key, and click the Add Printer button in the Print Center toolbar. Within the setup sheet, choose Advanced from the top popup menu; then in the "Device:" popup menu select your printer by name (it should be the last item in the menu list). Finally, select the correct PPD from the model browser and click Add.</p> 263 | </div> 264 | 265 | <div id="ltr-test-nowrap" > 266 | <div class="too-long"></div> 267 | <h2>LTR without wrap</h2> 268 | THIS IS A SIMPLE SCROLLABLE DIV 269 | <h2> Package Description </h2> 270 | <p>Release Date: August 10, 2010</p> 271 | <p>The <a title="http://www.openprinting.org/show_driver.cgi?driver=hpijs" rel="nofollow" href="http://www.openprinting.org/show_driver.cgi?driver=hpijs">HPIJS</a> driver is the free, <a title="http://hplipopensource.com/hplip-web/index.html" rel="nofollow" href="http://hplipopensource.com/hplip-web/index.html">open-source driver</a> issued by HP for their DeskJet and LaserJet printers. For most <a title="" href="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/hpijs#Printers">supported printers</a>, this driver produces output quality equivalent to the proprietary HP drivers. In photo mode, with photo paper, the output quality is very high, especially for the HP DeskJet 990C and later models, which auto-detect the paper type in hardware. Photo printing is fully supported in the newer 6- and 7-ink models.</p> 272 | <p>A major advantage of using this driver over those supplied by HP is the direct interface between HPIJS and the native CUPS spooler, which allows printing from any printer over any available connection such as USB, AppleTalk, TCP/IP (via LPD and IPP), HP JetDirect, and shared windows printers via SAMBA. Additionally, this driver utilizes the existing Mac OS X USB "backend" and thus does not install any software that might interfere with standard USB operation.</p> 273 | <p>Please note:</p> 274 | <ul> 275 | <li>HP does not provide any support for HPLIP or HPIJS on the Mac OS X platform.</li> 276 | <li><a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">Several HP USB devices</a> may not print successfully over the standard Mac OS X USB "backend". Please <a href="http://www.linuxfoundation.org/en/OpenPrinting/MacOSX/hpijs-USB">see this note</a> for more information.</li> 277 | </ul> 278 | <h2>Release Notes</h2> 279 | <ul> 280 | <li>This release fixes a problem with the PPDs that caused many job options such as page orientation, color/grayscale mode, duplex printing, etc. to fail.</li> 281 | <li>HPIJS is HP's universal printer driver for most of their non-PostScript printers. It comes as a part of HPLIP, HP Linux Imaging and Printing.</li> 282 | <li>The PPDs for HP printers are now sourced from the HPLIP package rather than the OpenPrinting.org database.</li> 283 | <li>PPDs for printers from other manufacturers are provided by OpenPrinting.org.</li> 284 | <li>Some printers are only partially supported. Printers such as<br /> 285 | HP LaserJet 1022<br /> 286 | HP LaserJet p1505n<br /> 287 | HP LaserJet p12014<br /> 288 | HP LaserJet p2035<br /> 289 | require a proprietary plug-in for full support. This package does not contain or support such plug-ins.</li> 290 | </ul> 291 | <p><a></a></p> 292 | <h2> Printer Set Up Instructions </h2> 293 | <p>To add a printer queue, Leopard (Mac OS X 10.5.x) users should use the Print & Fax from System Preferences. Click on the + (plus) icon at the lower left. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 294 | <p>Tiger users should open the Printer Setup Utility and click on the Add icon at the top of the Printer List window. A new window will open. In that window, click the Default Browser icon at the top left. Highlight your printer in the section below. Use the "Print Using" pop-up menu near the bottom of the window to select the correct PPD for your printer and click Add.</p> 295 | <p>Jaguar (OS X 10.2.x) and Panther (OS X 10.3.x) users should open Print Center (Jaguar) or Printer Setup Utility (Panther), hold down the Option key, and click the Add Printer button in the Print Center toolbar. Within the setup sheet, choose Advanced from the top popup menu; then in the "Device:" popup menu select your printer by name (it should be the last item in the menu list). Finally, select the correct PPD from the model browser and click Add.</p> 296 | </div> 297 | 298 | </div> 299 | 300 | </div> 301 | </body> 302 | </html> 303 | -------------------------------------------------------------------------------- /dist/jquery.nicescroll.iframehelper.js: -------------------------------------------------------------------------------- 1 | /* iframe script helper for jquery.nicescroll 2 | -- version 0.9.0 3 | -- copyright 2017-06-18 InuYaksa*2017 4 | -- licensed under the MIT 5 | -- 6 | -- https://nicescroll.areaaperta.com/ 7 | -- https://github.com/inuyaksa/jquery.nicescroll 8 | -- 9 | */ 10 | 11 | (function (document,window) { 12 | 13 | var body = document.body; 14 | var parent = window.parent; 15 | 16 | if (parent && ("createEvent" in document)) { 17 | 18 | var isoldie = ("documentMode" in document); // 11- 19 | var ismsedge = ("msCredentials" in window); // MS Edge 14+ 20 | 21 | function onwheel(e) { 22 | 23 | var evt = document.createEvent("MouseEvents"); 24 | evt.initEvent('wheel', true, true); 25 | evt.deltaMode = e.deltaMode; 26 | evt.deltaX = e.deltaX; 27 | evt.deltaY = e.deltaY; 28 | evt.deltaZ = e.deltaZ; 29 | evt.wheelDelta = e.wheelDelta; 30 | evt.wheelDeltaX = e.wheelDeltaX; 31 | evt.wheelDeltaY = e.wheelDeltaY; 32 | 33 | parent.dispatchEvent(evt); 34 | } 35 | 36 | body.addEventListener("wheel", onwheel); 37 | 38 | } 39 | 40 | if (window.addEventListener) { 41 | 42 | // https://davidwalsh.name/add-rules-stylesheets 43 | var sheet = (function () { 44 | var style = document.createElement("style"); 45 | style.appendChild(document.createTextNode("")); 46 | document.head.appendChild(style); 47 | return style.sheet; 48 | })(); 49 | 50 | var tmrscroll = false; 51 | var lastiframe = null; 52 | var lastiframeviewport = null; 53 | var lastscroll = []; 54 | 55 | window.addEventListener("scroll", function (e) { 56 | if (lastiframeviewport) { 57 | // var df = [ window.scrollX - lastscroll[0], window.scrollY - lastscroll[1] ]; 58 | window.scrollTo(lastscroll[0], lastscroll[1]); 59 | // lastiframeviewport.scrollBy(df[0],df[1]); 60 | // console.log(df); 61 | } 62 | }); 63 | 64 | function findNiceParent(t) { 65 | do { 66 | if ($.data(t, '__nicescroll') !== undefined) return t; 67 | t = t.parentNode || false; 68 | } while (t); 69 | return false; 70 | } 71 | 72 | window.addEventListener("load", function () { 73 | 74 | var hasstyle = false; 75 | 76 | $.nicescroll.each(function () { 77 | var nice = this; 78 | nice.scrollstart(function () { 79 | if (!hasstyle) sheet.insertRule("iframe { pointer-events: none !important; }", 0); 80 | hasstyle = true; 81 | }); 82 | nice.scrollend(function () { 83 | if (hasstyle) sheet.deleteRule(0); 84 | hasstyle = false; 85 | }); 86 | }); 87 | 88 | $("iframe").each(function () { 89 | this.addEventListener("mouseenter", function (e) { 90 | lastiframe = e.target; 91 | var chk = findNiceParent(lastiframe); 92 | lastiframeviewport = chk; 93 | //if (chk) lastiframeviewport = $(chk).getNiceScroll(); 94 | lastscroll = [window.scrollX, window.scrollY]; 95 | }); 96 | this.addEventListener("mouseleave", function (e) { 97 | lastiframe = lastiframeviewport = null; 98 | }); 99 | }); 100 | 101 | }); 102 | 103 | } 104 | 105 | })(document,window); -------------------------------------------------------------------------------- /dist/jquery.nicescroll.iframehelper.min.js: -------------------------------------------------------------------------------- 1 | /* iframe helper for jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */ 2 | !function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,r.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,r=t.parent;if(r&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var i=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,o=null,c=[];t.addEventListener("scroll",function(e){o&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){e||i.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){e&&i.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);o=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=o=null})})})}}(document,window); -------------------------------------------------------------------------------- /dist/jquery.nicescroll.min.js: -------------------------------------------------------------------------------- 1 | !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var E=!1,M=!1,L=0,C=2e3,N=0,P=e,R=document,_=window,I=P(_),O=[];var Y=_.requestAnimationFrame||_.webkitRequestAnimationFrame||_.mozRequestAnimationFrame||!1,H=_.cancelAnimationFrame||_.webkitCancelAnimationFrame||_.mozCancelAnimationFrame||!1;if(Y)_.cancelAnimationFrame||(H=function(e){});else{var s=0;Y=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-s)),i=_.setTimeout(function(){e(t+r)},r);return s=t+r,i},H=function(e){_.clearTimeout(e)}}function l(e,o){var b=this;this.version="3.7.6",this.name="nicescroll",this.me=o;var y=P("body"),x=this.opt={doc:y,win:!1};if(P.extend(x,D),x.snapbackspeed=80,e)for(var t in x)void 0!==e[t]&&(x[t]=e[t]);if(x.disablemutationobserver&&(B=!1),this.doc=x.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test(x.win?x.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==x.win,this.win=x.win||(this.ispage?I:this.doc),this.docscroll=this.ispage&&!this.haswrapper?I:this.win,this.body=y,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=x.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==x.rtlmode){var r=this.win[0]==_?this.body:this.win,i=r.css("writing-mode")||r.css("-webkit-writing-mode")||r.css("-ms-writing-mode")||r.css("-moz-writing-mode");"horizontal-tb"==i||"lr-tb"==i||""===i?(this.isrtlmode="rtl"==r.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==i||"tb"==i||"tb-rl"==i||"rl-tb"==i,this.isvertical="vertical-rl"==i||"tb"==i||"tb-rl"==i)}else this.isrtlmode=!0===x.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,(this.observerbody=!1)!==x.scrollbarid)this.id=x.scrollbarid;else for(;this.id="ascrail"+C++,R.getElementById(this.id););this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=x.overflowx,this.overflowy=x.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=function(){if(A)return A;var e=R.createElement("DIV"),s=e.style,o=navigator.userAgent,t=navigator.platform,n={};return n.haspointerlock="pointerLockElement"in R||"webkitPointerLockElement"in R||"mozPointerLockElement"in R,n.isopera="opera"in _,n.isopera12=n.isopera&&"getUserMedia"in navigator,n.isoperamini="[object OperaMini]"===Object.prototype.toString.call(_.operamini),n.isie="all"in R&&"attachEvent"in e&&!n.isopera,n.isieold=n.isie&&!("msInterpolationMode"in s),n.isie7=n.isie&&!n.isieold&&(!("documentMode"in R)||7===R.documentMode),n.isie8=n.isie&&"documentMode"in R&&8===R.documentMode,n.isie9=n.isie&&"performance"in _&&9===R.documentMode,n.isie10=n.isie&&"performance"in _&&10===R.documentMode,n.isie11="msRequestFullscreen"in e&&11<=R.documentMode,n.ismsedge="msCredentials"in _,n.ismozilla="MozAppearance"in s,n.iswebkit=!n.ismsedge&&"WebkitAppearance"in s,n.ischrome=n.iswebkit&&"chrome"in _,n.ischrome38=n.ischrome&&"touchAction"in s,n.ischrome22=!n.ischrome38&&n.ischrome&&n.haspointerlock,n.ischrome26=!n.ischrome38&&n.ischrome&&"transition"in s,n.cantouch="ontouchstart"in R.documentElement||"ontouchstart"in _,n.hasw3ctouch=!!_.PointerEvent&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints),n.hasmstouch=!n.hasw3ctouch&&(_.MSPointerEvent||!1),n.ismac=/^mac$/i.test(t),n.isios=n.cantouch&&/iphone|ipad|ipod/i.test(t),n.isios4=n.isios&&!("seal"in Object),n.isios7=n.isios&&"webkitHidden"in R,n.isios8=n.isios&&"hidden"in R,n.isios10=n.isios&&_.Proxy,n.isandroid=/android/i.test(o),n.haseventlistener="addEventListener"in e,n.trstyle=!1,n.hastransform=!1,n.hastranslate3d=!1,n.transitionstyle=!1,n.hastransition=!1,n.transitionend=!1,n.trstyle="transform",n.hastransform="transform"in s||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],o=0,t=e.length;o<t;o++)if(void 0!==s[e[o]]){n.trstyle=e[o];break}n.hastransform=!!n.trstyle}(),n.hastransform&&(s[n.trstyle]="translate3d(1px,2px,3px)",n.hastranslate3d=/translate3d/.test(s[n.trstyle])),n.transitionstyle="transition",n.prefixstyle="",n.transitionend="transitionend",n.hastransition="transition"in s||function(){n.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],o=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],t=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],r=0,i=e.length;r<i;r++)if(e[r]in s){n.transitionstyle=e[r],n.prefixstyle=o[r],n.transitionend=t[r];break}n.ischrome26&&(n.prefixstyle=o[1]),n.hastransition=n.transitionstyle}(),n.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(n.ischrome&&!n.ischrome38||n.isie)&&(e=[]);for(var o=0,t=e.length;o<t;o++){var r=e[o];if(s.cursor=r,s.cursor==r)return r}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),n.hasmousecapture="setCapture"in e,n.hasMutationObserver=!1!==B,e=null,A=n}();var S=P.extend({},this.detected);function d(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=X(),this.df=o-e}function s(){var e=b.doc.css(S.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}if(this.canhwscroll=S.hastransform&&x.hwacceleration,this.ishwscroll=this.canhwscroll&&b.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(S.iswebkit||S.isie||S.isie11):this.hasreversehr=!(S.iswebkit||S.isie&&!S.isie10&&!S.isie11):this.hasreversehr=!1,this.istouchcapable=!1,(S.cantouch||!S.hasw3ctouch&&!S.hasmstouch)&&(!S.cantouch||S.isios||S.isandroid||!S.iswebkit&&!S.ismozilla)||(this.istouchcapable=!0),x.enablemouselockapi||(S.hasmousecapture=!1,S.haspointerlock=!1),this.debounced=function(e,o,t){b&&(b.delaylist[e]||!1||(b.delaylist[e]={h:Y(function(){b.delaylist[e].fn.call(b),b.delaylist[e]=!1},t)},o.call(b)),b.delaylist[e].fn=o)},this.synched=function(e,o){b.synclist[e]?b.synclist[e]=o:(b.synclist[e]=o,Y(function(){b&&(b.synclist[e]&&b.synclist[e].call(b),b.synclist[e]=null)}))},this.unsynched=function(e){b.synclist[e]&&(b.synclist[e]=!1)},this.css=function(e,o){for(var t in o)b.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?b.getScrollTop():b.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?b.getScrollLeft():b.setScrollLeft(e)},d.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(X()-this.ts)/this.spd},getNow:function(){var e=(X()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return 1<=e?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=X(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},S.hastranslate3d&&S.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=s();if(o)return 16==o.length?-o[13]:-o[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=s();if(o)return 16==o.length?-o[12]:-o[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x},this.notifyScrollEvent=function(e){var o=R.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,_,1),o.niceevent=!0,e.dispatchEvent(o)};var n=this.isrtlmode?1:-1;S.hastranslate3d&&x.enabletranslate3d?(this.setScrollTop=function(e,o){b.doc.translate.y=e,b.doc.translate.ty=-1*e+"px",b.doc.css(S.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)"),o||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(e,o){b.doc.translate.x=e,b.doc.translate.tx=e*n+"px",b.doc.css(S.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)"),o||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(e,o){b.doc.translate.y=e,b.doc.translate.ty=-1*e+"px",b.doc.css(S.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")"),o||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(e,o){b.doc.translate.x=e,b.doc.translate.tx=e*n+"px",b.doc.css(S.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")"),o||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},this.setScrollTop=function(e){b.docscroll.scrollTop(e)},this.getScrollLeft=function(){return b.hasreversehr?b.detected.ismozilla?b.page.maxw-Math.abs(b.docscroll.scrollLeft()):b.page.maxw-b.docscroll.scrollLeft():b.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(b)return b.hasreversehr&&(e=b.detected.ismozilla?-(b.page.maxw-e):b.page.maxw-e),b.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var l={thin:1,medium:3,thick:5};function a(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=l[r]||0)?t?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1;return b.isie8&&i&&(i+=1),s?i:0}return i}this.getDocumentScrollOffset=function(){return{top:_.pageYOffset||R.documentElement.scrollTop,left:_.pageXOffset||R.documentElement.scrollLeft}},this.getOffset=function(){if(b.isfixed){var e=b.win.offset(),o=b.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=b.win.offset();if(!b.viewport)return t;var r=b.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()-(x.railpadding.top+x.railpadding.bottom)}),b.railh&&b.railh.css({width:b.win.innerWidth()-(x.railpadding.left+x.railpadding.right)});else{var r=b.getOffset();if((o={top:r.top,left:r.left-(x.railpadding.left+x.railpadding.right)}).top+=a(b.win,"border-top-width",!0),o.left+=b.rail.align?b.win.outerWidth()-a(b.win,"border-right-width")-b.rail.width:a(b.win,"border-left-width"),(t=x.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),b.railslocked||b.rail.css({top:o.top,left:o.left,height:(e?e.h:b.win.innerHeight())-(x.railpadding.top+x.railpadding.bottom)}),b.zoom&&b.zoom.css({top:o.top+1,left:1==b.rail.align?o.left-20:o.left+b.rail.width+4}),b.railh&&!b.railslocked){o={top:r.top,left:r.left},(t=x.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=b.railh.align?o.top+a(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:o.top+a(b.win,"border-top-width",!0),s=o.left+a(b.win,"border-left-width");b.railh.css({top:i-(x.railpadding.top+x.railpadding.bottom),left:s,width:b.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;b.railslocked||(b.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+R.documentElement.scrollLeft,e.pageY=e.clientY+R.documentElement.scrollTop),o?(r=t?b.doScrollLeft:b.doScrollTop,s=t?(e.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(e.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y,b.unsynched("relativexy"),r(0|s)):(r=t?b.doScrollLeftBy:b.doScrollBy,s=t?b.scroll.x:b.scroll.y,n=t?e.pageX-b.railh.offset().left:e.pageY-b.rail.offset().top,i=t?b.view.w:b.view.h,r(n<=s?i:-i)))},b.newscrolly=b.newscrollx=0,b.hasanimationframe="requestAnimationFrame"in _,b.hascancelanimationframe="cancelAnimationFrame"in _,b.hasborderbox=!1,this.init=function(){if(b.saved.css=[],S.isoperamini)return!0;if(S.isandroid&&!("hidden"in R))return!0;x.emulatetouch=x.emulatetouch||x.touchbehavior,b.hasborderbox=_.getComputedStyle&&"border-box"===_.getComputedStyle(R.body)["box-sizing"];var t={"overflow-y":"hidden"};if((S.isie11||S.isie10)&&(t["-ms-overflow-style"]="none"),b.ishwscroll&&(this.doc.css(S.transitionstyle,S.prefixstyle+"transform 0ms ease-out"),S.transitionend&&b.bind(b.doc,S.transitionend,b.onScrollTransitionEnd,!1)),b.zindex="auto",b.ispage||"auto"!=x.zindex?b.zindex=x.zindex:b.zindex=function(){var e=b.win;if("zIndex"in e)return e.zIndex();for(;0<e.length;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}()||"auto",!b.ispage&&"auto"!=b.zindex&&b.zindex>N&&(N=b.zindex),b.isie&&0===b.zindex&&"auto"==x.zindex&&(b.zindex="auto"),!b.ispage||!S.isieold){var e=b.docscroll;b.ispage&&(e=b.haswrapper?b.win:b.doc),b.css(e,t),b.ispage&&(S.isie11||S.isie)&&b.css(P("html"),t),!S.isios||b.ispage||b.haswrapper||b.css(y,{"-webkit-overflow-scrolling":"touch"});var o=P(R.createElement("div"));o.css({position:"relative",top:0,float:"right",width:x.cursorwidth,height:0,"background-color":x.cursorcolor,border:x.cursorborder,"background-clip":"padding-box","-webkit-border-radius":x.cursorborderradius,"-moz-border-radius":x.cursorborderradius,"border-radius":x.cursorborderradius}),o.addClass("nicescroll-cursors"),b.cursor=o;var r=P(R.createElement("div"));r.attr("id",b.id),r.addClass("nicescroll-rails nicescroll-rails-vr");var i,s,n=["left","right","top","bottom"];for(var l in n)s=n[l],(i=x.railpadding[s]||0)&&r.css("padding-"+s,i+"px");r.append(o),r.width=Math.max(parseFloat(x.cursorwidth),o.outerWidth()),r.css({width:r.width+"px",zIndex:b.zindex,background:x.background,cursor:"default"}),r.visibility=!0,r.scrollable=!0,r.align="left"==x.railalign?0:1,b.rail=r;var a,c=b.rail.drag=!1;if(!x.boxzoom||b.ispage||S.isieold||(c=R.createElement("div"),b.bind(c,"click",b.doZoom),b.bind(c,"mouseenter",function(){b.zoom.css("opacity",x.cursoropacitymax)}),b.bind(c,"mouseleave",function(){b.zoom.css("opacity",x.cursoropacitymin)}),b.zoom=P(c),b.zoom.css({cursor:"pointer",zIndex:b.zindex,backgroundImage:"url("+x.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),x.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),S.cantouch&&x.gesturezoom&&(b.ongesturezoom=function(e){return 1.5<e.scale&&b.doZoomIn(e),e.scale<.8&&b.doZoomOut(e),b.cancelEvent(e)},b.bind(b.win,"gestureend",b.ongesturezoom))),b.railh=!1,x.horizrailenabled&&(b.css(e,{overflowX:"hidden"}),(o=P(R.createElement("div"))).css({position:"absolute",top:0,height:x.cursorwidth,width:0,backgroundColor:x.cursorcolor,border:x.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":x.cursorborderradius,"-moz-border-radius":x.cursorborderradius,"border-radius":x.cursorborderradius}),S.isieold&&o.css("overflow","hidden"),o.addClass("nicescroll-cursors"),b.cursorh=o,(a=P(R.createElement("div"))).attr("id",b.id+"-hr"),a.addClass("nicescroll-rails nicescroll-rails-hr"),a.height=Math.max(parseFloat(x.cursorwidth),o.outerHeight()),a.css({height:a.height+"px",zIndex:b.zindex,background:x.background}),a.append(o),a.visibility=!0,a.scrollable=!0,a.align="top"==x.railvalign?0:1,b.railh=a,b.railh.drag=!1),b.ispage)r.css({position:"fixed",top:0,height:"100%"}),r.css(r.align?{right:0}:{left:0}),b.body.append(r),b.railh&&(a.css({position:"fixed",left:0,width:"100%"}),a.css(a.align?{bottom:0}:{top:0}),b.body.append(a));else{if(b.ishwscroll){"static"==b.win.css("position")&&b.css(b.win,{position:"relative"});var d="HTML"==b.win[0].nodeName?b.body:b.win;P(d).scrollTop(0).scrollLeft(0),b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":r.width+4}),d.append(b.zoom)),r.css({position:"absolute",top:0}),r.css(r.align?{right:0}:{left:0}),d.append(r),a&&(a.css({position:"absolute",left:0,bottom:0}),a.css(a.align?{bottom:0}:{top:0}),d.append(a))}else{b.isfixed="fixed"==b.win.css("position");var u=b.isfixed?"fixed":"absolute";b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,/fixed|absolute/.test(b.viewport.css("position"))||b.css(b.viewport,{position:"relative"})),r.css({position:u}),b.zoom&&b.zoom.css({position:u}),b.updateScrollBar(),b.body.append(r),b.zoom&&b.body.append(b.zoom),b.railh&&(a.css({position:u}),b.body.append(a))}S.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),x.disableoutline&&(S.isie&&b.win.attr("hideFocus","true"),S.iswebkit&&b.win.css("outline","none"))}if(!1===x.autohidemode?(b.autohidedom=!1,b.rail.css({opacity:x.cursoropacitymax}),b.railh&&b.railh.css({opacity:x.cursoropacitymax})):!0===x.autohidemode||"leave"===x.autohidemode?(b.autohidedom=P().add(b.rail),S.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&S.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==x.autohidemode?(b.autohidedom=P().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==x.autohidemode?(b.autohidedom=P().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==x.autohidemode&&(b.autohidedom=!1,b.hide(),b.railslocked=!1),S.cantouch||b.istouchcapable||x.emulatetouch||S.hasmstouch){b.scrollmom=new q(b);b.ontouchstart=function(e){if(b.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(b.hasmoving=!1,b.scrollmom.timer&&(b.triggerScrollEnd(),b.scrollmom.stop()),!b.railslocked){var o=b.getTarget(e);if(o)if(/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return b.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),b.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(b.rail.drag={x:e.clientX,y:e.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1,tg:o},b.ispage||!x.directionlockdeadzone)b.rail.drag.dl="f";else{var i=I.width(),s=I.height(),n=b.getContentSize(),l=n.h-s,a=n.w-i;b.rail.scrollable&&!b.railh.scrollable?b.rail.drag.ck=0<l&&"v":!b.rail.scrollable&&b.railh.scrollable?b.rail.drag.ck=0<a&&"h":b.rail.drag.ck=!1}if(x.emulatetouch&&b.isiframe&&S.isie){var c=b.win.position();b.rail.drag.x+=c.left,b.rail.drag.y+=c.top}if(b.hasmoving=!1,b.lastmouseup=!1,b.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return S.hasmousecapture&&o.setCapture(),x.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(b.hasmoving)return!1;o._onclick.call(this,e)}),b.cancelEvent(e)):b.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(P(o).attr("type"))&&(b.preventclick={tg:o,click:!1})}}},b.ontouchend=function(e){if(!b.rail.drag)return!0;if(2==b.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;b.rail.drag=!1;var o="mouseup"===e.type;if(b.hasmoving&&(b.scrollmom.doMomentum(),b.lastmouseup=!0,b.hideCursor(),S.hasmousecapture&&R.releaseCapture(),o))return b.cancelEvent(e)}else if(1==b.rail.drag.pt)return b.onmouseup(e)};var m=x.emulatetouch&&b.isiframe&&!S.hasmousecapture,f=.3*x.directionlockdeadzone|0;b.ontouchmove=function(e,o){if(!b.rail.drag)return!0;if(e.targetTouches&&x.preventmultitouchscrolling&&1<e.targetTouches.length)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2!=b.rail.drag.pt)return 1==b.rail.drag.pt?b.onmousemove(e):void 0;var t,r;if("changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),r=t=0,m&&!o){var i=b.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-b.rail.drag.y,l=e.clientX+r,a=l-b.rail.drag.x,c=b.rail.drag.st-n;if(b.ishwscroll&&x.bouncescroll)c<0?c=Math.round(c/2):c>b.page.maxh&&(c=b.page.maxh+Math.round((c-b.page.maxh)/2));else if(c<0?s=c=0:c>b.page.maxh&&(c=b.page.maxh,s=0),0===s&&!b.hasmoving)return b.ispage||(b.rail.drag=!1),!0;var d=b.getScrollLeft();if(b.railh&&b.railh.scrollable&&(d=b.isrtlmode?a-b.rail.drag.sl:b.rail.drag.sl-a,b.ishwscroll&&x.bouncescroll?d<0?d=Math.round(d/2):d>b.page.maxw&&(d=b.page.maxw+Math.round((d-b.page.maxw)/2)):(d<0&&(l=d=0),d>b.page.maxw&&(d=b.page.maxw,l=0))),!b.hasmoving){if(b.rail.drag.y===e.clientY&&b.rail.drag.x===e.clientX)return b.cancelEvent(e);var u=Math.abs(n),h=Math.abs(a),p=x.directionlockdeadzone;if(b.rail.drag.ck?"v"==b.rail.drag.ck?p<h&&u<=f?b.rail.drag=!1:p<u&&(b.rail.drag.dl="v"):"h"==b.rail.drag.ck&&(p<u&&h<=f?b.rail.drag=!1:p<h&&(b.rail.drag.dl="h")):p<u&&p<h?b.rail.drag.dl="f":p<u?b.rail.drag.dl=f<h?"f":"v":p<h&&(b.rail.drag.dl=f<u?"f":"h"),!b.rail.drag.dl)return b.cancelEvent(e);b.triggerScrollStart(e.clientX,e.clientY,0,0,0),b.hasmoving=!0}return b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||!1,b.preventclick.tg.onclick=b.onpreventclick),b.rail.drag.dl&&("v"==b.rail.drag.dl?d=b.rail.drag.sl:"h"==b.rail.drag.dl&&(c=b.rail.drag.st)),b.synched("touchmove",function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.resetTransition(),b.rail.scrollable&&b.setScrollTop(c),b.scrollmom.update(l,s),b.railh&&b.railh.scrollable?(b.setScrollLeft(d),b.showCursor(c,d)):b.showCursor(c),S.isie10&&R.selection.clear())}),b.cancelEvent(e)},b.ontouchstartCursor=function(e,o){if(!b.rail.drag||3==b.rail.drag.pt){if(b.locked)return b.cancelEvent(e);b.cancelScroll(),b.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:b.scroll.x,sy:b.scroll.y,pt:3,hr:!!o};var t=b.getTarget(e);return!b.ispage&&S.hasmousecapture&&t.setCapture(),b.isiframe&&!S.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"})),b.cancelEvent(e)}},b.ontouchendCursor=function(e){if(b.rail.drag){if(S.hasmousecapture&&R.releaseCapture(),b.isiframe&&!S.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),3!=b.rail.drag.pt)return;return b.rail.drag=!1,b.cancelEvent(e)}},b.ontouchmoveCursor=function(e){if(b.rail.drag){if(3!=b.rail.drag.pt)return;if(b.cursorfreezed=!0,b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(e.touches[0].clientX-b.rail.drag.x),b.scroll.x<0&&(b.scroll.x=0);var o=b.scrollvaluemaxw;b.scroll.x>o&&(b.scroll.x=o)}else{b.scroll.y=b.rail.drag.sy+(e.touches[0].clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0);var t=b.scrollvaluemax;b.scroll.y>t&&(b.scroll.y=t)}return b.synched("touchmove",function(){b.rail.drag&&3==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*b.scrollratio.x),x.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),x.cursordragspeed))}),b.cancelEvent(e)}}}if(b.onmousedown=function(e,o){if(!b.rail.drag||1==b.rail.drag.pt){if(b.railslocked)return b.cancelEvent(e);b.cancelScroll(),b.rail.drag={x:e.clientX,y:e.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:o||!1};var t=b.getTarget(e);return S.hasmousecapture&&t.setCapture(),b.isiframe&&!S.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"})),b.hasmoving=!1,b.cancelEvent(e)}},b.onmouseup=function(e){if(b.rail.drag)return 1!=b.rail.drag.pt||(S.hasmousecapture&&R.releaseCapture(),b.isiframe&&!S.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),b.rail.drag=!1,b.cursorfreezed=!1,b.hasmoving&&b.triggerScrollEnd(),b.cancelEvent(e))},b.onmousemove=function(e){if(b.rail.drag){if(1!==b.rail.drag.pt)return;if(S.ischrome&&0===e.which)return b.onmouseup(e);if(b.cursorfreezed=!0,b.hasmoving||b.triggerScrollStart(e.clientX,e.clientY,0,0,0),b.hasmoving=!0,b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(e.clientX-b.rail.drag.x),b.scroll.x<0&&(b.scroll.x=0);var o=b.scrollvaluemaxw;b.scroll.x>o&&(b.scroll.x=o)}else{b.scroll.y=b.rail.drag.sy+(e.clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0);var t=b.scrollvaluemax;b.scroll.y>t&&(b.scroll.y=t)}return b.synched("mousemove",function(){b.cursorfreezed&&(b.showCursor(),b.rail.drag.hr?b.scrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.scrollTop(Math.round(b.scroll.y*b.scrollratio.y)))}),b.cancelEvent(e)}b.checkarea=0},S.cantouch||x.emulatetouch)b.onpreventclick=function(e){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(e)},b.onclick=!S.isios&&function(e){return!b.lastmouseup||(b.lastmouseup=!1,b.cancelEvent(e))},x.grabcursorenabled&&S.cursorgrabvalue&&(b.css(b.ispage?b.doc:b.win,{cursor:S.cursorgrabvalue}),b.css(b.rail,{cursor:S.cursorgrabvalue}));else{var h=function(e){if(b.selectiondrag){if(e){var o=b.win.outerHeight(),t=e.pageY-b.selectiondrag.top;0<t&&t<o&&(t=0),o<=t&&(t-=o),b.selectiondrag.df=t}if(0!==b.selectiondrag.df){var r=-2*b.selectiondrag.df/6|0;b.doScrollBy(r),b.debounced("doselectionscroll",function(){h()},50)}}};b.hasTextSelected="getSelection"in R?function(){return 0<R.getSelection().rangeCount}:"selection"in R?function(){return"None"!=R.selection.type}:function(){return!1},b.onselectionstart=function(e){b.ispage||(b.selectiondrag=b.win.offset())},b.onselectionend=function(e){b.selectiondrag=!1},b.onselectiondrag=function(e){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",function(){h(e)},250)}}if(S.hasw3ctouch?(b.css(b.ispage?P("html"):b.win,{"touch-action":"none"}),b.css(b.rail,{"touch-action":"none"}),b.css(b.cursor,{"touch-action":"none"}),b.bind(b.win,"pointerdown",b.ontouchstart),b.bind(R,"pointerup",b.ontouchend),b.delegate(R,"pointermove",b.ontouchmove)):S.hasmstouch?(b.css(b.ispage?P("html"):b.win,{"-ms-touch-action":"none"}),b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,{"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(R,"MSPointerUp",b.ontouchend),b.delegate(R,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(e){e.preventDefault()}),b.bind(b.cursor,"contextmenu",function(e){e.preventDefault()})):S.cantouch&&(b.bind(b.win,"touchstart",b.ontouchstart,!1,!0),b.bind(R,"touchend",b.ontouchend,!1,!0),b.bind(R,"touchcancel",b.ontouchend,!1,!0),b.delegate(R,"touchmove",b.ontouchmove,!1,!0)),x.emulatetouch&&(b.bind(b.win,"mousedown",b.ontouchstart,!1,!0),b.bind(R,"mouseup",b.ontouchend,!1,!0),b.bind(R,"mousemove",b.ontouchmove,!1,!0)),!x.cursordragontouch&&(S.cantouch||x.emulatetouch)||(b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}),x.sensitiverail&&(b.bind(b.rail,"click",function(e){b.doRailClick(e,!1,!1)}),b.bind(b.rail,"dblclick",function(e){b.doRailClick(e,!0,!1)}),b.bind(b.cursor,"click",function(e){b.cancelEvent(e)}),b.bind(b.cursor,"dblclick",function(e){b.cancelEvent(e)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}),x.sensitiverail&&(b.bind(b.railh,"click",function(e){b.doRailClick(e,!1,!0)}),b.bind(b.railh,"dblclick",function(e){b.doRailClick(e,!0,!0)}),b.bind(b.cursorh,"click",function(e){b.cancelEvent(e)}),b.bind(b.cursorh,"dblclick",function(e){b.cancelEvent(e)})))),x.cursordragontouch&&(this.istouchcapable||S.cantouch)&&(b.bind(b.cursor,"touchstart",b.ontouchstartCursor),b.bind(b.cursor,"touchmove",b.ontouchmoveCursor),b.bind(b.cursor,"touchend",b.ontouchendCursor),b.cursorh&&b.bind(b.cursorh,"touchstart",function(e){b.ontouchstartCursor(e,!0)}),b.cursorh&&b.bind(b.cursorh,"touchmove",b.ontouchmoveCursor),b.cursorh&&b.bind(b.cursorh,"touchend",b.ontouchendCursor)),x.emulatetouch||S.isandroid||S.isios?(b.bind(S.hasmousecapture?b.win:R,"mouseup",b.ontouchend),b.onclick&&b.bind(R,"click",b.onclick),x.cursordragontouch?(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.cursorh&&b.bind(b.cursorh,"mousedown",function(e){b.onmousedown(e,!0)}),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onmouseup)):(b.bind(b.rail,"mousedown",function(e){e.preventDefault()}),b.railh&&b.bind(b.railh,"mousedown",function(e){e.preventDefault()}))):(b.bind(S.hasmousecapture?b.win:R,"mouseup",b.onmouseup),b.bind(R,"mousemove",b.onmousemove),b.onclick&&b.bind(R,"click",b.onclick),b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.railh&&(b.bind(b.cursorh,"mousedown",function(e){b.onmousedown(e,!0)}),b.bind(b.cursorh,"mouseup",b.onmouseup)),!b.ispage&&x.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),b.bind(R,"mouseup",b.onselectionend),b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(R,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}))),x.enablemousewheel&&(b.isiframe||b.mousewheel(S.isie&&b.ispage?R:b.win,b.onmousewheel),b.mousewheel(b.rail,b.onmousewheel),b.railh&&b.mousewheel(b.railh,b.onmousewheelhr)),b.ispage||S.cantouch||/HTML|^BODY/.test(b.win[0].nodeName)||(b.win.attr("tabindex")||b.win.attr({tabindex:++L}),b.bind(b.win,"focus",function(e){E=b.getTarget(e).id||b.getTarget(e)||!1,b.hasfocus=!0,b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"blur",function(e){E=!1,b.hasfocus=!1}),b.bind(b.win,"mouseenter",function(e){M=b.getTarget(e).id||b.getTarget(e)||!1,b.hasmousefocus=!0,b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"mouseleave",function(e){M=!1,b.hasmousefocus=!1,b.rail.drag||b.hideCursor()})),b.onkeypress=function(e){if(b.railslocked&&0===b.page.maxh)return!0;e=e||_.event;var o=b.getTarget(e);if(o&&/INPUT|TEXTAREA|SELECT|OPTION/.test(o.nodeName)&&(!(o.getAttribute("type")||o.type||!1)||!/submit|button|cancel/i.tp))return!0;if(P(o).attr("contenteditable"))return!0;if(b.hasfocus||b.hasmousefocus&&!E||b.ispage&&!E&&!M){var t=e.keyCode;if(b.railslocked&&27!=t)return b.cancelEvent(e);var r=e.ctrlKey||!1,i=e.shiftKey||!1,s=!1;switch(t){case 38:case 63233:b.doScrollBy(72),s=!0;break;case 40:case 63235:b.doScrollBy(-72),s=!0;break;case 37:case 63232:b.railh&&(r?b.doScrollLeft(0):b.doScrollLeftBy(72),s=!0);break;case 39:case 63234:b.railh&&(r?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),s=!0);break;case 33:case 63276:b.doScrollBy(b.view.h),s=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h),s=!0;break;case 36:case 63273:b.railh&&r?b.doScrollPos(0,0):b.doScrollTo(0),s=!0;break;case 35:case 63275:b.railh&&r?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh),s=!0;break;case 32:x.spacebarenabled&&(i?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),s=!0);break;case 27:b.zoomactive&&(b.doZoom(),s=!0)}if(s)return b.cancelEvent(e)}},x.enablekeyboard&&b.bind(R,S.isopera&&!S.isopera12?"keypress":"keydown",b.onkeypress),b.bind(R,"keydown",function(e){!e.ctrlKey&&1||(b.wheelprevented=!0)}),b.bind(R,"keyup",function(e){e.ctrlKey||!1||(b.wheelprevented=!1)}),b.bind(_,"blur",function(e){b.wheelprevented=!1}),b.bind(_,"resize",b.onscreenresize),b.bind(_,"orientationchange",b.onscreenresize),b.bind(_,"load",b.lazyResize),S.ischrome&&!b.ispage&&!b.haswrapper){var p=b.win.attr("style"),g=parseFloat(b.win.css("width"))+1;b.win.css("width",g),b.synched("chromefix",function(){b.win.attr("style",p)})}if(b.onAttributeChange=function(e){b.lazyResize(b.isieold?250:30)},x.enableobserver&&(b.isie11||!1===B||(b.observerbody=new B(function(e){if(e.forEach(function(e){if("attributes"==e.type)return y.hasClass("modal-open")&&y.hasClass("modal-dialog")&&!P.contains(P(".modal-dialog")[0],b.doc[0])?b.hide():b.show()}),b.me.clientWidth!=b.page.width||b.me.clientHeight!=b.page.height)return b.lazyResize(30)}),b.observerbody.observe(R.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!b.ispage&&!b.haswrapper)){var v=b.win[0];!1!==B?(b.observer=new B(function(e){e.forEach(b.onAttributeChange)}),b.observer.observe(v,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new B(function(e){e.forEach(function(e){if(0<e.removedNodes.length)for(var o in e.removedNodes)if(b&&e.removedNodes[o]===v)return b.remove()})}),b.observerremover.observe(v.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(v,S.isie&&!S.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),S.isie9&&v.attachEvent("onpropertychange",b.onAttributeChange),b.bind(v,"DOMNodeRemoved",function(e){e.target===v&&b.remove()}))}!b.ispage&&x.boxzoom&&b.bind(_,"resize",b.resizeZoom),b.istextarea&&(b.bind(b.win,"keydown",b.lazyResize),b.bind(b.win,"mouseup",b.lazyResize)),b.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var w=function(){var o;b.iframexd=!1;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){o=!(b.iframexd=!0)}if(b.iframexd)return"console"in _&&console.log("NiceScroll error: policy restriced iframe"),!0;if(b.forcescreen=!0,b.isiframe&&(b.iframe={doc:P(o),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=P(b.iframe.body)),!S.isios&&x.iframeautoresize&&!b.isiframe){b.win.scrollTop(0),b.doc.height("");var e=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);b.doc.height(e)}b.lazyResize(30),b.css(P(b.iframe.body),t),S.isios&&b.haswrapper&&b.css(P(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(o,"scroll",b.onscroll),x.enablemousewheel&&b.mousewheel(o,b.onmousewheel),x.enablekeyboard&&b.bind(o,S.isopera?"keypress":"keydown",b.onkeypress),S.cantouch?(b.bind(o,"touchstart",b.ontouchstart),b.bind(o,"touchmove",b.ontouchmove)):x.emulatetouch&&(b.bind(o,"mousedown",b.ontouchstart),b.bind(o,"mousemove",function(e){return b.ontouchmove(e,!0)}),x.grabcursorenabled&&S.cursorgrabvalue&&b.css(P(o.body),{cursor:S.cursorgrabvalue})),b.bind(o,"mouseup",b.ontouchend),b.zoom&&(x.dblclickzoom&&b.bind(o,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(o,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){w.call(b.doc[0],!1)},500),b.bind(this.doc,"load",w)}},this.showCursor=function(e,o){if(b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0),b.rail){if(b.autohidedom&&(b.autohidedom.stop().css({opacity:x.cursoropacitymax}),b.cursoractive=!0),b.rail.drag&&1==b.rail.drag.pt||(void 0!==e&&!1!==e&&(b.scroll.y=e/b.scrollratio.y|0),void 0!==o&&(b.scroll.x=o/b.scrollratio.x|0)),b.cursor.css({height:b.cursorheight,top:b.scroll.y}),b.cursorh){var t=b.hasreversehr?b.scrollvaluemaxw-b.scroll.x:b.scroll.x;b.cursorh.css({width:b.cursorwidth,left:!b.rail.align&&b.rail.visibility?t+b.rail.width:t}),b.cursoractive=!0}b.zoom&&b.zoom.stop().css({opacity:x.cursoropacitymax})}},this.hideCursor=function(e){b.cursortimeout||b.rail&&b.autohidedom&&(b.hasmousefocus&&"leave"===x.autohidemode||(b.cursortimeout=setTimeout(function(){b.rail.active&&b.showonmouseevent||(b.autohidedom.stop().animate({opacity:x.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:x.cursoropacitymin}),b.cursoractive=!1),b.cursortimeout=0},e||x.hidecursordelay)))},this.noticeCursor=function(e,o,t){b.showCursor(o,t),b.rail.active||b.hideCursor(e)},this.getContentSize=b.ispage?function(){return{w:Math.max(R.body.scrollWidth,R.documentElement.scrollWidth),h:Math.max(R.body.scrollHeight,R.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc[0].offsetWidth,h:b.doc[0].offsetHeight}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!b||!b.win)return!1;var t=b.page.maxh,r=b.page.maxw,i=b.view.h,s=b.view.w;if(b.view={w:b.ispage?b.win.width():b.win[0].clientWidth,h:b.ispage?b.win.height():b.win[0].clientHeight},b.page=o||b.getContentSize(),b.page.maxh=Math.max(0,b.page.h-b.view.h),b.page.maxw=Math.max(0,b.page.w-b.view.w),b.page.maxh==t&&b.page.maxw==r&&b.view.w==s&&b.view.h==i){if(b.ispage)return b;var n=b.win.offset();if(b.lastposition){var l=b.lastposition;if(l.top==n.top&&l.left==n.left)return b}b.lastposition=n}return 0===b.page.maxh?(b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail&&(b.rail.scrollable=!1)):(b.page.maxh-=x.railpadding.top+x.railpadding.bottom,b.rail.scrollable=!0),0===b.page.maxw?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh&&(b.railh.scrollable=!1)):(b.page.maxw-=x.railpadding.left+x.railpadding.right,b.railh&&(b.railh.scrollable=x.horizrailenabled)),b.railslocked=b.locked||0===b.page.maxh&&0===b.page.maxw,b.railslocked?(b.ispage||b.updateScrollBar(b.view),!1):(b.hidden||(b.rail.visibility||b.showRail(),b.railh&&!b.railh.visibility&&b.showRailHr()),b.istextarea&&b.win.css("resize")&&"none"!=b.win.css("resize")&&(b.view.h-=20),b.cursorheight=Math.min(b.view.h,Math.round(b.view.h*(b.view.h/b.page.h))),b.cursorheight=x.cursorfixedheight?x.cursorfixedheight:Math.max(x.cursorminheight,b.cursorheight),b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w*(b.view.w/b.page.w))),b.cursorwidth=x.cursorfixedheight?x.cursorfixedheight:Math.max(x.cursorminheight,b.cursorwidth),b.scrollvaluemax=b.view.h-b.cursorheight-(x.railpadding.top+x.railpadding.bottom),b.hasborderbox||(b.scrollvaluemax-=b.cursor[0].offsetHeight-b.cursor[0].clientHeight),b.railh&&(b.railh.width=0<b.page.maxh?b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-(x.railpadding.left+x.railpadding.right)),b.ispage||b.updateScrollBar(b.view),b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/b.scrollvaluemax},b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=b.getScrollTop()/b.scrollratio.y|0,b.scroll.x=b.getScrollLeft()/b.scrollratio.x|0,b.cursoractive&&b.noticeCursor()),b.scroll.y&&0===b.getScrollTop()&&b.doScrollTo(b.scroll.y*b.scrollratio.y|0),b)},this.resize=b.onResize;var c=0;function u(t,r,i,e){b._bind(t,r,function(e){var o={original:e=e||_.event,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return e.preventDefault?e.preventDefault():e.returnValue=!1,!1},stopImmediatePropagation:function(){e.stopImmediatePropagation?e.stopImmediatePropagation():e.cancelBubble=!0}};return"mousewheel"==r?(e.wheelDeltaX&&(o.deltaX=-.025*e.wheelDeltaX),e.wheelDeltaY&&(o.deltaY=-.025*e.wheelDeltaY),o.deltaY||o.deltaX||(o.deltaY=-.025*e.wheelDelta)):o.deltaY=e.detail,i.call(t,o)},e)}this.onscreenresize=function(e){clearTimeout(c);var o=!b.ispage&&!b.haswrapper;o&&b.hideRails(),c=setTimeout(function(){b&&(o&&b.showRails(),b.resize()),c=0},120)},this.lazyResize=function(e){return clearTimeout(c),e=isNaN(e)?240:e,c=setTimeout(function(){b&&b.resize(),c=0},e),b},this.jqbind=function(e,o,t){b.events.push({e:e,n:o,f:t,q:!0}),P(e).on(o,t)};var h=!(this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in R.createElement("div"))b._bind(r,"wheel",o,t||!1);else{var i=void 0!==R.onmousewheel?"mousewheel":"DOMMouseScroll";u(r,i,o,t||!1),"DOMMouseScroll"==i&&u(r,"MozMousePixelScroll",o,t||!1)}});if(S.haseventlistener){try{var p=Object.defineProperty({},"passive",{get:function(){h=!0}});_.addEventListener("test",null,p)}catch(e){}this.stopPropagation=function(e){return e&&(e=e.original?e.original:e).stopPropagation(),!1},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},_.constructor.prototype.addEventListener=R.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},_.constructor.prototype.removeEventListener=R.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||_.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||_.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=O[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;0<=r;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},b.bind(e,o,s.f,r,i),O[o]=s),b.ispage?(s.a=[b.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(b.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=O[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===b.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(b._unbind(e,o,s.l.f),O[o]=null))},this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;b._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){b.events.push({e:e,n:o,f:t,b:r,q:!1}),h&&(i||e==window.document||e==window.document.body||e==window)?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){O[o]?b.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<b.events.length;e++){var o=b.events[e];o.q?o.e.unbind(o.n,o.f):b._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return b.showRail().showRailHr()},this.showRail=function(){return 0===b.page.maxh||!b.ispage&&"none"==b.win.css("display")||(b.rail.visibility=!0,b.rail.css("display","block")),b},this.showRailHr=function(){return b.railh&&(0===b.page.maxw||!b.ispage&&"none"==b.win.css("display")||(b.railh.visibility=!0,b.railh.css("display","block"))),b},this.hideRails=function(){return b.hideRail().hideRailHr()},this.hideRail=function(){return b.rail.visibility=!1,b.rail.css("display","none"),b},this.hideRailHr=function(){return b.railh&&(b.railh.visibility=!1,b.railh.css("display","none")),b},this.show=function(){return b.hidden=!1,b.railslocked=!1,b.showRails()},this.hide=function(){return b.hidden=!0,b.railslocked=!0,b.hideRails()},this.toggle=function(){return b.hidden?b.show():b.hide()},this.remove=function(){for(var e in b.stop(),b.cursortimeout&&clearTimeout(b.cursortimeout),b.delaylist)b.delaylist[e]&&H(b.delaylist[e].h);b.doZoomOut(),b.unbindAll(),S.isie9&&b.win[0].detachEvent("onpropertychange",b.onAttributeChange),!1!==b.observer&&b.observer.disconnect(),!1!==b.observerremover&&b.observerremover.disconnect(),!1!==b.observerbody&&b.observerbody.disconnect(),b.events=null,b.cursor&&b.cursor.remove(),b.cursorh&&b.cursorh.remove(),b.rail&&b.rail.remove(),b.railh&&b.railh.remove(),b.zoom&&b.zoom.remove();for(var o=0;o<b.saved.css.length;o++){var t=b.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}b.saved=!1,b.me.data("__nicescroll","");var r=P.nicescroll;for(var i in r.each(function(e){if(this&&this.id===b.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];r.length--,r.length&&delete r[r.length]}}),b)b[i]=null,delete b[i];b=null},this.scrollstart=function(e){return this.onscrollstart=e,b},this.scrollend=function(e){return this.onscrollend=e,b},this.scrollcancel=function(e){return this.onscrollcancel=e,b},this.zoomin=function(e){return this.onzoomin=e,b},this.zoomout=function(e){return this.onzoomout=e,b},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(0<t.getNiceScroll().length)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(b.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:b.newscrollx,y:b.newscrolly},speed:i};b.onscrollstart.call(b,s)}},this.triggerScrollEnd=function(){if(b.onscrollend){var e=b.getScrollLeft(),o=b.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};b.onscrollend.call(b,t)}};var m=0,f=0,g=0,v=1;function w(e,o,t,r){b.scrollrunning||(b.newscrolly=b.getScrollTop(),b.newscrollx=b.getScrollLeft(),g=X());var i=X()-g;if(g=X(),350<i?v=1:v+=(2-v)/10,o=o*v|0,e=e*v|0){if(r)if(e<0){if(b.getScrollLeft()>=b.page.maxw)return!0}else if(b.getScrollLeft()<=0)return!0;var s=0<e?1:-1;f!==s&&(b.scrollmom&&b.scrollmom.stop(),b.newscrollx=b.getScrollLeft(),f=s),b.lastdeltax-=e}if(o){if(function(){var e=b.getScrollTop();if(o<0){if(e>=b.page.maxh)return!0}else if(e<=0)return!0}()){if(x.nativeparentscrolling&&t&&!b.ispage&&!b.zoomactive)return!0;var n=b.view.h>>1;o=b.newscrolly<-n?(b.newscrolly=-n,-1):b.newscrolly>b.page.maxh+n?(b.newscrolly=b.page.maxh+n,1):0}var l=0<o?1:-1;m!==l&&(b.scrollmom&&b.scrollmom.stop(),b.newscrolly=b.getScrollTop(),m=l),b.lastdeltay-=o}(o||e)&&b.synched("relativexy",function(){var e=b.lastdeltay+b.newscrolly;b.lastdeltay=0;var o=b.lastdeltax+b.newscrollx;b.lastdeltax=0,b.rail.drag||b.doScrollPos(o,e)})}var z=!1;function k(e,o,t){var r,i;if(!t&&z)return!0;0===e.deltaMode?(r=-e.deltaX*(x.mousescrollstep/54)|0,i=-e.deltaY*(x.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*x.mousescrollstep*50/80|0,i=-e.deltaY*x.mousescrollstep*50/80|0),o&&x.oneaxismousemode&&0===r&&i&&(r=i,i=0,!t||(r<0?b.getScrollLeft()>=b.page.maxw:b.getScrollLeft()<=0)&&(i=r,r=0));if(b.isrtlmode&&(r=-r),!w(r,i,t,!0))return z=!1,e.stopImmediatePropagation(),e.preventDefault();t&&(z=!0)}if(this.onmousewheel=function(e){if(b.wheelprevented||b.locked)return!1;if(b.railslocked)return b.debounced("checkunlock",b.resize,250),!1;if(b.rail.drag)return b.cancelEvent(e);if("auto"===x.oneaxismousemode&&0!==e.deltaX&&(x.oneaxismousemode=!1),x.oneaxismousemode&&0===e.deltaX&&!b.rail.scrollable)return!b.railh||!b.railh.scrollable||b.onmousewheelhr(e);var o=X(),t=!1;if(x.preservenativescrolling&&b.checkarea+600<o&&(b.nativescrollingarea=b.isScrollable(e),t=!0),b.checkarea=o,b.nativescrollingarea)return!0;var r=k(e,!1,t);return r&&(b.checkarea=0),r},this.onmousewheelhr=function(e){if(!b.wheelprevented){if(b.railslocked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(e);var o=X(),t=!1;return x.preservenativescrolling&&b.checkarea+600<o&&(b.nativescrollingarea=b.isScrollable(e),t=!0),b.checkarea=o,!!b.nativescrollingarea||(b.railslocked?b.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return b.cancelScroll(),b.scrollmon&&b.scrollmon.stop(),b.cursorfreezed=!1,b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y)),b.noticeCursor(),b},this.getTransitionSpeed=function(e){return 80+e/72*x.scrollspeed|0},x.smoothscroll)if(b.ishwscroll&&S.hastransition&&x.usetransition&&x.smoothscroll){var T="";this.resetTransition=function(){T="",b.doc.css(S.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){var t=o?e:b.getTransitionSpeed(e),r=t+"ms";return T!==r&&(T=r,b.doc.css(S.prefixstyle+"transition-duration",r)),t},this.doScrollLeft=function(e,o){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e=this;if(!e.running){e.running=!0;var o=function(){e.running&&Y(o),b.showCursor(b.getScrollTop(),b.getScrollLeft()),b.notifyScrollEvent(b.win[0])};Y(o)}},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=b.getScrollTop(),i=b.getScrollLeft();if(((b.newscrolly-r)*(o-r)<0||(b.newscrollx-i)*(e-i)<0)&&b.cancelScroll(),x.bouncescroll?(o<0?o=o/2|0:o>b.page.maxh&&(o=b.page.maxh+(o-b.page.maxh)/2|0),e<0?e=e/2|0:e>b.page.maxw&&(e=b.page.maxw+(e-b.page.maxw)/2|0)):(o<0?o=0:o>b.page.maxh&&(o=b.page.maxh),e<0?e=0:e>b.page.maxw&&(e=b.page.maxw)),b.scrollrunning&&e==b.newscrollx&&o==b.newscrolly)return!1;b.newscrolly=o,b.newscrollx=e;var s=b.getScrollTop(),n=b.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=b.prepareTransition(a);b.scrollrunning||(b.scrollrunning=!0,b.triggerScrollStart(n,s,e,o,c),b.cursorupdate.start()),b.scrollendtrapped=!0,S.transitionend||(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollTransitionEnd,c)),b.setScrollTop(b.newscrolly),b.setScrollLeft(b.newscrollx)},this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;var e=b.getScrollTop(),o=b.getScrollLeft();return b.scrollrunning=!1,S.transitionend||clearTimeout(S.transitionend),b.scrollendtrapped=!1,b.resetTransition(),b.setScrollTop(e),b.railh&&b.setScrollLeft(o),b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm),b.timerscroll=!1,b.cursorfreezed=!1,b.cursorupdate.stop(),b.showCursor(e,o),b},this.onScrollTransitionEnd=function(){if(b.scrollendtrapped){var e=b.getScrollTop(),o=b.getScrollLeft();if(e<0?e=0:e>b.page.maxh&&(e=b.page.maxh),o<0?o=0:o>b.page.maxw&&(o=b.page.maxw),e!=b.newscrolly||o!=b.newscrollx)return b.doScrollPos(o,e,x.snapbackspeed);b.scrollrunning&&b.triggerScrollEnd(),b.scrollrunning=!1,b.scrollendtrapped=!1,b.resetTransition(),b.timerscroll=!1,b.setScrollTop(e),b.railh&&b.setScrollLeft(o),b.cursorupdate.stop(),b.noticeCursor(!1,e,o),b.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=b.getScrollTop(),i=b.getScrollLeft();((b.newscrolly-r)*(o-r)<0||(b.newscrollx-i)*(e-i)<0)&&b.cancelScroll();var s=!1;if(b.bouncescroll&&b.rail.visibility||(o<0?s=!(o=0):o>b.page.maxh&&(o=b.page.maxh,s=!0)),b.bouncescroll&&b.railh.visibility||(e<0?s=!(e=0):e>b.page.maxw&&(e=b.page.maxw,s=!0)),b.scrollrunning&&b.newscrolly===o&&b.newscrollx===e)return!0;b.newscrolly=o,b.newscrollx=e,b.dst={},b.dst.x=e-i,b.dst.y=o-r,b.dst.px=i,b.dst.py=r;var n=0|Math.sqrt(b.dst.x*b.dst.x+b.dst.y*b.dst.y),l=b.getTransitionSpeed(n);b.bzscroll={};var a=s?1:.58;b.bzscroll.x=new d(i,b.newscrollx,l,0,0,a,1),b.bzscroll.y=new d(r,b.newscrolly,l,0,0,a,1);X();var c=function(){if(b.scrollrunning){var e=b.bzscroll.y.getPos();b.setScrollLeft(b.bzscroll.x.getNow()),b.setScrollTop(b.bzscroll.y.getNow()),e<=1?b.timer=Y(c):(b.scrollrunning=!1,b.timer=0,b.triggerScrollEnd())}};b.scrollrunning||(b.triggerScrollStart(i,r,e,o,l),b.scrollrunning=!0,b.timer=Y(c))},this.cancelScroll=function(){return b.timer&&H(b.timer),b.timer=0,b.bzscroll=!1,b.scrollrunning=!1,b};else this.doScrollLeft=function(e,o){var t=b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.getScrollLeft();b.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>b.page.maxw?b.page.maxw:e;r<0&&(r=0);var i=o>b.page.maxh?b.page.maxh:o;i<0&&(i=0),b.synched("scroll",function(){b.setScrollTop(i),b.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){w(0,e)},this.doScrollLeftBy=function(e,o){w(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*b.scrollratio.y):e;t<0?t=0:t>b.page.maxh&&(t=b.page.maxh),b.cursorfreezed=!1,b.doScrollTop(e)},this.checkContentSize=function(){var e=b.getContentSize();e.h==b.page.h&&e.w==b.page.w||b.resize(!1,e)},b.onscroll=function(e){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()/b.scrollratio.y),b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()/b.scrollratio.x)),b.noticeCursor()})},b.bind(b.docscroll,"scroll",b.onscroll),this.doZoomIn=function(e){if(!b.zoomactive){b.zoomactive=!0,b.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=b.win[0].style;for(var r in o){var i=o[r];b.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}b.zoomrestore.style.width=b.win.css("width"),b.zoomrestore.style.height=b.win.css("height"),b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()},S.isios4&&(b.zoomrestore.scrollTop=I.scrollTop(),I.scrollTop(0)),b.win.css({position:S.isios4?"absolute":"fixed",top:0,left:0,zIndex:N+100,margin:0});var s=b.win.css("backgroundColor");return""!==s&&!/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(s)||b.win.css("backgroundColor","#fff"),b.rail.css({zIndex:N+101}),b.zoom.css({zIndex:N+102}),b.zoom.css("backgroundPosition","0 -18px"),b.resizeZoom(),b.onzoomin&&b.onzoomin.call(b),b.cancelEvent(e)}},this.doZoomOut=function(e){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),S.isios4&&I.scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0 0"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(e)},this.doZoom=function(e){return b.zoomactive?b.doZoomOut(e):b.doZoomIn(e)},this.resizeZoom=function(){if(b.zoomactive){var e=b.getScrollTop();b.win.css({width:I.width()-b.zoomrestore.padding.w+"px",height:I.height()-b.zoomrestore.padding.h+"px"}),b.onResize(),b.setScrollTop(Math.min(b.page.maxh,e))}},this.init(),P.nicescroll.push(this)}var o,t,r,B=_.MutationObserver||_.WebKitMutationObserver||!1,X=Date.now||function(){return(new Date).getTime()},D={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:(t=R.currentScript||!!(o=R.getElementsByTagName("script")).length&&o[o.length-1],r=t?t.src.split("?")[0]:"",0<r.split("/").length?r.split("/").slice(0,-1).join("/")+"/":""),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},A=!1,q=function(e){var f=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,o){f.stop(),f.steptime=0,f.lasttime=X(),f.speedx=0,f.speedy=0,f.lastx=e,f.lasty=o,f.lastscrollx=-1,f.lastscrolly=-1},this.update=function(e,o){var t=X();f.steptime=t-f.lasttime,f.lasttime=t;var r=o-f.lasty,i=e-f.lastx,s=f.nc.getScrollTop()+r,n=f.nc.getScrollLeft()+i;f.snapx=n<0||n>f.nc.page.maxw,f.snapy=s<0||s>f.nc.page.maxh,f.speedx=i,f.speedy=r,f.lastx=e,f.lasty=o},this.stop=function(){f.nc.unsynched("domomentum2d"),f.timer&&clearTimeout(f.timer),f.timer=0,f.lastscrollx=-1,f.lastscrolly=-1},this.doSnapy=function(e,o){var t=!1;o<0?t=!(o=0):o>f.nc.page.maxh&&(o=f.nc.page.maxh,t=!0),e<0?t=!(e=0):e>f.nc.page.maxw&&(e=f.nc.page.maxw,t=!0),t?f.nc.doScrollPos(e,o,f.nc.opt.snapbackspeed):f.nc.triggerScrollEnd()},this.doMomentum=function(e){var o=X(),t=e?o+e:f.lasttime,r=f.nc.getScrollLeft(),i=f.nc.getScrollTop(),s=f.nc.page.maxh,n=f.nc.page.maxw;f.speedx=0<n?Math.min(60,f.speedx):0,f.speedy=0<s?Math.min(60,f.speedy):0;var l=t&&o-t<=60;(i<0||s<i||r<0||n<r)&&(l=!1);var a=!(!f.speedy||!l)&&f.speedy,c=!(!f.speedx||!l)&&f.speedx;if(a||c){var d=Math.max(16,f.steptime);if(50<d){var u=d/50;f.speedx*=u,f.speedy*=u,d=50}f.demulxy=0,f.lastscrollx=f.nc.getScrollLeft(),f.chkx=f.lastscrollx,f.lastscrolly=f.nc.getScrollTop(),f.chky=f.lastscrolly;var h=f.lastscrollx,p=f.lastscrolly,m=function(){var e=600<X()-o?.04:.02;f.speedx&&(h=Math.floor(f.lastscrollx-f.speedx*(1-f.demulxy)),((f.lastscrollx=h)<0||n<h)&&(e=.1)),f.speedy&&(p=Math.floor(f.lastscrolly-f.speedy*(1-f.demulxy)),((f.lastscrolly=p)<0||s<p)&&(e=.1)),f.demulxy=Math.min(1,f.demulxy+e),f.nc.synched("domomentum2d",function(){if(f.speedx){f.nc.getScrollLeft();f.chkx=h,f.nc.setScrollLeft(h)}if(f.speedy){f.nc.getScrollTop();f.chky=p,f.nc.setScrollTop(p)}f.timer||(f.nc.hideCursor(),f.doSnapy(h,p))}),f.demulxy<1?f.timer=setTimeout(m,d):(f.stop(),f.nc.hideCursor(),f.doSnapy(h,p))};m()}else f.doSnapy(f.nc.getScrollLeft(),f.nc.getScrollTop())}},i=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():i.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):i.call(e,o),this}},e.fn.scrollTop=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(o)):i.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollTop():i.call(this)};var n=e.fn.scrollLeft;P.cssHooks.pageXOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():n.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):n.call(e,o),this}},e.fn.scrollLeft=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(o)):n.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollLeft():n.call(this)};function a(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return P.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=P.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this}!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(a.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new a(this):this[e]&&P.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==P.data(e,"__nicescroll")},P.fn.niceScroll=function(i,s){void 0!==s||"object"!=typeof i||"jquery"in i||(s=i,i=!1);var n=new a;return this.each(function(){var e=P(this),o=P.extend({},s);if(i){var t=P(i);o.doc=1<t.length?P(i,e):t,o.win=e}!("doc"in o)||"win"in o||(o.win=e);var r=e.data("__nicescroll")||!1;r||(o.doc=o.doc||e,r=new l(o,e),e.data("__nicescroll",r)),n.push(r)}),1===n.length?n[0]:n},_.NiceScroll={getjQuery:function(){return e}},P.nicescroll||(P.nicescroll=new a,P.nicescroll.options=D)}); 2 | -------------------------------------------------------------------------------- /dist/zoomico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inuyaksa/jquery.nicescroll/fa29e019220e10b7c67a10c07018c3377596b02c/dist/zoomico.png -------------------------------------------------------------------------------- /jquery.nicescroll.iframehelper.js: -------------------------------------------------------------------------------- 1 | /* iframe script helper for jquery.nicescroll 2 | -- version 0.9.0 3 | -- copyright 2017-06-18 InuYaksa*2017 4 | -- licensed under the MIT 5 | -- 6 | -- https://nicescroll.areaaperta.com/ 7 | -- https://github.com/inuyaksa/jquery.nicescroll 8 | -- 9 | */ 10 | 11 | (function (document,window) { 12 | 13 | var body = document.body; 14 | var parent = window.parent; 15 | 16 | if (parent && ("createEvent" in document)) { 17 | 18 | var isoldie = ("documentMode" in document); // 11- 19 | var ismsedge = ("msCredentials" in window); // MS Edge 14+ 20 | 21 | function onwheel(e) { 22 | 23 | var evt = document.createEvent("MouseEvents"); 24 | evt.initEvent('wheel', true, true); 25 | evt.deltaMode = e.deltaMode; 26 | evt.deltaX = e.deltaX; 27 | evt.deltaY = e.deltaY; 28 | evt.deltaZ = e.deltaZ; 29 | evt.wheelDelta = e.wheelDelta; 30 | evt.wheelDeltaX = e.wheelDeltaX; 31 | evt.wheelDeltaY = e.wheelDeltaY; 32 | 33 | parent.dispatchEvent(evt); 34 | } 35 | 36 | body.addEventListener("wheel", onwheel); 37 | 38 | } 39 | 40 | if (window.addEventListener) { 41 | 42 | // https://davidwalsh.name/add-rules-stylesheets 43 | var sheet = (function () { 44 | var style = document.createElement("style"); 45 | style.appendChild(document.createTextNode("")); 46 | document.head.appendChild(style); 47 | return style.sheet; 48 | })(); 49 | 50 | var tmrscroll = false; 51 | var lastiframe = null; 52 | var lastiframeviewport = null; 53 | var lastscroll = []; 54 | 55 | window.addEventListener("scroll", function (e) { 56 | if (lastiframeviewport) { 57 | // var df = [ window.scrollX - lastscroll[0], window.scrollY - lastscroll[1] ]; 58 | window.scrollTo(lastscroll[0], lastscroll[1]); 59 | // lastiframeviewport.scrollBy(df[0],df[1]); 60 | // console.log(df); 61 | } 62 | }); 63 | 64 | function findNiceParent(t) { 65 | do { 66 | if ($.data(t, '__nicescroll') !== undefined) return t; 67 | t = t.parentNode || false; 68 | } while (t); 69 | return false; 70 | } 71 | 72 | window.addEventListener("load", function () { 73 | 74 | var hasstyle = false; 75 | 76 | $.nicescroll.each(function () { 77 | var nice = this; 78 | nice.scrollstart(function () { 79 | if (!hasstyle) sheet.insertRule("iframe { pointer-events: none !important; }", 0); 80 | hasstyle = true; 81 | }); 82 | nice.scrollend(function () { 83 | if (hasstyle) sheet.deleteRule(0); 84 | hasstyle = false; 85 | }); 86 | }); 87 | 88 | $("iframe").each(function () { 89 | this.addEventListener("mouseenter", function (e) { 90 | lastiframe = e.target; 91 | var chk = findNiceParent(lastiframe); 92 | lastiframeviewport = chk; 93 | //if (chk) lastiframeviewport = $(chk).getNiceScroll(); 94 | lastscroll = [window.scrollX, window.scrollY]; 95 | }); 96 | this.addEventListener("mouseleave", function (e) { 97 | lastiframe = lastiframeviewport = null; 98 | }); 99 | }); 100 | 101 | }); 102 | 103 | } 104 | 105 | })(document,window); -------------------------------------------------------------------------------- /jquery.nicescroll.iframehelper.min.js: -------------------------------------------------------------------------------- 1 | /* iframe helper for jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */ 2 | !function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,r.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,r=t.parent;if(r&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var i=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,o=null,c=[];t.addEventListener("scroll",function(e){o&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){e||i.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){e&&i.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);o=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=o=null})})})}}(document,window); -------------------------------------------------------------------------------- /jquery.nicescroll.min.js: -------------------------------------------------------------------------------- 1 | !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var E=!1,L=!1,M=0,C=2e3,N=0,P=e,R=document,_=window,I=P(_),O=[];var Y=_.requestAnimationFrame||_.webkitRequestAnimationFrame||_.mozRequestAnimationFrame||!1,H=_.cancelAnimationFrame||_.webkitCancelAnimationFrame||_.mozCancelAnimationFrame||!1;if(Y)_.cancelAnimationFrame||(H=function(e){});else{var s=0;Y=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-s)),i=_.setTimeout(function(){e(t+r)},r);return s=t+r,i},H=function(e){_.clearTimeout(e)}}function l(e,o){var b=this;this.version="3.7.6",this.name="nicescroll",this.me=o;var y=P("body"),x=this.opt={doc:y,win:!1};if(P.extend(x,D),x.snapbackspeed=80,e)for(var t in x)void 0!==e[t]&&(x[t]=e[t]);if(x.disablemutationobserver&&(B=!1),this.doc=x.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test(x.win?x.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==x.win,this.win=x.win||(this.ispage?I:this.doc),this.docscroll=this.ispage&&!this.haswrapper?I:this.win,this.body=y,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=x.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==x.rtlmode){var r=this.win[0]==_?this.body:this.win,i=r.css("writing-mode")||r.css("-webkit-writing-mode")||r.css("-ms-writing-mode")||r.css("-moz-writing-mode");"horizontal-tb"==i||"lr-tb"==i||""===i?(this.isrtlmode="rtl"==r.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==i||"tb"==i||"tb-rl"==i||"rl-tb"==i,this.isvertical="vertical-rl"==i||"tb"==i||"tb-rl"==i)}else this.isrtlmode=!0===x.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,(this.observerbody=!1)!==x.scrollbarid)this.id=x.scrollbarid;else for(;this.id="ascrail"+C++,R.getElementById(this.id););this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=x.overflowx,this.overflowy=x.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=function(){if(A)return A;var e=R.createElement("DIV"),s=e.style,o=navigator.userAgent,t=navigator.platform,n={};return n.haspointerlock="pointerLockElement"in R||"webkitPointerLockElement"in R||"mozPointerLockElement"in R,n.isopera="opera"in _,n.isopera12=n.isopera&&"getUserMedia"in navigator,n.isoperamini="[object OperaMini]"===Object.prototype.toString.call(_.operamini),n.isie="all"in R&&"attachEvent"in e&&!n.isopera,n.isieold=n.isie&&!("msInterpolationMode"in s),n.isie7=n.isie&&!n.isieold&&(!("documentMode"in R)||7===R.documentMode),n.isie8=n.isie&&"documentMode"in R&&8===R.documentMode,n.isie9=n.isie&&"performance"in _&&9===R.documentMode,n.isie10=n.isie&&"performance"in _&&10===R.documentMode,n.isie11="msRequestFullscreen"in e&&11<=R.documentMode,n.ismsedge="msCredentials"in _,n.ismozilla="MozAppearance"in s,n.iswebkit=!n.ismsedge&&"WebkitAppearance"in s,n.ischrome=n.iswebkit&&"chrome"in _,n.ischrome38=n.ischrome&&"touchAction"in s,n.ischrome22=!n.ischrome38&&n.ischrome&&n.haspointerlock,n.ischrome26=!n.ischrome38&&n.ischrome&&"transition"in s,n.cantouch="ontouchstart"in R.documentElement||"ontouchstart"in _,n.hasw3ctouch=!!_.PointerEvent&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints),n.hasmstouch=!n.hasw3ctouch&&(_.MSPointerEvent||!1),n.ismac=/^mac$/i.test(t),n.isios=n.cantouch&&/iphone|ipad|ipod/i.test(t),n.isios4=n.isios&&!("seal"in Object),n.isios7=n.isios&&"webkitHidden"in R,n.isios8=n.isios&&"hidden"in R,n.isios10=n.isios&&_.Proxy,n.isandroid=/android/i.test(o),n.haseventlistener="addEventListener"in e,n.trstyle=!1,n.hastransform=!1,n.hastranslate3d=!1,n.transitionstyle=!1,n.hastransition=!1,n.transitionend=!1,n.trstyle="transform",n.hastransform="transform"in s||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],o=0,t=e.length;o<t;o++)if(void 0!==s[e[o]]){n.trstyle=e[o];break}n.hastransform=!!n.trstyle}(),n.hastransform&&(s[n.trstyle]="translate3d(1px,2px,3px)",n.hastranslate3d=/translate3d/.test(s[n.trstyle])),n.transitionstyle="transition",n.prefixstyle="",n.transitionend="transitionend",n.hastransition="transition"in s||function(){n.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],o=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],t=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],r=0,i=e.length;r<i;r++)if(e[r]in s){n.transitionstyle=e[r],n.prefixstyle=o[r],n.transitionend=t[r];break}n.ischrome26&&(n.prefixstyle=o[1]),n.hastransition=n.transitionstyle}(),n.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(n.ischrome&&!n.ischrome38||n.isie)&&(e=[]);for(var o=0,t=e.length;o<t;o++){var r=e[o];if(s.cursor=r,s.cursor==r)return r}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),n.hasmousecapture="setCapture"in e,n.hasMutationObserver=!1!==B,e=null,A=n}();var S=P.extend({},this.detected);function d(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=X(),this.df=o-e}function s(){var e=b.doc.css(S.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}if(this.canhwscroll=S.hastransform&&x.hwacceleration,this.ishwscroll=this.canhwscroll&&b.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(S.iswebkit||S.isie||S.isie11):this.hasreversehr=!(S.iswebkit||S.isie&&!S.isie10&&!S.isie11):this.hasreversehr=!1,this.istouchcapable=!1,(S.cantouch||!S.hasw3ctouch&&!S.hasmstouch)&&(!S.cantouch||S.isios||S.isandroid||!S.iswebkit&&!S.ismozilla)||(this.istouchcapable=!0),x.enablemouselockapi||(S.hasmousecapture=!1,S.haspointerlock=!1),this.debounced=function(e,o,t){b&&(b.delaylist[e]||!1||(b.delaylist[e]={h:Y(function(){b.delaylist[e].fn.call(b),b.delaylist[e]=!1},t)},o.call(b)),b.delaylist[e].fn=o)},this.synched=function(e,o){b.synclist[e]?b.synclist[e]=o:(b.synclist[e]=o,Y(function(){b&&(b.synclist[e]&&b.synclist[e].call(b),b.synclist[e]=null)}))},this.unsynched=function(e){b.synclist[e]&&(b.synclist[e]=!1)},this.css=function(e,o){for(var t in o)b.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?b.getScrollTop():b.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?b.getScrollLeft():b.setScrollLeft(e)},d.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(X()-this.ts)/this.spd},getNow:function(){var e=(X()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return 1<=e?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=X(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},S.hastranslate3d&&S.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=s();if(o)return 16==o.length?-o[13]:-o[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=s();if(o)return 16==o.length?-o[12]:-o[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x},this.notifyScrollEvent=function(e){var o=R.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,_,1),o.niceevent=!0,e.dispatchEvent(o)};var n=this.isrtlmode?1:-1;S.hastranslate3d&&x.enabletranslate3d?(this.setScrollTop=function(e,o){b.doc.translate.y=e,b.doc.translate.ty=-1*e+"px",b.doc.css(S.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)"),o||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(e,o){b.doc.translate.x=e,b.doc.translate.tx=e*n+"px",b.doc.css(S.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)"),o||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(e,o){b.doc.translate.y=e,b.doc.translate.ty=-1*e+"px",b.doc.css(S.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")"),o||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(e,o){b.doc.translate.x=e,b.doc.translate.tx=e*n+"px",b.doc.css(S.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")"),o||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},this.setScrollTop=function(e){b.docscroll.scrollTop(e)},this.getScrollLeft=function(){return b.hasreversehr?b.detected.ismozilla?b.page.maxw-Math.abs(b.docscroll.scrollLeft()):b.page.maxw-b.docscroll.scrollLeft():b.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(b)return b.hasreversehr&&(e=b.detected.ismozilla?-(b.page.maxw-e):b.page.maxw-e),b.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var l={thin:1,medium:3,thick:5};function a(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=l[r]||0)?t?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1;return b.isie8&&i&&(i+=1),s?i:0}return i}this.getDocumentScrollOffset=function(){return{top:_.pageYOffset||R.documentElement.scrollTop,left:_.pageXOffset||R.documentElement.scrollLeft}},this.getOffset=function(){if(b.isfixed){var e=b.win.offset(),o=b.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=b.win.offset();if(!b.viewport)return t;var r=b.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()-(x.railpadding.top+x.railpadding.bottom)}),b.railh&&b.railh.css({width:b.win.innerWidth()-(x.railpadding.left+x.railpadding.right)});else{var r=b.getOffset();if((o={top:r.top,left:r.left-(x.railpadding.left+x.railpadding.right)}).top+=a(b.win,"border-top-width",!0),o.left+=b.rail.align?b.win.outerWidth()-a(b.win,"border-right-width")-b.rail.width:a(b.win,"border-left-width"),(t=x.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),b.railslocked||b.rail.css({top:o.top,left:o.left,height:(e?e.h:b.win.innerHeight())-(x.railpadding.top+x.railpadding.bottom)}),b.zoom&&b.zoom.css({top:o.top+1,left:1==b.rail.align?o.left-20:o.left+b.rail.width+4}),b.railh&&!b.railslocked){o={top:r.top,left:r.left},(t=x.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=b.railh.align?o.top+a(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:o.top+a(b.win,"border-top-width",!0),s=o.left+a(b.win,"border-left-width");b.railh.css({top:i-(x.railpadding.top+x.railpadding.bottom),left:s,width:b.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;b.railslocked||(b.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+R.documentElement.scrollLeft,e.pageY=e.clientY+R.documentElement.scrollTop),o?(r=t?b.doScrollLeft:b.doScrollTop,s=t?(e.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(e.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y,b.unsynched("relativexy"),r(0|s)):(r=t?b.doScrollLeftBy:b.doScrollBy,s=t?b.scroll.x:b.scroll.y,n=t?e.pageX-b.railh.offset().left:e.pageY-b.rail.offset().top,i=t?b.view.w:b.view.h,r(n<=s?i:-i)))},b.newscrolly=b.newscrollx=0,b.hasanimationframe="requestAnimationFrame"in _,b.hascancelanimationframe="cancelAnimationFrame"in _,b.hasborderbox=!1,this.init=function(){if(b.saved.css=[],S.isoperamini)return!0;if(S.isandroid&&!("hidden"in R))return!0;x.emulatetouch=x.emulatetouch||x.touchbehavior,b.hasborderbox=_.getComputedStyle&&"border-box"===_.getComputedStyle(R.body)["box-sizing"];var t={"overflow-y":"hidden"};if((S.isie11||S.isie10)&&(t["-ms-overflow-style"]="none"),b.ishwscroll&&(this.doc.css(S.transitionstyle,S.prefixstyle+"transform 0ms ease-out"),S.transitionend&&b.bind(b.doc,S.transitionend,b.onScrollTransitionEnd,!1)),b.zindex="auto",b.ispage||"auto"!=x.zindex?b.zindex=x.zindex:b.zindex=function(){var e=b.win;if("zIndex"in e)return e.zIndex();for(;0<e.length;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}()||"auto",!b.ispage&&"auto"!=b.zindex&&b.zindex>N&&(N=b.zindex),b.isie&&0===b.zindex&&"auto"==x.zindex&&(b.zindex="auto"),!b.ispage||!S.isieold){var e=b.docscroll;b.ispage&&(e=b.haswrapper?b.win:b.doc),b.css(e,t),b.ispage&&(S.isie11||S.isie)&&b.css(P("html"),t),!S.isios||b.ispage||b.haswrapper||b.css(y,{"-webkit-overflow-scrolling":"touch"});var o=P(R.createElement("div"));o.css({position:"relative",top:0,float:"right",width:x.cursorwidth,height:0,"background-color":x.cursorcolor,border:x.cursorborder,"background-clip":"padding-box","-webkit-border-radius":x.cursorborderradius,"-moz-border-radius":x.cursorborderradius,"border-radius":x.cursorborderradius}),o.addClass("nicescroll-cursors"),b.cursor=o;var r=P(R.createElement("div"));r.attr("id",b.id),r.addClass("nicescroll-rails nicescroll-rails-vr"),x.scrollCLass&&r.addClass(x.scrollCLass);var i,s,n=["left","right","top","bottom"];for(var l in n)s=n[l],(i=x.railpadding[s]||0)&&r.css("padding-"+s,i+"px");r.append(o),r.width=Math.max(parseFloat(x.cursorwidth),o.outerWidth()),r.css({width:r.width+"px",zIndex:b.zindex,background:x.background,cursor:"default"}),r.visibility=!0,r.scrollable=!0,r.align="left"==x.railalign?0:1,b.rail=r;var a,c=b.rail.drag=!1;if(!x.boxzoom||b.ispage||S.isieold||(c=R.createElement("div"),b.bind(c,"click",b.doZoom),b.bind(c,"mouseenter",function(){b.zoom.css("opacity",x.cursoropacitymax)}),b.bind(c,"mouseleave",function(){b.zoom.css("opacity",x.cursoropacitymin)}),b.zoom=P(c),b.zoom.css({cursor:"pointer",zIndex:b.zindex,backgroundImage:"url("+x.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),x.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),S.cantouch&&x.gesturezoom&&(b.ongesturezoom=function(e){return 1.5<e.scale&&b.doZoomIn(e),e.scale<.8&&b.doZoomOut(e),b.cancelEvent(e)},b.bind(b.win,"gestureend",b.ongesturezoom))),b.railh=!1,x.horizrailenabled&&(b.css(e,{overflowX:"hidden"}),(o=P(R.createElement("div"))).css({position:"absolute",top:0,height:x.cursorwidth,width:0,backgroundColor:x.cursorcolor,border:x.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":x.cursorborderradius,"-moz-border-radius":x.cursorborderradius,"border-radius":x.cursorborderradius}),S.isieold&&o.css("overflow","hidden"),o.addClass("nicescroll-cursors"),b.cursorh=o,(a=P(R.createElement("div"))).attr("id",b.id+"-hr"),a.addClass("nicescroll-rails nicescroll-rails-hr"),x.scrollCLass&&a.addClass(x.scrollCLass),a.height=Math.max(parseFloat(x.cursorwidth),o.outerHeight()),a.css({height:a.height+"px",zIndex:b.zindex,background:x.background}),a.append(o),a.visibility=!0,a.scrollable=!0,a.align="top"==x.railvalign?0:1,b.railh=a,b.railh.drag=!1),b.ispage)r.css({position:"fixed",top:0,height:"100%"}),r.css(r.align?{right:0}:{left:0}),b.body.append(r),b.railh&&(a.css({position:"fixed",left:0,width:"100%"}),a.css(a.align?{bottom:0}:{top:0}),b.body.append(a));else{if(b.ishwscroll){"static"==b.win.css("position")&&b.css(b.win,{position:"relative"});var d="HTML"==b.win[0].nodeName?b.body:b.win;P(d).scrollTop(0).scrollLeft(0),b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":r.width+4}),d.append(b.zoom)),r.css({position:"absolute",top:0}),r.css(r.align?{right:0}:{left:0}),d.append(r),a&&(a.css({position:"absolute",left:0,bottom:0}),a.css(a.align?{bottom:0}:{top:0}),d.append(a))}else{b.isfixed="fixed"==b.win.css("position");var u=b.isfixed?"fixed":"absolute";b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,/fixed|absolute/.test(b.viewport.css("position"))||b.css(b.viewport,{position:"relative"})),r.css({position:u}),b.zoom&&b.zoom.css({position:u}),b.updateScrollBar(),b.body.append(r),b.zoom&&b.body.append(b.zoom),b.railh&&(a.css({position:u}),b.body.append(a))}S.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),x.disableoutline&&(S.isie&&b.win.attr("hideFocus","true"),S.iswebkit&&b.win.css("outline","none"))}if(!1===x.autohidemode?(b.autohidedom=!1,b.rail.css({opacity:x.cursoropacitymax}),b.railh&&b.railh.css({opacity:x.cursoropacitymax})):!0===x.autohidemode||"leave"===x.autohidemode?(b.autohidedom=P().add(b.rail),S.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&S.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==x.autohidemode?(b.autohidedom=P().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==x.autohidemode?(b.autohidedom=P().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==x.autohidemode&&(b.autohidedom=!1,b.hide(),b.railslocked=!1),S.cantouch||b.istouchcapable||x.emulatetouch||S.hasmstouch){b.scrollmom=new q(b);b.ontouchstart=function(e){if(b.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(b.hasmoving=!1,b.scrollmom.timer&&(b.triggerScrollEnd(),b.scrollmom.stop()),!b.railslocked){var o=b.getTarget(e);if(o)if(/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return b.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),b.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(b.rail.drag={x:e.clientX,y:e.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1,tg:o},b.ispage||!x.directionlockdeadzone)b.rail.drag.dl="f";else{var i=I.width(),s=I.height(),n=b.getContentSize(),l=n.h-s,a=n.w-i;b.rail.scrollable&&!b.railh.scrollable?b.rail.drag.ck=0<l&&"v":!b.rail.scrollable&&b.railh.scrollable?b.rail.drag.ck=0<a&&"h":b.rail.drag.ck=!1}if(x.emulatetouch&&b.isiframe&&S.isie){var c=b.win.position();b.rail.drag.x+=c.left,b.rail.drag.y+=c.top}if(b.hasmoving=!1,b.lastmouseup=!1,b.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return S.hasmousecapture&&o.setCapture(),x.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(b.hasmoving)return!1;o._onclick.call(this,e)}),b.cancelEvent(e)):b.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(P(o).attr("type"))&&(b.preventclick={tg:o,click:!1})}}},b.ontouchend=function(e){if(!b.rail.drag)return!0;if(2==b.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;b.rail.drag=!1;var o="mouseup"===e.type;if(b.hasmoving&&(b.scrollmom.doMomentum(),b.lastmouseup=!0,b.hideCursor(),S.hasmousecapture&&R.releaseCapture(),o))return b.cancelEvent(e)}else if(1==b.rail.drag.pt)return b.onmouseup(e)};var m=x.emulatetouch&&b.isiframe&&!S.hasmousecapture,f=.3*x.directionlockdeadzone|0;b.ontouchmove=function(e,o){if(!b.rail.drag)return!0;if(e.targetTouches&&x.preventmultitouchscrolling&&1<e.targetTouches.length)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2!=b.rail.drag.pt)return 1==b.rail.drag.pt?b.onmousemove(e):void 0;var t,r;if("changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),r=t=0,m&&!o){var i=b.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-b.rail.drag.y,l=e.clientX+r,a=l-b.rail.drag.x,c=b.rail.drag.st-n;if(b.ishwscroll&&x.bouncescroll)c<0?c=Math.round(c/2):c>b.page.maxh&&(c=b.page.maxh+Math.round((c-b.page.maxh)/2));else if(c<0?s=c=0:c>b.page.maxh&&(c=b.page.maxh,s=0),0===s&&!b.hasmoving)return b.ispage||(b.rail.drag=!1),!0;var d=b.getScrollLeft();if(b.railh&&b.railh.scrollable&&(d=b.isrtlmode?a-b.rail.drag.sl:b.rail.drag.sl-a,b.ishwscroll&&x.bouncescroll?d<0?d=Math.round(d/2):d>b.page.maxw&&(d=b.page.maxw+Math.round((d-b.page.maxw)/2)):(d<0&&(l=d=0),d>b.page.maxw&&(d=b.page.maxw,l=0))),!b.hasmoving){if(b.rail.drag.y===e.clientY&&b.rail.drag.x===e.clientX)return b.cancelEvent(e);var u=Math.abs(n),h=Math.abs(a),p=x.directionlockdeadzone;if(b.rail.drag.ck?"v"==b.rail.drag.ck?p<h&&u<=f?b.rail.drag=!1:p<u&&(b.rail.drag.dl="v"):"h"==b.rail.drag.ck&&(p<u&&h<=f?b.rail.drag=!1:p<h&&(b.rail.drag.dl="h")):p<u&&p<h?b.rail.drag.dl="f":p<u?b.rail.drag.dl=f<h?"f":"v":p<h&&(b.rail.drag.dl=f<u?"f":"h"),!b.rail.drag.dl)return b.cancelEvent(e);b.triggerScrollStart(e.clientX,e.clientY,0,0,0),b.hasmoving=!0}return b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||!1,b.preventclick.tg.onclick=b.onpreventclick),b.rail.drag.dl&&("v"==b.rail.drag.dl?d=b.rail.drag.sl:"h"==b.rail.drag.dl&&(c=b.rail.drag.st)),b.synched("touchmove",function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.resetTransition(),b.rail.scrollable&&b.setScrollTop(c),b.scrollmom.update(l,s),b.railh&&b.railh.scrollable?(b.setScrollLeft(d),b.showCursor(c,d)):b.showCursor(c),S.isie10&&R.selection.clear())}),b.cancelEvent(e)},b.ontouchstartCursor=function(e,o){if(!b.rail.drag||3==b.rail.drag.pt){if(b.locked)return b.cancelEvent(e);b.cancelScroll(),b.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:b.scroll.x,sy:b.scroll.y,pt:3,hr:!!o};var t=b.getTarget(e);return!b.ispage&&S.hasmousecapture&&t.setCapture(),b.isiframe&&!S.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"})),b.cancelEvent(e)}},b.ontouchendCursor=function(e){if(b.rail.drag){if(S.hasmousecapture&&R.releaseCapture(),b.isiframe&&!S.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),3!=b.rail.drag.pt)return;return b.rail.drag=!1,b.cancelEvent(e)}},b.ontouchmoveCursor=function(e){if(b.rail.drag){if(3!=b.rail.drag.pt)return;if(b.cursorfreezed=!0,b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(e.touches[0].clientX-b.rail.drag.x),b.scroll.x<0&&(b.scroll.x=0);var o=b.scrollvaluemaxw;b.scroll.x>o&&(b.scroll.x=o)}else{b.scroll.y=b.rail.drag.sy+(e.touches[0].clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0);var t=b.scrollvaluemax;b.scroll.y>t&&(b.scroll.y=t)}return b.synched("touchmove",function(){b.rail.drag&&3==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*b.scrollratio.x),x.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),x.cursordragspeed))}),b.cancelEvent(e)}}}if(b.onmousedown=function(e,o){if(!b.rail.drag||1==b.rail.drag.pt){if(b.railslocked)return b.cancelEvent(e);b.cancelScroll(),b.rail.drag={x:e.clientX,y:e.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:o||!1};var t=b.getTarget(e);return S.hasmousecapture&&t.setCapture(),b.isiframe&&!S.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"})),b.hasmoving=!1,b.cancelEvent(e)}},b.onmouseup=function(e){if(b.rail.drag)return 1!=b.rail.drag.pt||(S.hasmousecapture&&R.releaseCapture(),b.isiframe&&!S.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),b.rail.drag=!1,b.cursorfreezed=!1,b.hasmoving&&b.triggerScrollEnd(),b.cancelEvent(e))},b.onmousemove=function(e){if(b.rail.drag){if(1!==b.rail.drag.pt)return;if(S.ischrome&&0===e.which)return b.onmouseup(e);if(b.cursorfreezed=!0,b.hasmoving||b.triggerScrollStart(e.clientX,e.clientY,0,0,0),b.hasmoving=!0,b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(e.clientX-b.rail.drag.x),b.scroll.x<0&&(b.scroll.x=0);var o=b.scrollvaluemaxw;b.scroll.x>o&&(b.scroll.x=o)}else{b.scroll.y=b.rail.drag.sy+(e.clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0);var t=b.scrollvaluemax;b.scroll.y>t&&(b.scroll.y=t)}return b.synched("mousemove",function(){b.cursorfreezed&&(b.showCursor(),b.rail.drag.hr?b.scrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.scrollTop(Math.round(b.scroll.y*b.scrollratio.y)))}),b.cancelEvent(e)}b.checkarea=0},S.cantouch||x.emulatetouch)b.onpreventclick=function(e){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(e)},b.onclick=!S.isios&&function(e){return!b.lastmouseup||(b.lastmouseup=!1,b.cancelEvent(e))},x.grabcursorenabled&&S.cursorgrabvalue&&(b.css(b.ispage?b.doc:b.win,{cursor:S.cursorgrabvalue}),b.css(b.rail,{cursor:S.cursorgrabvalue}));else{var h=function(e){if(b.selectiondrag){if(e){var o=b.win.outerHeight(),t=e.pageY-b.selectiondrag.top;0<t&&t<o&&(t=0),o<=t&&(t-=o),b.selectiondrag.df=t}if(0!==b.selectiondrag.df){var r=-2*b.selectiondrag.df/6|0;b.doScrollBy(r),b.debounced("doselectionscroll",function(){h()},50)}}};b.hasTextSelected="getSelection"in R?function(){return 0<R.getSelection().rangeCount}:"selection"in R?function(){return"None"!=R.selection.type}:function(){return!1},b.onselectionstart=function(e){b.ispage||(b.selectiondrag=b.win.offset())},b.onselectionend=function(e){b.selectiondrag=!1},b.onselectiondrag=function(e){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",function(){h(e)},250)}}if(S.hasw3ctouch?(b.css(b.ispage?P("html"):b.win,{"touch-action":"none"}),b.css(b.rail,{"touch-action":"none"}),b.css(b.cursor,{"touch-action":"none"}),b.bind(b.win,"pointerdown",b.ontouchstart),b.bind(R,"pointerup",b.ontouchend),b.delegate(R,"pointermove",b.ontouchmove)):S.hasmstouch?(b.css(b.ispage?P("html"):b.win,{"-ms-touch-action":"none"}),b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,{"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(R,"MSPointerUp",b.ontouchend),b.delegate(R,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(e){e.preventDefault()}),b.bind(b.cursor,"contextmenu",function(e){e.preventDefault()})):S.cantouch&&(b.bind(b.win,"touchstart",b.ontouchstart,!1,!0),b.bind(R,"touchend",b.ontouchend,!1,!0),b.bind(R,"touchcancel",b.ontouchend,!1,!0),b.delegate(R,"touchmove",b.ontouchmove,!1,!0)),x.emulatetouch&&(b.bind(b.win,"mousedown",b.ontouchstart,!1,!0),b.bind(R,"mouseup",b.ontouchend,!1,!0),b.bind(R,"mousemove",b.ontouchmove,!1,!0)),!x.cursordragontouch&&(S.cantouch||x.emulatetouch)||(b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}),x.sensitiverail&&(b.bind(b.rail,"click",function(e){b.doRailClick(e,!1,!1)}),b.bind(b.rail,"dblclick",function(e){b.doRailClick(e,!0,!1)}),b.bind(b.cursor,"click",function(e){b.cancelEvent(e)}),b.bind(b.cursor,"dblclick",function(e){b.cancelEvent(e)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}),x.sensitiverail&&(b.bind(b.railh,"click",function(e){b.doRailClick(e,!1,!0)}),b.bind(b.railh,"dblclick",function(e){b.doRailClick(e,!0,!0)}),b.bind(b.cursorh,"click",function(e){b.cancelEvent(e)}),b.bind(b.cursorh,"dblclick",function(e){b.cancelEvent(e)})))),x.cursordragontouch&&(this.istouchcapable||S.cantouch)&&(b.bind(b.cursor,"touchstart",b.ontouchstartCursor),b.bind(b.cursor,"touchmove",b.ontouchmoveCursor),b.bind(b.cursor,"touchend",b.ontouchendCursor),b.cursorh&&b.bind(b.cursorh,"touchstart",function(e){b.ontouchstartCursor(e,!0)}),b.cursorh&&b.bind(b.cursorh,"touchmove",b.ontouchmoveCursor),b.cursorh&&b.bind(b.cursorh,"touchend",b.ontouchendCursor)),x.emulatetouch||S.isandroid||S.isios?(b.bind(S.hasmousecapture?b.win:R,"mouseup",b.ontouchend),b.onclick&&b.bind(R,"click",b.onclick),x.cursordragontouch?(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.cursorh&&b.bind(b.cursorh,"mousedown",function(e){b.onmousedown(e,!0)}),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onmouseup)):(b.bind(b.rail,"mousedown",function(e){e.preventDefault()}),b.railh&&b.bind(b.railh,"mousedown",function(e){e.preventDefault()}))):(b.bind(S.hasmousecapture?b.win:R,"mouseup",b.onmouseup),b.bind(R,"mousemove",b.onmousemove),b.onclick&&b.bind(R,"click",b.onclick),b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.railh&&(b.bind(b.cursorh,"mousedown",function(e){b.onmousedown(e,!0)}),b.bind(b.cursorh,"mouseup",b.onmouseup)),!b.ispage&&x.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),b.bind(R,"mouseup",b.onselectionend),b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(R,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor(),b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1,b.rail.drag||b.hideCursor()}))),x.enablemousewheel&&(b.isiframe||b.mousewheel(S.isie&&b.ispage?R:b.win,b.onmousewheel),b.mousewheel(b.rail,b.onmousewheel),b.railh&&b.mousewheel(b.railh,b.onmousewheelhr)),b.ispage||S.cantouch||/HTML|^BODY/.test(b.win[0].nodeName)||(b.win.attr("tabindex")||b.win.attr({tabindex:++M}),b.bind(b.win,"focus",function(e){E=b.getTarget(e).id||b.getTarget(e)||!1,b.hasfocus=!0,b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"blur",function(e){E=!1,b.hasfocus=!1}),b.bind(b.win,"mouseenter",function(e){L=b.getTarget(e).id||b.getTarget(e)||!1,b.hasmousefocus=!0,b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"mouseleave",function(e){L=!1,b.hasmousefocus=!1,b.rail.drag||b.hideCursor()})),b.onkeypress=function(e){if(b.railslocked&&0===b.page.maxh)return!0;e=e||_.event;var o=b.getTarget(e);if(o&&/INPUT|TEXTAREA|SELECT|OPTION/.test(o.nodeName)&&(!(o.getAttribute("type")||o.type||!1)||!/submit|button|cancel/i.tp))return!0;if(P(o).attr("contenteditable"))return!0;if(b.hasfocus||b.hasmousefocus&&!E||b.ispage&&!E&&!L){var t=e.keyCode;if(b.railslocked&&27!=t)return b.cancelEvent(e);var r=e.ctrlKey||!1,i=e.shiftKey||!1,s=!1;switch(t){case 38:case 63233:b.doScrollBy(72),s=!0;break;case 40:case 63235:b.doScrollBy(-72),s=!0;break;case 37:case 63232:b.railh&&(r?b.doScrollLeft(0):b.doScrollLeftBy(72),s=!0);break;case 39:case 63234:b.railh&&(r?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),s=!0);break;case 33:case 63276:b.doScrollBy(b.view.h),s=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h),s=!0;break;case 36:case 63273:b.railh&&r?b.doScrollPos(0,0):b.doScrollTo(0),s=!0;break;case 35:case 63275:b.railh&&r?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh),s=!0;break;case 32:x.spacebarenabled&&(i?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),s=!0);break;case 27:b.zoomactive&&(b.doZoom(),s=!0)}if(s)return b.cancelEvent(e)}},x.enablekeyboard&&b.bind(R,S.isopera&&!S.isopera12?"keypress":"keydown",b.onkeypress),b.bind(R,"keydown",function(e){!e.ctrlKey&&1||(b.wheelprevented=!0)}),b.bind(R,"keyup",function(e){e.ctrlKey||!1||(b.wheelprevented=!1)}),b.bind(_,"blur",function(e){b.wheelprevented=!1}),b.bind(_,"resize",b.onscreenresize),b.bind(_,"orientationchange",b.onscreenresize),b.bind(_,"load",b.lazyResize),S.ischrome&&!b.ispage&&!b.haswrapper){var p=b.win.attr("style"),g=parseFloat(b.win.css("width"))+1;b.win.css("width",g),b.synched("chromefix",function(){b.win.attr("style",p)})}if(b.onAttributeChange=function(e){b.lazyResize(b.isieold?250:30)},x.enableobserver&&(b.isie11||!1===B||(b.observerbody=new B(function(e){if(e.forEach(function(e){if("attributes"==e.type)return y.hasClass("modal-open")&&y.hasClass("modal-dialog")&&!P.contains(P(".modal-dialog")[0],b.doc[0])?b.hide():b.show()}),b.me.clientWidth!=b.page.width||b.me.clientHeight!=b.page.height)return b.lazyResize(30)}),b.observerbody.observe(R.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!b.ispage&&!b.haswrapper)){var v=b.win[0];!1!==B?(b.observer=new B(function(e){e.forEach(b.onAttributeChange)}),b.observer.observe(v,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new B(function(e){e.forEach(function(e){if(0<e.removedNodes.length)for(var o in e.removedNodes)if(b&&e.removedNodes[o]===v)return b.remove()})}),b.observerremover.observe(v.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(v,S.isie&&!S.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),S.isie9&&v.attachEvent("onpropertychange",b.onAttributeChange),b.bind(v,"DOMNodeRemoved",function(e){e.target===v&&b.remove()}))}!b.ispage&&x.boxzoom&&b.bind(_,"resize",b.resizeZoom),b.istextarea&&(b.bind(b.win,"keydown",b.lazyResize),b.bind(b.win,"mouseup",b.lazyResize)),b.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var w=function(){var o;b.iframexd=!1;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){o=!(b.iframexd=!0)}if(b.iframexd)return"console"in _&&console.log("NiceScroll error: policy restriced iframe"),!0;if(b.forcescreen=!0,b.isiframe&&(b.iframe={doc:P(o),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=P(b.iframe.body)),!S.isios&&x.iframeautoresize&&!b.isiframe){b.win.scrollTop(0),b.doc.height("");var e=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);b.doc.height(e)}b.lazyResize(30),b.css(P(b.iframe.body),t),S.isios&&b.haswrapper&&b.css(P(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(o,"scroll",b.onscroll),x.enablemousewheel&&b.mousewheel(o,b.onmousewheel),x.enablekeyboard&&b.bind(o,S.isopera?"keypress":"keydown",b.onkeypress),S.cantouch?(b.bind(o,"touchstart",b.ontouchstart),b.bind(o,"touchmove",b.ontouchmove)):x.emulatetouch&&(b.bind(o,"mousedown",b.ontouchstart),b.bind(o,"mousemove",function(e){return b.ontouchmove(e,!0)}),x.grabcursorenabled&&S.cursorgrabvalue&&b.css(P(o.body),{cursor:S.cursorgrabvalue})),b.bind(o,"mouseup",b.ontouchend),b.zoom&&(x.dblclickzoom&&b.bind(o,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(o,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){w.call(b.doc[0],!1)},500),b.bind(this.doc,"load",w)}},this.showCursor=function(e,o){if(b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0),b.rail){if(b.autohidedom&&(b.autohidedom.stop().css({opacity:x.cursoropacitymax}),b.cursoractive=!0),b.rail.drag&&1==b.rail.drag.pt||(void 0!==e&&!1!==e&&(b.scroll.y=e/b.scrollratio.y|0),void 0!==o&&(b.scroll.x=o/b.scrollratio.x|0)),b.cursor.css({height:b.cursorheight,top:b.scroll.y}),b.cursorh){var t=b.hasreversehr?b.scrollvaluemaxw-b.scroll.x:b.scroll.x;b.cursorh.css({width:b.cursorwidth,left:!b.rail.align&&b.rail.visibility?t+b.rail.width:t}),b.cursoractive=!0}b.zoom&&b.zoom.stop().css({opacity:x.cursoropacitymax})}},this.hideCursor=function(e){b.cursortimeout||b.rail&&b.autohidedom&&(b.hasmousefocus&&"leave"===x.autohidemode||(b.cursortimeout=setTimeout(function(){b.rail.active&&b.showonmouseevent||(b.autohidedom.stop().animate({opacity:x.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:x.cursoropacitymin}),b.cursoractive=!1),b.cursortimeout=0},e||x.hidecursordelay)))},this.noticeCursor=function(e,o,t){b.showCursor(o,t),b.rail.active||b.hideCursor(e)},this.getContentSize=b.ispage?function(){return{w:Math.max(R.body.scrollWidth,R.documentElement.scrollWidth),h:Math.max(R.body.scrollHeight,R.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc[0].offsetWidth,h:b.doc[0].offsetHeight}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!b||!b.win)return!1;var t=b.page.maxh,r=b.page.maxw,i=b.view.h,s=b.view.w;if(b.view={w:b.ispage?b.win.width():b.win[0].clientWidth,h:b.ispage?b.win.height():b.win[0].clientHeight},b.page=o||b.getContentSize(),b.page.maxh=Math.max(0,b.page.h-b.view.h),b.page.maxw=Math.max(0,b.page.w-b.view.w),b.page.maxh==t&&b.page.maxw==r&&b.view.w==s&&b.view.h==i){if(b.ispage)return b;var n=b.win.offset();if(b.lastposition){var l=b.lastposition;if(l.top==n.top&&l.left==n.left)return b}b.lastposition=n}return 0===b.page.maxh?(b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail&&(b.rail.scrollable=!1)):(b.page.maxh-=x.railpadding.top+x.railpadding.bottom,b.rail.scrollable=!0),0===b.page.maxw?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh&&(b.railh.scrollable=!1)):(b.page.maxw-=x.railpadding.left+x.railpadding.right,b.railh&&(b.railh.scrollable=x.horizrailenabled)),b.railslocked=b.locked||0===b.page.maxh&&0===b.page.maxw,b.railslocked?(b.ispage||b.updateScrollBar(b.view),!1):(b.hidden||(b.rail.visibility||b.showRail(),b.railh&&!b.railh.visibility&&b.showRailHr()),b.istextarea&&b.win.css("resize")&&"none"!=b.win.css("resize")&&(b.view.h-=20),b.cursorheight=Math.min(b.view.h,Math.round(b.view.h*(b.view.h/b.page.h))),b.cursorheight=x.cursorfixedheight?x.cursorfixedheight:Math.max(x.cursorminheight,b.cursorheight),b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w*(b.view.w/b.page.w))),b.cursorwidth=x.cursorfixedheight?x.cursorfixedheight:Math.max(x.cursorminheight,b.cursorwidth),b.scrollvaluemax=b.view.h-b.cursorheight-(x.railpadding.top+x.railpadding.bottom),b.hasborderbox||(b.scrollvaluemax-=b.cursor[0].offsetHeight-b.cursor[0].clientHeight),b.railh&&(b.railh.width=0<b.page.maxh?b.view.w-b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-(x.railpadding.left+x.railpadding.right)),b.ispage||b.updateScrollBar(b.view),b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/b.scrollvaluemax},b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=b.getScrollTop()/b.scrollratio.y|0,b.scroll.x=b.getScrollLeft()/b.scrollratio.x|0,b.cursoractive&&b.noticeCursor()),b.scroll.y&&0===b.getScrollTop()&&b.doScrollTo(b.scroll.y*b.scrollratio.y|0),b)},this.resize=b.onResize;var c=0;function u(t,r,i,e){b._bind(t,r,function(e){var o={original:e=e||_.event,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return e.preventDefault?e.preventDefault():e.returnValue=!1,!1},stopImmediatePropagation:function(){e.stopImmediatePropagation?e.stopImmediatePropagation():e.cancelBubble=!0}};return"mousewheel"==r?(e.wheelDeltaX&&(o.deltaX=-.025*e.wheelDeltaX),e.wheelDeltaY&&(o.deltaY=-.025*e.wheelDeltaY),o.deltaY||o.deltaX||(o.deltaY=-.025*e.wheelDelta)):o.deltaY=e.detail,i.call(t,o)},e)}this.onscreenresize=function(e){clearTimeout(c);var o=!b.ispage&&!b.haswrapper;o&&b.hideRails(),c=setTimeout(function(){b&&(o&&b.showRails(),b.resize()),c=0},120)},this.lazyResize=function(e){return clearTimeout(c),e=isNaN(e)?240:e,c=setTimeout(function(){b&&b.resize(),c=0},e),b},this.jqbind=function(e,o,t){b.events.push({e:e,n:o,f:t,q:!0}),P(e).on(o,t)};var h=!(this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in R.createElement("div"))b._bind(r,"wheel",o,t||!1);else{var i=void 0!==R.onmousewheel?"mousewheel":"DOMMouseScroll";u(r,i,o,t||!1),"DOMMouseScroll"==i&&u(r,"MozMousePixelScroll",o,t||!1)}});if(S.haseventlistener){try{var p=Object.defineProperty({},"passive",{get:function(){h=!0}});_.addEventListener("test",null,p)}catch(e){}this.stopPropagation=function(e){return e&&(e=e.original?e.original:e).stopPropagation(),!1},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},_.constructor.prototype.addEventListener=R.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},_.constructor.prototype.removeEventListener=R.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||_.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||_.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=O[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;0<=r;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},b.bind(e,o,s.f,r,i),O[o]=s),b.ispage?(s.a=[b.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(b.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=O[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===b.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(b._unbind(e,o,s.l.f),O[o]=null))},this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;b._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){b.events.push({e:e,n:o,f:t,b:r,q:!1}),h&&(i||e==window.document||e==window.document.body||e==window)?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){O[o]?b.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<b.events.length;e++){var o=b.events[e];o.q?o.e.unbind(o.n,o.f):b._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return b.showRail().showRailHr()},this.showRail=function(){return 0===b.page.maxh||!b.ispage&&"none"==b.win.css("display")||(b.rail.visibility=!0,b.rail.css("display","block")),b},this.showRailHr=function(){return b.railh&&(0===b.page.maxw||!b.ispage&&"none"==b.win.css("display")||(b.railh.visibility=!0,b.railh.css("display","block"))),b},this.hideRails=function(){return b.hideRail().hideRailHr()},this.hideRail=function(){return b.rail.visibility=!1,b.rail.css("display","none"),b},this.hideRailHr=function(){return b.railh&&(b.railh.visibility=!1,b.railh.css("display","none")),b},this.show=function(){return b.hidden=!1,b.railslocked=!1,b.showRails()},this.hide=function(){return b.hidden=!0,b.railslocked=!0,b.hideRails()},this.toggle=function(){return b.hidden?b.show():b.hide()},this.remove=function(){for(var e in b.stop(),b.cursortimeout&&clearTimeout(b.cursortimeout),b.delaylist)b.delaylist[e]&&H(b.delaylist[e].h);b.doZoomOut(),b.unbindAll(),S.isie9&&b.win[0].detachEvent("onpropertychange",b.onAttributeChange),!1!==b.observer&&b.observer.disconnect(),!1!==b.observerremover&&b.observerremover.disconnect(),!1!==b.observerbody&&b.observerbody.disconnect(),b.events=null,b.cursor&&b.cursor.remove(),b.cursorh&&b.cursorh.remove(),b.rail&&b.rail.remove(),b.railh&&b.railh.remove(),b.zoom&&b.zoom.remove();for(var o=0;o<b.saved.css.length;o++){var t=b.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}b.saved=!1,b.me.data("__nicescroll","");var r=P.nicescroll;for(var i in r.each(function(e){if(this&&this.id===b.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];r.length--,r.length&&delete r[r.length]}}),b)b[i]=null,delete b[i];b=null},this.scrollstart=function(e){return this.onscrollstart=e,b},this.scrollend=function(e){return this.onscrollend=e,b},this.scrollcancel=function(e){return this.onscrollcancel=e,b},this.zoomin=function(e){return this.onzoomin=e,b},this.zoomout=function(e){return this.onzoomout=e,b},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(0<t.getNiceScroll().length)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(b.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:b.newscrollx,y:b.newscrolly},speed:i};b.onscrollstart.call(b,s)}},this.triggerScrollEnd=function(){if(b.onscrollend){var e=b.getScrollLeft(),o=b.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};b.onscrollend.call(b,t)}};var m=0,f=0,g=0,v=1;function w(e,o,t,r){b.scrollrunning||(b.newscrolly=b.getScrollTop(),b.newscrollx=b.getScrollLeft(),g=X());var i=X()-g;if(g=X(),350<i?v=1:v+=(2-v)/10,o=o*v|0,e=e*v|0){if(r)if(e<0){if(b.getScrollLeft()>=b.page.maxw)return!0}else if(b.getScrollLeft()<=0)return!0;var s=0<e?1:-1;f!==s&&(b.scrollmom&&b.scrollmom.stop(),b.newscrollx=b.getScrollLeft(),f=s),b.lastdeltax-=e}if(o){if(function(){var e=b.getScrollTop();if(o<0){if(e>=b.page.maxh)return!0}else if(e<=0)return!0}()){if(x.nativeparentscrolling&&t&&!b.ispage&&!b.zoomactive)return!0;var n=b.view.h>>1;o=b.newscrolly<-n?(b.newscrolly=-n,-1):b.newscrolly>b.page.maxh+n?(b.newscrolly=b.page.maxh+n,1):0}var l=0<o?1:-1;m!==l&&(b.scrollmom&&b.scrollmom.stop(),b.newscrolly=b.getScrollTop(),m=l),b.lastdeltay-=o}(o||e)&&b.synched("relativexy",function(){var e=b.lastdeltay+b.newscrolly;b.lastdeltay=0;var o=b.lastdeltax+b.newscrollx;b.lastdeltax=0,b.rail.drag||b.doScrollPos(o,e)})}var z=!1;function k(e,o,t){var r,i;if(!t&&z)return!0;0===e.deltaMode?(r=-e.deltaX*(x.mousescrollstep/54)|0,i=-e.deltaY*(x.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*x.mousescrollstep*50/80|0,i=-e.deltaY*x.mousescrollstep*50/80|0),o&&x.oneaxismousemode&&0===r&&i&&(r=i,i=0,!t||(r<0?b.getScrollLeft()>=b.page.maxw:b.getScrollLeft()<=0)&&(i=r,r=0));if(b.isrtlmode&&(r=-r),!w(r,i,t,!0))return z=!1,e.stopImmediatePropagation(),e.preventDefault();t&&(z=!0)}if(this.onmousewheel=function(e){if(b.wheelprevented||b.locked)return!1;if(b.railslocked)return b.debounced("checkunlock",b.resize,250),!1;if(b.rail.drag)return b.cancelEvent(e);if("auto"===x.oneaxismousemode&&0!==e.deltaX&&(x.oneaxismousemode=!1),x.oneaxismousemode&&0===e.deltaX&&!b.rail.scrollable)return!b.railh||!b.railh.scrollable||b.onmousewheelhr(e);var o=X(),t=!1;if(x.preservenativescrolling&&b.checkarea+600<o&&(b.nativescrollingarea=b.isScrollable(e),t=!0),b.checkarea=o,b.nativescrollingarea)return!0;var r=k(e,!1,t);return r&&(b.checkarea=0),r},this.onmousewheelhr=function(e){if(!b.wheelprevented){if(b.railslocked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(e);var o=X(),t=!1;return x.preservenativescrolling&&b.checkarea+600<o&&(b.nativescrollingarea=b.isScrollable(e),t=!0),b.checkarea=o,!!b.nativescrollingarea||(b.railslocked?b.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return b.cancelScroll(),b.scrollmon&&b.scrollmon.stop(),b.cursorfreezed=!1,b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y)),b.noticeCursor(),b},this.getTransitionSpeed=function(e){return 80+e/72*x.scrollspeed|0},x.smoothscroll)if(b.ishwscroll&&S.hastransition&&x.usetransition&&x.smoothscroll){var T="";this.resetTransition=function(){T="",b.doc.css(S.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){var t=o?e:b.getTransitionSpeed(e),r=t+"ms";return T!==r&&(T=r,b.doc.css(S.prefixstyle+"transition-duration",r)),t},this.doScrollLeft=function(e,o){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e=this;if(!e.running){e.running=!0;var o=function(){e.running&&Y(o),b.showCursor(b.getScrollTop(),b.getScrollLeft()),b.notifyScrollEvent(b.win[0])};Y(o)}},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=b.getScrollTop(),i=b.getScrollLeft();if(((b.newscrolly-r)*(o-r)<0||(b.newscrollx-i)*(e-i)<0)&&b.cancelScroll(),x.bouncescroll?(o<0?o=o/2|0:o>b.page.maxh&&(o=b.page.maxh+(o-b.page.maxh)/2|0),e<0?e=e/2|0:e>b.page.maxw&&(e=b.page.maxw+(e-b.page.maxw)/2|0)):(o<0?o=0:o>b.page.maxh&&(o=b.page.maxh),e<0?e=0:e>b.page.maxw&&(e=b.page.maxw)),b.scrollrunning&&e==b.newscrollx&&o==b.newscrolly)return!1;b.newscrolly=o,b.newscrollx=e;var s=b.getScrollTop(),n=b.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=b.prepareTransition(a);b.scrollrunning||(b.scrollrunning=!0,b.triggerScrollStart(n,s,e,o,c),b.cursorupdate.start()),b.scrollendtrapped=!0,S.transitionend||(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollTransitionEnd,c)),b.setScrollTop(b.newscrolly),b.setScrollLeft(b.newscrollx)},this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;var e=b.getScrollTop(),o=b.getScrollLeft();return b.scrollrunning=!1,S.transitionend||clearTimeout(S.transitionend),b.scrollendtrapped=!1,b.resetTransition(),b.setScrollTop(e),b.railh&&b.setScrollLeft(o),b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm),b.timerscroll=!1,b.cursorfreezed=!1,b.cursorupdate.stop(),b.showCursor(e,o),b},this.onScrollTransitionEnd=function(){if(b.scrollendtrapped){var e=b.getScrollTop(),o=b.getScrollLeft();if(e<0?e=0:e>b.page.maxh&&(e=b.page.maxh),o<0?o=0:o>b.page.maxw&&(o=b.page.maxw),e!=b.newscrolly||o!=b.newscrollx)return b.doScrollPos(o,e,x.snapbackspeed);b.scrollrunning&&b.triggerScrollEnd(),b.scrollrunning=!1,b.scrollendtrapped=!1,b.resetTransition(),b.timerscroll=!1,b.setScrollTop(e),b.railh&&b.setScrollLeft(o),b.cursorupdate.stop(),b.noticeCursor(!1,e,o),b.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=b.getScrollTop(),i=b.getScrollLeft();((b.newscrolly-r)*(o-r)<0||(b.newscrollx-i)*(e-i)<0)&&b.cancelScroll();var s=!1;if(b.bouncescroll&&b.rail.visibility||(o<0?s=!(o=0):o>b.page.maxh&&(o=b.page.maxh,s=!0)),b.bouncescroll&&b.railh.visibility||(e<0?s=!(e=0):e>b.page.maxw&&(e=b.page.maxw,s=!0)),b.scrollrunning&&b.newscrolly===o&&b.newscrollx===e)return!0;b.newscrolly=o,b.newscrollx=e,b.dst={},b.dst.x=e-i,b.dst.y=o-r,b.dst.px=i,b.dst.py=r;var n=0|Math.sqrt(b.dst.x*b.dst.x+b.dst.y*b.dst.y),l=b.getTransitionSpeed(n);b.bzscroll={};var a=s?1:.58;b.bzscroll.x=new d(i,b.newscrollx,l,0,0,a,1),b.bzscroll.y=new d(r,b.newscrolly,l,0,0,a,1);X();var c=function(){if(b.scrollrunning){var e=b.bzscroll.y.getPos();b.setScrollLeft(b.bzscroll.x.getNow()),b.setScrollTop(b.bzscroll.y.getNow()),e<=1?b.timer=Y(c):(b.scrollrunning=!1,b.timer=0,b.triggerScrollEnd())}};b.scrollrunning||(b.triggerScrollStart(i,r,e,o,l),b.scrollrunning=!0,b.timer=Y(c))},this.cancelScroll=function(){return b.timer&&H(b.timer),b.timer=0,b.bzscroll=!1,b.scrollrunning=!1,b};else this.doScrollLeft=function(e,o){var t=b.getScrollTop();b.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=b.getScrollLeft();b.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>b.page.maxw?b.page.maxw:e;r<0&&(r=0);var i=o>b.page.maxh?b.page.maxh:o;i<0&&(i=0),b.synched("scroll",function(){b.setScrollTop(i),b.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){w(0,e)},this.doScrollLeftBy=function(e,o){w(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*b.scrollratio.y):e;t<0?t=0:t>b.page.maxh&&(t=b.page.maxh),b.cursorfreezed=!1,b.doScrollTop(e)},this.checkContentSize=function(){var e=b.getContentSize();e.h==b.page.h&&e.w==b.page.w||b.resize(!1,e)},b.onscroll=function(e){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()/b.scrollratio.y),b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()/b.scrollratio.x)),b.noticeCursor()})},b.bind(b.docscroll,"scroll",b.onscroll),this.doZoomIn=function(e){if(!b.zoomactive){b.zoomactive=!0,b.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=b.win[0].style;for(var r in o){var i=o[r];b.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}b.zoomrestore.style.width=b.win.css("width"),b.zoomrestore.style.height=b.win.css("height"),b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()},S.isios4&&(b.zoomrestore.scrollTop=I.scrollTop(),I.scrollTop(0)),b.win.css({position:S.isios4?"absolute":"fixed",top:0,left:0,zIndex:N+100,margin:0});var s=b.win.css("backgroundColor");return""!==s&&!/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(s)||b.win.css("backgroundColor","#fff"),b.rail.css({zIndex:N+101}),b.zoom.css({zIndex:N+102}),b.zoom.css("backgroundPosition","0 -18px"),b.resizeZoom(),b.onzoomin&&b.onzoomin.call(b),b.cancelEvent(e)}},this.doZoomOut=function(e){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),S.isios4&&I.scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0 0"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(e)},this.doZoom=function(e){return b.zoomactive?b.doZoomOut(e):b.doZoomIn(e)},this.resizeZoom=function(){if(b.zoomactive){var e=b.getScrollTop();b.win.css({width:I.width()-b.zoomrestore.padding.w+"px",height:I.height()-b.zoomrestore.padding.h+"px"}),b.onResize(),b.setScrollTop(Math.min(b.page.maxh,e))}},this.init(),P.nicescroll.push(this)}var o,t,r,B=_.MutationObserver||_.WebKitMutationObserver||!1,X=Date.now||function(){return(new Date).getTime()},D={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:(t=R.currentScript||!!(o=R.getElementsByTagName("script")).length&&o[o.length-1],r=t?t.src.split("?")[0]:"",0<r.split("/").length?r.split("/").slice(0,-1).join("/")+"/":""),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1,scrollCLass:!1},A=!1,q=function(e){var f=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,o){f.stop(),f.steptime=0,f.lasttime=X(),f.speedx=0,f.speedy=0,f.lastx=e,f.lasty=o,f.lastscrollx=-1,f.lastscrolly=-1},this.update=function(e,o){var t=X();f.steptime=t-f.lasttime,f.lasttime=t;var r=o-f.lasty,i=e-f.lastx,s=f.nc.getScrollTop()+r,n=f.nc.getScrollLeft()+i;f.snapx=n<0||n>f.nc.page.maxw,f.snapy=s<0||s>f.nc.page.maxh,f.speedx=i,f.speedy=r,f.lastx=e,f.lasty=o},this.stop=function(){f.nc.unsynched("domomentum2d"),f.timer&&clearTimeout(f.timer),f.timer=0,f.lastscrollx=-1,f.lastscrolly=-1},this.doSnapy=function(e,o){var t=!1;o<0?t=!(o=0):o>f.nc.page.maxh&&(o=f.nc.page.maxh,t=!0),e<0?t=!(e=0):e>f.nc.page.maxw&&(e=f.nc.page.maxw,t=!0),t?f.nc.doScrollPos(e,o,f.nc.opt.snapbackspeed):f.nc.triggerScrollEnd()},this.doMomentum=function(e){var o=X(),t=e?o+e:f.lasttime,r=f.nc.getScrollLeft(),i=f.nc.getScrollTop(),s=f.nc.page.maxh,n=f.nc.page.maxw;f.speedx=0<n?Math.min(60,f.speedx):0,f.speedy=0<s?Math.min(60,f.speedy):0;var l=t&&o-t<=60;(i<0||s<i||r<0||n<r)&&(l=!1);var a=!(!f.speedy||!l)&&f.speedy,c=!(!f.speedx||!l)&&f.speedx;if(a||c){var d=Math.max(16,f.steptime);if(50<d){var u=d/50;f.speedx*=u,f.speedy*=u,d=50}f.demulxy=0,f.lastscrollx=f.nc.getScrollLeft(),f.chkx=f.lastscrollx,f.lastscrolly=f.nc.getScrollTop(),f.chky=f.lastscrolly;var h=f.lastscrollx,p=f.lastscrolly,m=function(){var e=600<X()-o?.04:.02;f.speedx&&(h=Math.floor(f.lastscrollx-f.speedx*(1-f.demulxy)),((f.lastscrollx=h)<0||n<h)&&(e=.1)),f.speedy&&(p=Math.floor(f.lastscrolly-f.speedy*(1-f.demulxy)),((f.lastscrolly=p)<0||s<p)&&(e=.1)),f.demulxy=Math.min(1,f.demulxy+e),f.nc.synched("domomentum2d",function(){if(f.speedx){f.nc.getScrollLeft();f.chkx=h,f.nc.setScrollLeft(h)}if(f.speedy){f.nc.getScrollTop();f.chky=p,f.nc.setScrollTop(p)}f.timer||(f.nc.hideCursor(),f.doSnapy(h,p))}),f.demulxy<1?f.timer=setTimeout(m,d):(f.stop(),f.nc.hideCursor(),f.doSnapy(h,p))};m()}else f.doSnapy(f.nc.getScrollLeft(),f.nc.getScrollTop())}},i=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():i.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):i.call(e,o),this}},e.fn.scrollTop=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(o)):i.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollTop():i.call(this)};var n=e.fn.scrollLeft;P.cssHooks.pageXOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():n.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):n.call(e,o),this}},e.fn.scrollLeft=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(o)):n.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollLeft():n.call(this)};function a(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return P.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=P.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this}!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(a.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new a(this):this[e]&&P.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==P.data(e,"__nicescroll")},P.fn.niceScroll=function(i,s){void 0!==s||"object"!=typeof i||"jquery"in i||(s=i,i=!1);var n=new a;return this.each(function(){var e=P(this),o=P.extend({},s);if(i){var t=P(i);o.doc=1<t.length?P(i,e):t,o.win=e}!("doc"in o)||"win"in o||(o.win=e);var r=e.data("__nicescroll")||!1;r||(o.doc=o.doc||e,r=new l(o,e),e.data("__nicescroll",r)),n.push(r)}),1===n.length?n[0]:n},_.NiceScroll={getjQuery:function(){return e}},P.nicescroll||(P.nicescroll=new a,P.nicescroll.options=D)}); 2 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery.nicescroll", 3 | "version": "3.7.6", 4 | "bugs": "https://github.com/inuyaksa/jquery.nicescroll/issues", 5 | "repository": { 6 | "type": "git", 7 | "url": "git@github.com:inuyaksa/jquery.nicescroll.git" 8 | }, 9 | "title": "jQuery.NiceScroll", 10 | "author": { 11 | "name": "InuYaksa", 12 | "url": "https://github.com/inuyaksa" 13 | }, 14 | "license": "MIT", 15 | "autoupdate": { 16 | "source": "git", 17 | "target": "git://github.com/inuyaksa/jquery.nicescroll.git", 18 | "basePath": "dist", 19 | "files": [ 20 | "**/*" 21 | ] 22 | }, 23 | "description": "Nicescroll is a jquery plugin, for nice customizabled scrollbars with a very similar ios/mobile style. It supports DIVs, IFrames and document page (body) scrollbars. Compatible with modern browsers Chrome/Firefox/Edge/Safari/Opera for smartphone ios/android and desktop pc/mac: iphone/ipad/ipod, android, surface, pc (chrome/firefox) mac (safari/chrome). Compatibile with older browers too, such as IE11/10/9, some limitations could exists.", 24 | "keywords": [ 25 | "nicescroll", 26 | "jquery", 27 | "jquery-plugin", 28 | "ecosystem:jquery", 29 | "interface", 30 | "window", 31 | "dom", 32 | "div", 33 | "scroll", 34 | "ios", 35 | "mobile", 36 | "desktop", 37 | "scrollbar", 38 | "touch", 39 | "android", 40 | "chrome", 41 | "firefox", 42 | "safari", 43 | "surface", 44 | "edge" 45 | ], 46 | "homepage": "https://github.com/inuyaksa/jquery.nicescroll", 47 | "contributors": [ 48 | "inuyaksa", 49 | "GianlucaGuarini", 50 | "nkovacs", 51 | "zcourts", 52 | "philleepflorence", 53 | "gustavnikolaj", 54 | "laychopy", 55 | "barraq", 56 | "efoxbr", 57 | "hypesystem", 58 | "schweighart", 59 | "ephigabay", 60 | "shinnn", 61 | "TNKSoftware" 62 | ], 63 | "files": [ 64 | "dist/jquery.nicescroll.js", 65 | "dist/jquery.nicescroll.min.js", 66 | "dist/zoomico.png" 67 | ], 68 | "main": "jquery.nicescroll.js", 69 | "dependencies": { 70 | "jquery": ">=1.8.3" 71 | }, 72 | "npmName": "jquery.nicescroll", 73 | "npmFileMap": [ 74 | { 75 | "basePath": "/dist/", 76 | "files": [ 77 | "*.js", 78 | "zoomico.png" 79 | ] 80 | } 81 | ] 82 | } 83 | -------------------------------------------------------------------------------- /zoomico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inuyaksa/jquery.nicescroll/fa29e019220e10b7c67a10c07018c3377596b02c/zoomico.png --------------------------------------------------------------------------------