├── .gitignore ├── Gruntfile.js ├── IIIFBookReader.js ├── README.md └── example ├── css └── main.css ├── index.html └── js ├── lib ├── BookReader │ ├── BookReader.css │ ├── BookReader.js │ ├── BookReaderEmbed.css │ ├── BookReaderLending.css │ ├── dragscrollable.js │ ├── excanvas.compiled.js │ ├── images │ │ ├── BRicons.png │ │ ├── back_pages.png │ │ ├── book_bottom_icon.png │ │ ├── book_down_icon.png │ │ ├── book_left_icon.png │ │ ├── book_leftmost_icon.png │ │ ├── book_right_icon.png │ │ ├── book_rightmost_icon.png │ │ ├── book_top_icon.png │ │ ├── book_up_icon.png │ │ ├── booksplit.png │ │ ├── control_pause_icon.png │ │ ├── control_play_icon.png │ │ ├── embed_icon.png │ │ ├── icon_OL-logo-xs.png │ │ ├── icon_alert-xs.png │ │ ├── icon_close-pop.png │ │ ├── icon_home.png │ │ ├── icon_indicator.png │ │ ├── icon_zoomer.png │ │ ├── left_edges.png │ │ ├── logo_icon.png │ │ ├── marker_chap-off.png │ │ ├── marker_chap-on.png │ │ ├── marker_srch-off.png │ │ ├── marker_srch-on.png │ │ ├── marker_srchchap-off.png │ │ ├── marker_srchchap-on.png │ │ ├── nav_control-dn.png │ │ ├── nav_control-up.png │ │ ├── nav_control.png │ │ ├── one_page_mode_icon.png │ │ ├── print_icon.png │ │ ├── progressbar.gif │ │ ├── right_edges.png │ │ ├── slider.png │ │ ├── thumbnail_mode_icon.png │ │ ├── transparent.png │ │ ├── two_page_mode_icon.png │ │ ├── zoom_in_icon.png │ │ └── zoom_out_icon.png │ ├── jquery-1.4.2.min.js │ ├── jquery-ui-1.8.1.custom.min.js │ ├── jquery-ui-1.8.5.custom.min.js │ ├── jquery.bt.min.js │ ├── jquery.colorbox-min.js │ ├── jquery.ui.ipad.js │ └── touch │ │ ├── BookReaderTouch.css │ │ └── images │ │ ├── book_bottom_icon.png │ │ ├── book_down_icon.png │ │ ├── book_left_icon.png │ │ ├── book_leftmost_icon.png │ │ ├── book_right_icon.png │ │ ├── book_rightmost_icon.png │ │ ├── book_top_icon.png │ │ ├── book_up_icon.png │ │ ├── control_pause_icon.png │ │ ├── control_play_icon.png │ │ ├── embed_icon.png │ │ ├── logo_icon.png │ │ ├── one_page_mode_icon.png │ │ ├── print_icon.png │ │ ├── thumbnail_mode_icon.png │ │ ├── two_page_mode_icon.png │ │ ├── zoom_in_icon.png │ │ └── zoom_out_icon.png └── IIIFBookReader.js └── main.js /.gitignore: -------------------------------------------------------------------------------- 1 | /nbproject -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/Gruntfile.js -------------------------------------------------------------------------------- /IIIFBookReader.js: -------------------------------------------------------------------------------- 1 | // Bind to the BookReader object providing facilities to set the necessary 2 | // BookReader functions from a IIIF endpoint URL. 3 | 4 | (function(BR){ 5 | 6 | BR.prototype.IIIF = function (config) { 7 | // config should have the url of a sequence 8 | // within a passed-in manifest. 9 | var brInstance = this; 10 | brInstance.IIIFsequence = { 11 | title: null, 12 | imagesList: [], 13 | numPages: null, 14 | bookUrl: null 15 | }; 16 | oldInit = brInstance.init; 17 | oldMode = brInstance.mode; 18 | brInstance.init = function() { 19 | load(config); 20 | }; 21 | brInstance.mode = 2; 22 | 23 | function bindBRMethods(){ 24 | brInstance.getPageNum = function(index) { 25 | return index+1; 26 | }; 27 | 28 | brInstance.getSpreadIndices = function(pindex) { 29 | var spreadIndices = [null, null]; 30 | if ('rl' == brInstance.pageProgression) { 31 | // Right to Left 32 | if (brInstance.getPageSide(pindex) == 'R') { 33 | spreadIndices[1] = pindex; 34 | spreadIndices[0] = pindex + 1; 35 | } else { 36 | // Given index was LHS 37 | spreadIndices[0] = pindex; 38 | spreadIndices[1] = pindex - 1; 39 | } 40 | } else { 41 | // Left to right 42 | if (brInstance.getPageSide(pindex) == 'L') { 43 | spreadIndices[0] = pindex; 44 | spreadIndices[1] = pindex + 1; 45 | } else { 46 | // Given index was RHS 47 | spreadIndices[1] = pindex; 48 | spreadIndices[0] = pindex - 1; 49 | } 50 | } 51 | 52 | return spreadIndices; 53 | }; 54 | 55 | brInstance.getPageSide = function(index) { 56 | if (0 == (index & 0x1)) { 57 | return 'R'; 58 | } else { 59 | return 'L'; 60 | } 61 | }; 62 | 63 | brInstance.getPageHeight = function(index) { 64 | console.log(index); 65 | var fullWidth = brInstance.IIIFsequence.imagesList[index].width, 66 | fullHeight = brInstance.IIIFsequence.imagesList[index].height, 67 | scaleRatio = config.maxWidth/fullWidth; 68 | 69 | return fullHeight*scaleRatio; 70 | }; 71 | 72 | brInstance.getPageWidth = function(index) { 73 | var fullWidth = brInstance.IIIFsequence.imagesList[index].width, 74 | scaleRatio = config.maxWidth/fullWidth; 75 | 76 | return fullWidth*scaleRatio; 77 | }; 78 | 79 | brInstance.getPageURI = function(index) { 80 | // Finds the image info.json url 81 | // from the loaded sequence and returns the 82 | // IIIF-formatted url for the page image 83 | // based on the provided configuration object 84 | // (adjusting for width, etc.). 85 | var infoJsonUrl = brInstance.IIIFsequence.imagesList[index].imageUrl; 86 | var url = infoJsonUrl + "/full/" + config.maxWidth + ",/0/native.jpg"; 87 | return url; 88 | }; 89 | 90 | } 91 | 92 | function load(config) { 93 | 94 | endpointUrl = config.url, 95 | sequenceId = config.sequenceId; 96 | 97 | jQuery.ajax({ 98 | url: endpointUrl.replace(/^\s+|\s+$/g, ''), 99 | dataType: 'json', 100 | async: true, 101 | 102 | success: function(jsonLd) { 103 | brInstance.jsonLd = jsonLd; 104 | brInstance.bookTitle = jsonLd.label; 105 | brInstance.bookUrl = '#'; 106 | parseSequence(sequenceId); 107 | bindBRMethods(); 108 | 109 | // Call the old initialisation after 110 | // the urls are finished. A better implementation 111 | // would be to employ promises (Likely by including 112 | // the Q Promises/A+ implementation. See issue #1 at 113 | // github. 114 | oldInit.call(brInstance); 115 | 116 | // // The following is an attrocious hack and must not 117 | // // be allowed to persist. See issue #2 at github.com 118 | // setTimeout(function() { jQuery(window).trigger('resize'); console.log("resize event fired")}, 2500); 119 | }, 120 | 121 | error: function() { 122 | console.log('Failed loading ' + brInstance.uri); 123 | } 124 | 125 | }); 126 | 127 | } 128 | 129 | function parseSequence(sequenceId) { 130 | 131 | jQuery.each(brInstance.jsonLd.sequences, function(index, sequence) { 132 | if (sequence['@id'] === sequenceId) { 133 | brInstance.IIIFsequence.title = "here's a sequence"; 134 | brInstance.numLeafs = 515; 135 | brInstance.IIIFsequence.bookUrl = "http://iiif.io"; 136 | brInstance.IIIFsequence.imagesList = getImagesList(sequence); 137 | } 138 | }); 139 | 140 | delete brInstance.jsonLd; 141 | 142 | } 143 | 144 | function getImagesList(sequence) { 145 | var imagesList = []; 146 | 147 | jQuery.each(sequence.canvases, function(index, canvas) { 148 | var imageObj; 149 | 150 | if (canvas['@type'] === 'sc:Canvas') { 151 | var images = canvas.resources || canvas.images; 152 | 153 | jQuery.each(images, function(index, image) { 154 | if (image['@type'] === 'oa:Annotation') { 155 | imageObj = getImageObject(image); 156 | imageObj.canvasWidth = canvas.width; 157 | imageObj.canvasHeight = canvas.height; 158 | 159 | if (!(/#xywh/).test(image.on)) { 160 | imagesList.push(imageObj); 161 | } 162 | } 163 | }); 164 | 165 | } 166 | }); 167 | 168 | return imagesList; 169 | } 170 | 171 | function getImageObject (image) { 172 | var resource = image.resource; 173 | 174 | if (resource.hasOwnProperty('@type') && resource['@type'] === 'oa:Choice') { 175 | var imageObj = getImageProperties(resource.default); 176 | } else { 177 | imageObj = getImageProperties(resource); 178 | } 179 | 180 | return(imageObj); 181 | } 182 | 183 | function getImageProperties(image) { 184 | var imageObj = { 185 | height: image.height || 0, 186 | width: image.width || 0, 187 | imageUrl: image.service['@id'].replace(/\/$/, ''), 188 | }; 189 | 190 | imageObj.aspectRatio = (imageObj.width / imageObj.height) || 1; 191 | 192 | return imageObj; 193 | } 194 | 195 | }; 196 | 197 | })(BookReader); 198 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IIIF Adapter for the OpenLibrary BookReader 2 | ## Introduction 3 | The following simple plugin is designed to extend the Internet Archive's [ BookReader javascript library ](https://github.com/openlibrary/bookreader), part of their [ OpenLibrary ](https://openlibrary.org/) project, so that IABookReader instances can consume images served from a IIIF-compatible backend. Many of the world's top universities, libraries, museums, and repositories have made thousands of previously inaccessible, rare resources freely and interoperably available using the IIIF API specifications. For more information, explore the documentation on [iiif.io](http://www.iiif.io). 4 | 5 | ## Usage 6 | For a simple usage example, have a look in the [example directory](https://github.com/aeschylus/IIIFBookReader/tree/master/example), or view the source of the available [live demo](http://aeschylus.github.io/IIIFBookReader/). 7 | -------------------------------------------------------------------------------- /example/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Custom overrides for BookReader Demo. 3 | */ 4 | 5 | /* Hide print and embed functionality */ 6 | #BRtoolbar .embed, .print { 7 | display: none; 8 | } 9 | -------------------------------------------------------------------------------- /example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bookreader demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | Internet Archive BookReader Demo
25 | 26 | 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/js/lib/BookReader/BookReader.css: -------------------------------------------------------------------------------- 1 | body { 2 | /* XXX we shouldn't change the body CSS, just within our container */ 3 | background-color: #9A9B9D; /* Pantone Cool Grey 7 C */ 4 | font-size: 67.5%; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | h3 { 9 | font-size: 20px; 10 | font-family: "News Gothic MT","Trebuchet MS",Geneva,Helvetica,sans-serif; 11 | font-weight: 700; 12 | color: #dedede; 13 | } 14 | a { 15 | outline: none; 16 | } 17 | #BookReader { 18 | position:absolute; 19 | font-family: arial, sans-serif; 20 | left:0; 21 | right:0; 22 | top:0; 23 | bottom:0; 24 | } 25 | #BRtoolbar { 26 | position: relative; 27 | top: 0; 28 | left: 0; 29 | height: 40px; 30 | padding: 0; 31 | width: 100%; 32 | z-index: 100; 33 | background-color: #e2dcc5; 34 | -webkit-box-shadow: 0 1px 3px #999; 35 | /* Shadow here on FF causes scroll bars */ 36 | overflow: hidden; 37 | } 38 | #BRtoolbar .label { 39 | font-size: 1.1em; 40 | color: #999; 41 | } 42 | #BRtoolbar a { 43 | color: #ccc; 44 | text-decoration: underline; 45 | } 46 | #BRtoolbarbuttons { 47 | float: right; 48 | } 49 | #BRcontainer { 50 | top:0; 51 | bottom:0; 52 | width:100%; 53 | z-index: 1; 54 | overflow-x:auto; 55 | overflow-y:scroll; 56 | position:absolute; 57 | background-color: #9A9B9D; 58 | _height: expression(documentElement.clientHeight); 59 | } 60 | 61 | #BRpageview { 62 | /* XXX page view div is not being placed correctly */ 63 | background-color: #9A9B9D; 64 | } 65 | 66 | .BRpagediv1up { 67 | overflow:hidden; 68 | cursor: move; 69 | background-color: #FEFDEB; 70 | -webkit-box-shadow: 1px 1px 2px #333; 71 | -moz-box-shadow: 1px 1px 2px #333; 72 | box-shadow: 1px 1px 2px #333; 73 | } 74 | 75 | .BRpagedivthumb { 76 | background-color: #FEFDEB; 77 | overflow:hidden; 78 | -webkit-box-shadow: 1px 1px 2px #333; 79 | -moz-box-shadow: 1px 1px 2px #333; 80 | box-shadow: 1px 1px 2px #333; 81 | 82 | } 83 | 84 | .BRpagedivthumb a { 85 | border: 0; 86 | } 87 | 88 | .BRpagedivthumb img { 89 | border: 0; 90 | } 91 | 92 | /* Must come after .BRpagedivthumb rules in order to override them */ 93 | /* 94 | .BRpagedivthumb_highlight { 95 | background-color: #9A9B9D; 96 | overflow:hidden; 97 | } 98 | */ 99 | 100 | .BRpagediv2up { 101 | background-color: rgb(234, 226, 205); 102 | overflow:hidden; 103 | } 104 | 105 | #BRbookcover { 106 | /* border: 1px solid rgb(68, 25, 17); */ 107 | /* background-color: #663929; */ 108 | position: absolute; 109 | background-image: url(images/back_pages.png); 110 | -moz-box-shadow: 1px 0 10px #111; 111 | -webkit-box-shadow: 1px 0 10px #111; 112 | box-shadow: 1px 0 10px #111; 113 | /* -moz-border-radius: 6px; */ 114 | /* -webkit-border-radius: 6px; */ 115 | } 116 | 117 | .BRpageimage { 118 | /* Bird Book */ 119 | background-color: #FEFDEB; 120 | } 121 | 122 | /* Disable selection on Firefox and WebKit */ 123 | .BRnoselect { 124 | -moz-user-select: none; 125 | -webkit-user-select: none; 126 | -webkit-user-drag: none; 127 | } 128 | 129 | .BRleafEdgeR { 130 | /* 131 | border-style: solid solid solid none; 132 | border-color: rgb(51, 51, 34); 133 | border-width: 1px 1px 1px 0px; 134 | */ 135 | background: transparent url(images/back_pages.png) repeat scroll 0% 0%; 136 | position: absolute; 137 | } 138 | 139 | .BRleafEdgeL { 140 | /* 141 | border-style: solid none solid solid; 142 | border-color: rgb(51, 51, 34); 143 | border-width: 1px 0px 1px 1px; 144 | */ 145 | /* background: transparent url(images/left_edges.png) repeat scroll 0% 0%; */ 146 | background: transparent url(images/back_pages.png) repeat scroll 0% 0%; /* XXXmang replace file */ 147 | position: absolute; 148 | } 149 | 150 | .BRleafEdgeTmp { 151 | border-style: solid none solid solid; 152 | border-color: rgb(51, 51, 34); 153 | border-width: 1px 0px 1px 1px; 154 | /* background: transparent url(images/left_edges.png) repeat scroll 0% 0%; */ 155 | background: transparent url(images/back_pages.png) repeat scroll 0% 0%; /* XXXmang replace file */ 156 | position: absolute; 157 | } 158 | 159 | #BRgutter { 160 | /* border: 1px solid rgb(68, 25, 17); */ 161 | position: absolute; 162 | z-index: 6; 163 | background: transparent url(images/booksplit.png) repeat scroll 0% 0%; 164 | } 165 | 166 | .BookReaderSearchHilite { 167 | opacity: 0.20; 168 | filter: alpha(opacity = 20); 169 | background-color: #00f; 170 | position:absolute; 171 | } 172 | 173 | .hidden { 174 | display: none; 175 | } 176 | 177 | .BRpageform { 178 | display: inline; 179 | } 180 | #BRpagenum { 181 | border: none; 182 | background-color: #9A9B9D; 183 | color: #ccc; 184 | font-family: arial, sans-serif; 185 | font-size: 12px; 186 | font-weight: 700; 187 | } 188 | #BRreturn { 189 | /* display: block; */ 190 | /* float: left; */ 191 | /* margin: 0 10px 0 5px; */ 192 | font-family: "Lucida Grande","Arial",sans-serif; 193 | color: #333; 194 | height: 100%; 195 | line-height: 38px; 196 | } 197 | #BRreturn span { 198 | font-size: 11px; 199 | display: block; 200 | height: 12px; 201 | padding-top: 3px; 202 | } 203 | #BRreturn a { 204 | font-size: 15px; 205 | display: block; 206 | color: #036daa; 207 | /* height: 18px; */ 208 | overflow: hidden; 209 | } 210 | .BRicon { 211 | display: block; 212 | float: left; 213 | width: 40px; 214 | height: 40px; 215 | padding: 0; 216 | margin: 0; 217 | vertical-align: middle; 218 | border: none; 219 | cursor: pointer; 220 | background-color: transparent; 221 | background-image: url(images/BRicons.png); 222 | background-repeat: no-repeat; 223 | } 224 | 225 | .BRicon.logo {background-position:0 0;} 226 | .BRicon.info {background-position:-40px 0;} 227 | .BRicon.info:hover {background-position:-80px 0;} 228 | .BRicon.share {background-position:-120px 0;} 229 | .BRicon.share:hover {background-position:-160px 0;} 230 | .BRicon.read {background-position:-200px 0;} 231 | .BRicon.read:hover {background-position:-240px 0;} 232 | .BRicon.unread {background-position:-280px 0;} 233 | .BRicon.unread:hover {background-position:-320px 0;} 234 | .BRicon.full {background-position:-360px 0;} 235 | .BRicon.full:hover {background-position:-400px 0;} 236 | .BRicon.book_left {background-position:-440px 0;} 237 | .BRicon.book_left:hover {background-position:-480px 0;} 238 | .BRicon.book_right {background-position:-520px 0;} 239 | .BRicon.book_right:hover {background-position:-560px 0;} 240 | .BRicon.zoom_out {background-position:-600px 0;} 241 | .BRicon.zoom_out:hover {background-position:-640px 0;} 242 | .BRicon.zoom_in {background-position:-680px 0;} 243 | .BRicon.zoom_in:hover {background-position:-720px 0;} 244 | .BRicon.play {background-position:-760px 0;} 245 | .BRicon.play:hover {background-position:-800px 0;} 246 | .BRicon.pause {background-position:-840px 0;} 247 | .BRicon.pause:hover {background-position:-880px 0;} 248 | .BRicon.twopg {background-position:-920px 0;} 249 | .BRicon.twopg:hover {background-position:-960px 0;} 250 | .BRicon.onepg {background-position:-1000px 0;} 251 | .BRicon.onepg:hover {background-position:-1040px 0;} 252 | .BRicon.thumb {background-position:-1080px 0;} 253 | .BRicon.thumb:hover {background-position:-1120px 0;} 254 | .BRicon.fit {background-position:-1160px 0;} 255 | .BRicon.fit:hover {background-position:-1200px 0;} 256 | 257 | 258 | a.logo { 259 | display: block; 260 | float: left; 261 | width: 40px; 262 | height: 40px; 263 | margin: 0 5px; 264 | background: transparent url(images/icon_home.png) no-repeat 0 0; 265 | } 266 | a.popOff { 267 | position: absolute; 268 | top: 5px; 269 | right: 5px; 270 | width: 24px; 271 | height: 24px; 272 | background-image: url(images/BRicons.png); 273 | background-color: transparent; 274 | background-repeat: no-repeat; 275 | background-position: -1050px 0; 276 | } 277 | a.popOff:hover { 278 | background-position: -1100px 0; 279 | } 280 | a.popOff span { 281 | position: absolute; 282 | left: -10000px; 283 | } 284 | 285 | form#booksearch { 286 | float: left; 287 | margin-right: 10px; 288 | } 289 | form#booksearch input[type=search] { 290 | min-width: 16em; 291 | height: 22px; 292 | line-height: 22px; 293 | font-family: "Arial", sans-serif; 294 | font-size: 13px; 295 | -webkit-appearance: textfield; 296 | -moz-appearance: textfield; 297 | appearance: field; 298 | margin: 9px 0 0 0; 299 | padding: 0; 300 | border: 1px inset #ccc; 301 | outline: none; 302 | } 303 | form#booksearch button { 304 | width: 30px; 305 | height: 24px; 306 | line-height: 24px; 307 | border: none; 308 | background-color: #000; 309 | text-align: center; 310 | color: #fff; 311 | font-family: "News Gothic MT","Trebuchet MS",Geneva,Helvetica,sans-serif; 312 | font-weight: 700; 313 | font-size: 11px; 314 | text-transform: uppercase; 315 | margin: 10px 0 0 5px; 316 | -webkit-border-radius: 3px; 317 | -moz-border-radius: 3px; 318 | border-radius: 3px; 319 | } 320 | 321 | .BRlogotype { 322 | float:left; 323 | font-weight: bold; 324 | height: 25px; 325 | line-height: 25px; 326 | vertical-align: middle; 327 | } 328 | 329 | a.BRwhite { color: #fff } 330 | a.BRwhite:hover { text-decoration: none; } 331 | a.BRwhite:visited { color: #fff } 332 | 333 | a.BRblack { color: #000; } 334 | a.BRblack:hover { text-decoration: none; } 335 | a.BRblack:visited { color: #000; } 336 | 337 | a.BRgrey { color: #999; } 338 | a.BRgrey:hover { text-decoration: none; } 339 | a.BRgrey:visited { color: #666; } 340 | 341 | .BRnavlinks { 342 | float:right; 343 | padding: 0 20px 0 0; 344 | margin: 0; 345 | height: 25px; 346 | line-height: 25px; 347 | vertical-align: middle; 348 | } 349 | 350 | /* thumnbail view, from Rebecca's demo */ 351 | .BRpdstatus-footer { 352 | position:absolute; 353 | height: 65px; 354 | bottom: 25px; 355 | width: 100%; 356 | background-color: #222; 357 | text-align: right; 358 | padding: 0px 0px 0px 0px; 359 | } 360 | 361 | .BRwidgetlabel { 362 | color: #919070; 363 | padding: 8px 8px 4px 8px; 364 | font-family: verdana, arial, helvetica, sans-serif; 365 | font-size: 10px; 366 | float: left; 367 | } 368 | 369 | .BRfliparea { 370 | /* Required to capture mouse on IE */ 371 | background-image: url(images/transparent.png); 372 | } 373 | 374 | .BRtwoPagePopUp { 375 | padding: 6px; 376 | position: absolute; 377 | font-family: Arial, sans-serif; 378 | font-size: 11px; 379 | color: white; 380 | background-color: #9A9B9D; 381 | opacity: 0.85, 382 | -webkit-border-radius: 4px; 383 | -moz-border-radius: 4px; 384 | border-radius: 4px; 385 | white-space: nowrap; 386 | } 387 | 388 | /* COLORBOX POP-UP */ 389 | 390 | #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999;} 391 | #cboxOverlay{position:fixed; width:100%; height:100%;background:#000;opacity:0.75;filter:Alpha(Opacity=75);} 392 | #cboxMiddleLeft, #cboxBottomLeft{clear:left;} 393 | #cboxContent{position:relative;} 394 | #cboxLoadedContent{overflow:visible!important;} 395 | #cboxLoadedContent iframe{display:block;border:0;} 396 | #cboxTitle{margin:0;display:none!important;} 397 | #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:25px; left:25px; width:100%;} 398 | #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} 399 | #cboxClose{display:none!important;} 400 | 401 | #colorBox{} 402 | #cboxContent{background:#fff;padding:0;border:10px solid #615132;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;-moz-box-shadow: 1px 3px 10px #000;-webkit-box-shadow: 1px 3px 10px #000;box-shadow: 1px 3px 10px #000;} 403 | #cboxLoadedContent{background:#fff;margin:0;} 404 | #cboxLoadingOverlay{background:transparent;} 405 | .BRfloat * { 406 | margin: 0; 407 | padding: 0; 408 | } 409 | .BRfloat { 410 | position: relative; 411 | background: #fff; 412 | text-align: left; 413 | min-width: 600px; 414 | font-family: "Lucida Grande", "Verdana", "Arial", sans-serif; 415 | color: #000; 416 | } 417 | .BRfloat a { 418 | color: #036daa; 419 | } 420 | .BRfloat a:hover { 421 | color: #35672e; 422 | } 423 | .BRfloat a.title { 424 | color: #000; 425 | text-decoration: none; 426 | } 427 | .BRfloat a.title:hover { 428 | color: #036daa; 429 | text-decoration: underline; 430 | } 431 | .BRfloatHead { 432 | background-color: #615132; 433 | height: 32px; 434 | line-height: 32px; 435 | padding: 0 10px 10px 0; 436 | font-family: "News Gothic MT","Trebuchet MS",Geneva,Helvetica,sans-serif; 437 | font-size: 3em; 438 | font-weight: 700; 439 | color: #fff; 440 | } 441 | .BRfloat a.floatShut {position:absolute;top:0;right:0;display:block;width:32px;height:32px;background-image:url("images/icon_close-pop.png");background-position:0 0;background-repeat:no-repeat;} 442 | .BRfloat a.floatShut:hover {background-position:0 -32px;} 443 | .BRfloat fieldset { 444 | margin-top: 20px; 445 | padding: 10px 20px; 446 | border: none; 447 | } 448 | .BRfloat fieldset.sub { 449 | margin-top: 0px; 450 | padding: 10px; 451 | } 452 | .BRfloat fieldset.center { 453 | text-align: center; 454 | padding: 10px 20px 30px; 455 | } 456 | .BRfloat label { 457 | display: block; 458 | font-weight: 700; 459 | font-size: 1.6em; 460 | margin: 5px 0; 461 | } 462 | .BRfloat label.sub { 463 | display: inline; 464 | padding: 10px 30px 10px 0; 465 | font-weight: normal; 466 | font-size: 1.4em; 467 | color: #666; 468 | } 469 | .BRfloat input[type=text], 470 | .BRfloat textarea { 471 | display: block; 472 | margin-top: 10px; 473 | width: 570px; 474 | padding: 3px; 475 | border: 2px inset; 476 | font-family: "Lucida Grande", "Verdana", "Arial", sans-serif; 477 | font-size: 1.4em; 478 | line-height: 1.5em; 479 | font-weight: normal; 480 | } 481 | .BRfloat textarea { 482 | height: 85px; 483 | } 484 | .BRfloat button[type=button] { 485 | font-size: 2em; 486 | padding: 5px; 487 | margin: 0 auto; 488 | } 489 | .BRfloat p { 490 | width: 575px; 491 | font-size: 1.6em; 492 | margin: 20px 20px 0; 493 | } 494 | .BRfloat p.meta { 495 | font-size: 1.1em; 496 | color: #748d36; 497 | margin: 10px 0 0; 498 | } 499 | .shift{ 500 | position:absolute!important; 501 | left:-10000px!important; 502 | } 503 | .BRfloatBody { 504 | float: left; 505 | width: 570px; 506 | padding: 30px; 507 | color: #333; 508 | } 509 | .BRfloatCover { 510 | float: left; 511 | padding: 0 20px 30px 0; 512 | } 513 | 514 | .BRfloatTitle { 515 | font-size: 1.2em; 516 | } 517 | .BRfloatTitle h2 { 518 | display: inline; 519 | font-size: 1.3em; 520 | } 521 | .BRfloatMeta p { 522 | margin: 0; 523 | padding: 0; 524 | font-size: 1.1em; 525 | line-height: 1.5em; 526 | } 527 | .BRfloatMeta p.moreInfo { 528 | line-height: 15px; 529 | margin-top: 30px; 530 | } 531 | .BRfloatMeta p.moreInfo span { 532 | background: url("images/icon_OL-logo-xs.png") no-repeat; 533 | display: block; 534 | float: left; 535 | width: 26px; 536 | height: 15px; 537 | } 538 | .BRfloatMeta h3 { 539 | font-size: 1.1em; 540 | font-weight: 700; 541 | line-height: 1.5em; 542 | margin-top: 30px; 543 | color: #333; 544 | } 545 | .BRfloatMeta ul.links { 546 | float: left; 547 | clear: right; 548 | } 549 | .BRfloatMeta ul.links li { 550 | list-style-type: none; 551 | display: block; 552 | float: left; 553 | font-size: 1.1em; 554 | line-height: 1.5em; 555 | } 556 | .BRfloatMeta ul.links li span { 557 | padding: 0 10px; 558 | } 559 | .BRfloatFoot a, .BRfloatFoot span { 560 | display: block; 561 | float: left; 562 | line-height: 16px; 563 | margin: 0 0 10px 10px; 564 | } 565 | .BRfloatFoot a.problem { 566 | background: url("images/icon_alert-xs.png") no-repeat; 567 | padding-left: 20px; 568 | } 569 | div#BRpage { 570 | float: right; 571 | width: 280px; 572 | padding-left:12px; 573 | text-align: right; 574 | } 575 | div#BRnav { 576 | position: fixed; 577 | bottom: 0; 578 | left: 0; 579 | width: 100%; 580 | height: 40px; 581 | overflow: visible; 582 | z-index: 100; 583 | background-color: #e2dcc5; 584 | 585 | -webkit-box-shadow: 1px 1px 2px #333; 586 | /* No shadow for FF, to be consistent with toolbar */ 587 | _position:absolute; 588 | _top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); 589 | } 590 | div#BRnavpos { 591 | position: relative; 592 | margin-right: 280px; 593 | height: 40px; 594 | } 595 | div#BRpager { 596 | position: relative; 597 | /* Account for padding around nav line */ 598 | margin-left: 10px; 599 | margin-right: 10px; 600 | height: 40px; 601 | } 602 | div#BRslider { 603 | position: absolute; 604 | top: 13px; 605 | height: 27px; 606 | } 607 | 608 | /* XXXmang verify correct use of handle class */ 609 | #BRpager .ui-slider-handle { 610 | position: absolute; 611 | width: 23px; 612 | height: 27px; 613 | top: 13px; 614 | margin-left: -12px; /* Center icon */ 615 | background: url(images/slider.png); 616 | z-index: 103; 617 | } 618 | #BRpager a { 619 | text-decoration: none; 620 | } 621 | /* 622 | width: 8px; 623 | height: 14px; 624 | position: absolute; 625 | top: -4px; 626 | background: #478AFF; 627 | border: solid 1px black; 628 | } 629 | */ 630 | 631 | div#BRfiller { 632 | position: absolute; 633 | height: 40px; 634 | width: 10px; 635 | background-color: #e2dcc5; 636 | top: 0; 637 | left: 0; 638 | z-index: 102; 639 | } 640 | div#slider { 641 | position: absolute; 642 | width: 2500px; 643 | height: 27px; 644 | top: 0; 645 | left: -2478px; 646 | background-color: #000; 647 | opacity: .1; 648 | z-index: 101; 649 | } 650 | div#pager { 651 | position: absolute; 652 | width: 23px; 653 | height: 27px; 654 | top: 0; 655 | left: 8px; 656 | background: url(images/slider.png); 657 | z-index: 103; 658 | } 659 | div#pagenum { 660 | display: none; 661 | position: absolute; 662 | left: 24px; 663 | top: 4px; 664 | color: #999; 665 | font-size: 11px; 666 | line-height: 19px; 667 | font-weight: 700; 668 | padding: 0 5px; 669 | width: 80px; 670 | text-align: right; 671 | background-color: #000; 672 | font-family: "Lucida Grande", "Arial", sans-serif; 673 | } 674 | div#pagenum span { 675 | color: #ffa337; 676 | font-style: italic; 677 | } 678 | div#BRnavline { 679 | position: relative; 680 | height: 2px; 681 | width: auto; 682 | background-color: #000; 683 | top: -29px; 684 | margin: 0 10px; 685 | } 686 | .BRnavend { 687 | position: absolute; 688 | top: -2px; 689 | width: 1px; 690 | height: 6px; 691 | background-color: #000; 692 | } 693 | #BRnavleft { 694 | left: 0; 695 | } 696 | #BRnavright { 697 | right: 0; 698 | } 699 | div.chapter { 700 | position: absolute; 701 | top: -24px; /* Relative to nav line */ 702 | width: 18px; 703 | margin-left: -9px; /* Center marker triangle */ 704 | height: 27px; 705 | background: transparent url(images/marker_chap-off.png) no-repeat; 706 | cursor: pointer; 707 | } 708 | div.chapter.front { 709 | background: transparent url(images/marker_chap-on.png) no-repeat; 710 | } 711 | div.chapter div.title { 712 | display: none; 713 | } 714 | div.title span { 715 | color: #666; 716 | padding: 0 5px; 717 | } 718 | div.search { 719 | position: absolute; 720 | width: 18px; 721 | margin-left: -9px; /* Center icon */ 722 | height: 27px; 723 | bottom: 0; /* Relative to nav line */ 724 | background-color: transparent; 725 | background-image: url(images/marker_srch-off.png); 726 | background-repeat: no-repeat; 727 | cursor: pointer; 728 | } 729 | div.search.front { 730 | background: transparent url(images/marker_srch-on.png) no-repeat; 731 | } 732 | div.search div.query,div.searchChap div.query { 733 | display: none; 734 | } 735 | div.query { 736 | position: relative; 737 | } 738 | div.query strong { 739 | color: #000; 740 | font-weight: 700; 741 | } 742 | div.query span { 743 | font-size: 10px; 744 | color: #666; 745 | font-style: italic; 746 | } 747 | div.query div.queryChap { 748 | position: absolute; 749 | top: -40px; 750 | left: -13px; 751 | width: 256px; 752 | overflow: hidden; 753 | text-align: center; 754 | background: #000; 755 | padding: 5px 10px; 756 | color: #fff; 757 | font-weight: 700; 758 | font-size: 11px; 759 | } 760 | div.query div.queryChap span { 761 | color: #666; 762 | padding: 0 5px; 763 | font-style: normal; 764 | } 765 | div.search div.pointer { 766 | position: absolute; 767 | left: 121px; 768 | bottom: -14px; 769 | width: 18px; 770 | height: 27px; 771 | background: transparent url(images/marker_srch-on.png) no-repeat; 772 | } 773 | div.searchChap { 774 | position: absolute; 775 | top: -13px; 776 | width: 18px; 777 | height: 27px; 778 | background-color: transparent; 779 | background-image: url(images/marker_srchchap-off.png); 780 | background-repeat: no-repeat; 781 | cursor: pointer; 782 | } 783 | div.searchChap.front { 784 | background-image: url(images/marker_srchchap-on.png); 785 | } 786 | #BRnav .front { 787 | z-index: 10001; 788 | } 789 | div#BRzoomer { 790 | position: fixed; 791 | bottom: 40px; 792 | right: 0; 793 | width: 26px; 794 | height: 190px; 795 | z-index: 100; 796 | } 797 | div#BRzoompos { 798 | position: relative; 799 | width: 26px; 800 | height: 190px; 801 | top: 0; 802 | left: 0; 803 | } 804 | div#BRzoomer button { 805 | position: absolute; 806 | left: 0; 807 | background-color: #e2dcc5; 808 | width: 26px; 809 | } 810 | div#BRzoomer button:hover { 811 | background-color: #000; 812 | } 813 | div#BRzoomer .zoom_out { 814 | top: 0; 815 | -webkit-border-top-left-radius: 6px; 816 | -webkit-border-bottom-left-radius: 6px; 817 | -moz-border-radius-topleft: 6px; 818 | -moz-border-radius-bottomleft: 6px; 819 | border-top-left-radius: 6px; 820 | border-bottom-left-radius: 6px; 821 | -webkit-box-shadow: 2px 2px 2px #333; 822 | -moz-box-shadow: 2px 2px 2px #333; 823 | box-shadow: 2px 2px 2px #333; 824 | } 825 | div#BRzoomer .zoom_in { 826 | bottom: 0; 827 | -webkit-border-top-left-radius: 6px; 828 | -moz-border-radius-topleft: 6px; 829 | border-top-left-radius: 6px; 830 | } 831 | div#BRzoomcontrol { 832 | position: relative; 833 | top: 40px; 834 | left:3px; 835 | width: 23px; 836 | height: 110px; 837 | } 838 | div#BRzoomstrip { 839 | position: absolute; 840 | top: 0; 841 | left: 0; 842 | width: 23px; 843 | height: 110px; 844 | background-color: #000; 845 | opacity: .1; 846 | } 847 | div#BRzoombtn { 848 | position: absolute; 849 | width: 23px; 850 | height: 23px; 851 | top: 0; 852 | left: 0; 853 | background: url("images/icon_zoomer.png"); 854 | } 855 | 856 | .BRprogresspopup { 857 | position: absolute; 858 | background-color: #e6e4e1; 859 | border: none!important; 860 | font-size: 1.5em; 861 | z-index: 3; 862 | padding: 20px; 863 | -moz-border-radius: 8px; 864 | -webkit-border-radius: 8px; 865 | border-radius: 8px; 866 | -moz-box-shadow: 1px 0 3px #000; 867 | -webkit-box-shadow: 1px 0 3px #000; 868 | box-shadow: 1px 0 3px #333; 869 | min-width: 300px; 870 | } 871 | 872 | .BRprogressbar { 873 | background-image: url("images/progressbar.gif"); 874 | background-repeat:no-repeat; 875 | background-position:center top; 876 | } 877 | 878 | .BRnavCntl { 879 | background-color: #e2dcc5; 880 | position: absolute; 881 | right: 20px; 882 | width: 40px; 883 | height: 30px; 884 | cursor: pointer; 885 | } 886 | #BRnavCntlBtm { 887 | bottom: 40px; 888 | -moz-border-radius-topright: 8px; 889 | -webkit-border-top-right-radius: 8px; 890 | -moz-border-radius-topleft: 8px; 891 | -webkit-border-top-left-radius: 8px; 892 | } 893 | #BRnavCntlTop { 894 | top: 40px; 895 | -moz-border-radius-bottomright: 8px; 896 | -webkit-border-bottom-right-radius: 8px; 897 | -moz-border-radius-bottomleft: 8px; 898 | -webkit-border-bottom-left-radius: 8px; 899 | display: none; 900 | } 901 | .BRup { 902 | background-image: url("images/nav_control-up.png"); 903 | background-repeat: no-repeat; 904 | } 905 | .BRdn { 906 | background-image: url("images/nav_control-dn.png"); 907 | background-repeat: no-repeat; 908 | } 909 | #BRnavCntlBtm.BRup,#BRnavCntlBtm.BRdn { 910 | background-position: 8px 4px; 911 | } 912 | #BRnavCntlTop.BRup,#BRnavCntlTop.BRdn { 913 | background-position: 8px 4px; 914 | } 915 | -------------------------------------------------------------------------------- /example/js/lib/BookReader/BookReaderEmbed.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Custom overrides for embedded bookreader. 3 | */ 4 | 5 | /* Hide some navigation buttons */ 6 | #BRtoolbar .label,.pageform,.play,.embed, 7 | .two_page_mode,.one_page_mode,.thumbnail_mode, 8 | .book_leftmost,.book_rightmost,.book_top,.book_bottom,.print { 9 | display: none; 10 | } 11 | 12 | #BRtoolbar .title { 13 | font-size: 0.9em; 14 | } 15 | 16 | #BRembedreturn { 17 | /* Center text */ 18 | font-size: 14px; 19 | line-height: 40px; 20 | height: 40px; 21 | 22 | font-family: "Lucida Grande","Arial",sans-serif; 23 | } 24 | 25 | #BRembedreturn a { 26 | font-size: 14px; 27 | color: #036daa; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /example/js/lib/BookReader/BookReaderLending.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright(c)2011 Internet Archive. Software license AGPL version 3. 3 | 4 | This file is part of BookReader :first' which is the first child of 27 | * | scrollable element 28 | * ------------------------------------------------------------------------ 29 | * acceptPropagatedEvent| Will the dragging element accept propagated 30 | * | events? default is yes, a propagated mouse event 31 | * | on a inner element will be accepted and processed. 32 | * | If set to false, only events originated on the 33 | * | draggable elements will be processed. 34 | * ------------------------------------------------------------------------ 35 | * preventDefault | Prevents the event to propagate further effectivey 36 | * | dissabling other default actions. Defaults to true 37 | * ------------------------------------------------------------------------ 38 | * scrollWindow | Scroll the window rather than the element 39 | * | Defaults to false 40 | * ------------------------------------------------------------------------ 41 | * 42 | * usage examples: 43 | * 44 | * To add the scroll by drag to the element id=viewport when dragging its 45 | * first child accepting any propagated events 46 | * $('#viewport').dragscrollable(); 47 | * 48 | * To add the scroll by drag ability to any element div of class viewport 49 | * when dragging its first descendant of class dragMe responding only to 50 | * evcents originated on the '.dragMe' elements. 51 | * $('div.viewport').dragscrollable({dragSelector:'.dragMe:first', 52 | * acceptPropagatedEvent: false}); 53 | * 54 | * Notice that some 'viewports' could be nested within others but events 55 | * would not interfere as acceptPropagatedEvent is set to false. 56 | * 57 | */ 58 | 59 | var append_namespace = function (string_of_events, ns) { 60 | 61 | /* IE doesn't have map 62 | return string_of_events 63 | .split(' ') 64 | .map(function (name) { return name + ns; }) 65 | .join(' '); 66 | */ 67 | var pieces = string_of_events.split(' '); 68 | var ret = new Array(); 69 | for (var i = 0; i < pieces.length; i++) { 70 | ret.push(pieces[i] + ns); 71 | } 72 | return ret.join(' '); 73 | }; 74 | 75 | var left_top = function(event) { 76 | 77 | var x; 78 | var y; 79 | if (typeof(event.clientX) != 'undefined') { 80 | x = event.clientX; 81 | y = event.clientY; 82 | } 83 | else if (typeof(event.screenX) != 'undefined') { 84 | x = event.screenX; 85 | y = event.screenY; 86 | } 87 | else if (typeof(event.targetTouches) != 'undefined') { 88 | x = event.targetTouches[0].pageX; 89 | y = event.targetTouches[0].pageY; 90 | } 91 | else if (typeof(event.originalEvent) == 'undefined') { 92 | var str = ''; 93 | for (i in event) { 94 | str += ', ' + i + ': ' + event[i]; 95 | } 96 | console.error("don't understand x and y for " + event.type + ' event: ' + str); 97 | } 98 | else if (typeof(event.originalEvent.clientX) != 'undefined') { 99 | x = event.originalEvent.clientX; 100 | y = event.originalEvent.clientY; 101 | } 102 | else if (typeof(event.originalEvent.screenX) != 'undefined') { 103 | x = event.originalEvent.screenX; 104 | y = event.originalEvent.screenY; 105 | } 106 | else if (typeof(event.originalEvent.targetTouches) != 'undefined') { 107 | x = event.originalEvent.targetTouches[0].pageX; 108 | y = event.originalEvent.targetTouches[0].pageY; 109 | } 110 | 111 | return {left: x, top:y}; 112 | }; 113 | 114 | $.fn.dragscrollable = function( options ) { 115 | 116 | var handling_element = $(this); 117 | 118 | var settings = $.extend( 119 | { 120 | dragSelector:'>:first', 121 | acceptPropagatedEvent: true, 122 | preventDefault: true, 123 | dragstart: 'mousedown touchstart', 124 | dragcontinue: 'mousemove touchmove', 125 | dragend: 'mouseup mouseleave touchend', 126 | dragMinDistance: 5, 127 | namespace: '.ds', 128 | scrollWindow: false 129 | },options || {}); 130 | 131 | settings.dragstart = append_namespace(settings.dragstart, settings.namespace); 132 | settings.dragcontinue = append_namespace(settings.dragcontinue, settings.namespace); 133 | settings.dragend = append_namespace(settings.dragend, settings.namespace); 134 | 135 | var dragscroll= { 136 | dragStartHandler : function(event) { 137 | // console.log('dragstart'); 138 | 139 | // mousedown, left click, check propagation 140 | if (event.which > 1 || 141 | (!event.data.acceptPropagatedEvent && event.target != this)){ 142 | return false; 143 | } 144 | 145 | event.data.firstCoord = left_top(event); 146 | // Initial coordinates will be the last when dragging 147 | event.data.lastCoord = event.data.firstCoord; 148 | 149 | handling_element 150 | .bind(settings.dragcontinue, event.data, dragscroll.dragContinueHandler) 151 | .bind(settings.dragend, event.data, dragscroll.dragEndHandler); 152 | 153 | if (event.data.preventDefault) { 154 | event.preventDefault(); 155 | return false; 156 | } 157 | }, 158 | dragContinueHandler : function(event) { // User is dragging 159 | // console.log('drag continue'); 160 | 161 | var lt = left_top(event); 162 | 163 | // How much did the mouse move? 164 | var delta = {left: (lt.left - event.data.lastCoord.left), 165 | top: (lt.top - event.data.lastCoord.top)}; 166 | 167 | /* 168 | console.log(event.data.scrollable); 169 | console.log('delta.left - ' + delta.left); 170 | console.log('delta.top - ' + delta.top); 171 | */ 172 | 173 | var scrollTarget = event.data.scrollable; 174 | if (event.data.scrollWindow) { 175 | scrollTarget = $(window); 176 | } 177 | // Set the scroll position relative to what ever the scroll is now 178 | scrollTarget.scrollLeft( scrollTarget.scrollLeft() - delta.left ); 179 | scrollTarget.scrollTop( scrollTarget.scrollTop() - delta.top ); 180 | 181 | // Save where the cursor is 182 | event.data.lastCoord = lt; 183 | 184 | if (event.data.preventDefault) { 185 | event.preventDefault(); 186 | return false; 187 | } 188 | 189 | }, 190 | dragEndHandler : function(event) { // Stop scrolling 191 | // console.log('drag END'); 192 | 193 | handling_element 194 | .unbind(settings.dragcontinue) 195 | .unbind(settings.dragend); 196 | 197 | // How much did the mouse move total? 198 | var delta = {left: Math.abs(event.data.lastCoord.left - event.data.firstCoord.left), 199 | top: Math.abs(event.data.lastCoord.top - event.data.firstCoord.top)}; 200 | var distance = Math.max(delta.left, delta.top); 201 | 202 | // Trigger 'tap' if did not meet drag distance 203 | // $$$ does not differentiate single vs multi-touch 204 | if (distance < settings.dragMinDistance) { 205 | //$(event.originalEvent.target).trigger('tap'); 206 | $(event.target).trigger('tap'); // $$$ always the right target? 207 | } 208 | 209 | // Allow event to propage if min distance was not achieved 210 | if (event.data.preventDefault && distance > settings.dragMinDistance) { 211 | event.preventDefault(); 212 | return false; 213 | } 214 | } 215 | } 216 | 217 | // set up the initial events 218 | return this.each(function() { 219 | // closure object data for each scrollable element 220 | var data = {scrollable : $(this), 221 | acceptPropagatedEvent : settings.acceptPropagatedEvent, 222 | preventDefault : settings.preventDefault, 223 | scrollWindow : settings.scrollWindow } 224 | // Set mouse initiating event on the desired descendant 225 | $(this).find(settings.dragSelector). 226 | bind(settings.dragstart, data, dragscroll.dragStartHandler); 227 | }); 228 | }; //end plugin dragscrollable 229 | 230 | $.fn.removedragscrollable = function (namespace) { 231 | if (typeof(namespace) == 'undefined') 232 | namespace = '.ds'; 233 | return this.each(function() { 234 | var x = $(document).find('*').andSelf().unbind(namespace); 235 | }); 236 | }; 237 | 238 | })( jQuery ); // confine scope 239 | -------------------------------------------------------------------------------- /example/js/lib/BookReader/excanvas.compiled.js: -------------------------------------------------------------------------------- 1 | // Copyright 2006 Google Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_|| 15 | b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d','","");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("g.x)g.x=e.x;if(h.y==null||e.yg.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_), 30 | z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l')}else a.push('');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("')}a.push("");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(), 33 | this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a, 34 | 0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager= 35 | M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})(); 36 | -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/BRicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/BRicons.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/back_pages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/back_pages.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/book_bottom_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/book_bottom_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/book_down_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/book_down_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/book_left_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/book_left_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/book_leftmost_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/book_leftmost_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/book_right_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/book_right_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/book_rightmost_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/book_rightmost_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/book_top_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/book_top_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/book_up_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/book_up_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/booksplit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/booksplit.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/control_pause_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/control_pause_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/control_play_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/control_play_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/embed_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/embed_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/icon_OL-logo-xs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/icon_OL-logo-xs.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/icon_alert-xs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/icon_alert-xs.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/icon_close-pop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/icon_close-pop.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/icon_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/icon_home.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/icon_indicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/icon_indicator.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/icon_zoomer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/icon_zoomer.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/left_edges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/left_edges.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/logo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/logo_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/marker_chap-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/marker_chap-off.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/marker_chap-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/marker_chap-on.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/marker_srch-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/marker_srch-off.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/marker_srch-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/marker_srch-on.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/marker_srchchap-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/marker_srchchap-off.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/marker_srchchap-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/marker_srchchap-on.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/nav_control-dn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/nav_control-dn.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/nav_control-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/nav_control-up.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/nav_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/nav_control.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/one_page_mode_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/one_page_mode_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/print_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/print_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/progressbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/progressbar.gif -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/right_edges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/right_edges.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/slider.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/thumbnail_mode_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/thumbnail_mode_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/transparent.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/two_page_mode_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/two_page_mode_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/zoom_in_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/zoom_in_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/images/zoom_out_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aeschylus/IIIFBookReader/e5d5ddb272b3992447ea87e395951a3909539f15/example/js/lib/BookReader/images/zoom_out_icon.png -------------------------------------------------------------------------------- /example/js/lib/BookReader/jquery-1.4.2.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v1.4.2 3 | * http://jquery.com/ 4 | * 5 | * Copyright 2010, John Resig 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://jquery.org/license 8 | * 9 | * Includes Sizzle.js 10 | * http://sizzlejs.com/ 11 | * Copyright 2010, The Dojo Foundation 12 | * Released under the MIT, BSD, and GPL Licenses. 13 | * 14 | * Date: Sat Feb 13 22:33:48 2010 -0500 15 | */ 16 | (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, 21 | Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& 22 | (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, 23 | a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== 24 | "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, 25 | function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; 34 | var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, 35 | parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= 36 | false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= 37 | s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, 38 | applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; 39 | else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, 40 | a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== 41 | w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, 42 | cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= 47 | c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); 48 | a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, 49 | function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); 50 | k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), 51 | C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= 53 | e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& 54 | f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; 55 | if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", 63 | e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, 64 | "_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, 65 | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, 71 | e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); 72 | t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| 73 | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, 80 | CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, 81 | g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, 82 | text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, 83 | setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= 84 | h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== 86 | "="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, 87 | h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& 90 | q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; 91 | if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); 92 | (function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: 93 | function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= 96 | {},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== 97 | "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", 98 | d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? 99 | a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== 100 | 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= 102 | c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, 103 | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, 104 | prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, 105 | this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); 106 | return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, 107 | ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); 111 | return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", 112 | ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= 113 | c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? 114 | c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= 115 | function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= 116 | Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, 117 | "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= 118 | a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= 119 | a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== 120 | "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, 121 | serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), 122 | function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, 123 | global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& 124 | e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? 125 | "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== 126 | false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= 127 | false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", 128 | c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| 129 | d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); 130 | g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== 131 | 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== 132 | "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; 133 | if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== 139 | "number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| 140 | c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; 141 | this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= 142 | this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, 143 | e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; 149 | a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); 150 | c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, 151 | d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- 152 | f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": 153 | "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in 154 | e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); 155 | -------------------------------------------------------------------------------- /example/js/lib/BookReader/jquery-ui-1.8.1.custom.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI 1.8.1 3 | * 4 | * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT (MIT-LICENSE.txt) 6 | * and GPL (GPL-LICENSE.txt) licenses. 7 | * 8 | * http://docs.jquery.com/UI 9 | */ 10 | jQuery.ui||function(c){c.ui={version:"1.8.1",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=0)&&c(a).is(":focusable")}})}(jQuery); 16 | ;/* 17 | * jQuery UI Effects 1.8.1 18 | * 19 | * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) 20 | * Dual licensed under the MIT (MIT-LICENSE.txt) 21 | * and GPL (GPL-LICENSE.txt) licenses. 22 | * 23 | * http://docs.jquery.com/UI/Effects/ 24 | */ 25 | jQuery.effects||function(f){function k(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], 26 | 16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return l.transparent;return l[f.trim(c).toLowerCase()]}function q(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return k(b)}function m(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, 27 | a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function n(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in r||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function s(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function j(c,a,b,d){if(typeof c=="object"){d= 28 | a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(f.isFunction(b)){d=b;b=null}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:f.fx.speeds[b]||f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=q(b.elem,a);b.end=k(b.end);b.colorInit= 29 | true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var l={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189, 30 | 183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255, 31 | 165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},o=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=n(m.call(this)),p,t=e.attr("className");f.each(o,function(u, 32 | i){c[i]&&e[i+"Class"](c[i])});p=n(m.call(this));e.attr("className",t);e.animate(s(h,p),a,b,function(){f.each(o,function(u,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a? 33 | f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===undefined?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.1",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"}); 36 | c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=j.apply(this,arguments);a={options:a[1],duration:a[2],callback:a[3]};var b=f.effects[c];return b&&!f.fx.off?b.call(this,a):this},_show:f.fn.show,show:function(c){if(!c|| 37 | typeof c=="number"||f.fx.speeds[c])return this._show.apply(this,arguments);else{var a=j.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(!c||typeof c=="number"||f.fx.speeds[c])return this._hide.apply(this,arguments);else{var a=j.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(!c||typeof c=="number"||f.fx.speeds[c]||typeof c=="boolean"||f.isFunction(c))return this.__toggle.apply(this, 38 | arguments);else{var a=j.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c, 39 | a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+ 40 | b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2, 41 | 10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)* 42 | a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h1&&opts.trigger[0]!=opts.trigger[1]){$(this).bind(opts.trigger[0],function(){this.btOn();}).bind(opts.trigger[1],function(){this.btOff();});}else{$(this).bind(opts.trigger[0],function(){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}});}}}}}this.btOn=function(){if(typeof $(this).data("bt-box")=="object"){this.btOff();}opts.preBuild.apply(this);$(jQuery.bt.vars.closeWhenOpenStack).btOff();$(this).addClass("bt-active "+opts.activeClass);if(contentSelect&&opts.ajaxPath==null){if(opts.killTitle){$(this).attr("title",$(this).attr("bt-xTitle"));}content=$.isFunction(opts.contentSelector)?opts.contentSelector.apply(this):eval(opts.contentSelector);if(opts.killTitle){$(this).attr("title","");}}if(opts.ajaxPath!=null&&content==false){if(typeof opts.ajaxPath=="object"){var url=eval(opts.ajaxPath[0]);url+=opts.ajaxPath[1]?" "+opts.ajaxPath[1]:"";}else{var url=opts.ajaxPath;}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var cacheData=opts.ajaxCache?$(document.body).data("btCache-"+url.replace(/\./g,"")):null;if(typeof cacheData=="string"){content=selector?$("
").append(cacheData.replace(//g,"")).find(selector):cacheData;}else{var target=this;var ajaxOpts=jQuery.extend(false,{type:opts.ajaxType,data:opts.ajaxData,cache:opts.ajaxCache,url:url,complete:function(XMLHttpRequest,textStatus){if(textStatus=="success"||textStatus=="notmodified"){if(opts.ajaxCache){$(document.body).data("btCache-"+url.replace(/\./g,""),XMLHttpRequest.responseText);}ajaxTimeout=false;content=selector?$("
").append(XMLHttpRequest.responseText.replace(//g,"")).find(selector):XMLHttpRequest.responseText;}else{if(textStatus=="timeout"){ajaxTimeout=true;}content=opts.ajaxError.replace(/%error/g,XMLHttpRequest.statusText);}if($(target).hasClass("bt-active")){target.btOn();}}},opts.ajaxOpts);jQuery.ajax(ajaxOpts);content=opts.ajaxLoading;}}var shadowMarginX=0;var shadowMarginY=0;var shadowShiftX=0;var shadowShiftY=0;if(opts.shadow&&!shadowSupport()){opts.shadow=false;jQuery.extend(opts,opts.noShadowOpts);}if(opts.shadow){if(opts.shadowBlur>Math.abs(opts.shadowOffsetX)){shadowMarginX=opts.shadowBlur*2;}else{shadowMarginX=opts.shadowBlur+Math.abs(opts.shadowOffsetX);}shadowShiftX=(opts.shadowBlur-opts.shadowOffsetX)>0?opts.shadowBlur-opts.shadowOffsetX:0;if(opts.shadowBlur>Math.abs(opts.shadowOffsetY)){shadowMarginY=opts.shadowBlur*2;}else{shadowMarginY=opts.shadowBlur+Math.abs(opts.shadowOffsetY);}shadowShiftY=(opts.shadowBlur-opts.shadowOffsetY)>0?opts.shadowBlur-opts.shadowOffsetY:0;}if(opts.offsetParent){var offsetParent=$(opts.offsetParent);var offsetParentPos=offsetParent.offset();var pos=$(this).offset();var top=numb(pos.top)-numb(offsetParentPos.top)+numb($(this).css("margin-top"))-shadowShiftY;var left=numb(pos.left)-numb(offsetParentPos.left)+numb($(this).css("margin-left"))-shadowShiftX;}else{var offsetParent=($(this).css("position")=="absolute")?$(this).parents().eq(0).offsetParent():$(this).offsetParent();var pos=$(this).btPosition();var top=numb(pos.top)+numb($(this).css("margin-top"))-shadowShiftY;var left=numb(pos.left)+numb($(this).css("margin-left"))-shadowShiftX;}var width=$(this).btOuterWidth();var height=$(this).outerHeight();if(typeof content=="object"){var original=content;var clone=$(original).clone(true).show();var origClones=$(original).data("bt-clones")||[];origClones.push(clone);$(original).data("bt-clones",origClones);$(clone).data("bt-orig",original);$(this).data("bt-content-orig",{original:original,clone:clone});content=clone;}if(typeof content=="null"||content==""){return;}var $text=$('
').append(content).css({padding:opts.padding,position:"absolute",width:(opts.shrinkToFit?"auto":opts.width),zIndex:opts.textzIndex,left:shadowShiftX,top:shadowShiftY}).css(opts.cssStyles);var $box=$('
').append($text).addClass(opts.cssClass).css({position:"absolute",width:opts.width,zIndex:opts.wrapperzIndex,visibility:"hidden"}).appendTo(offsetParent);if(jQuery.fn.bgiframe){$text.bgiframe();$box.bgiframe();}$(this).data("bt-box",$box);var scrollTop=numb($(document).scrollTop());var scrollLeft=numb($(document).scrollLeft());var docWidth=numb($(window).width());var docHeight=numb($(window).height());var winRight=scrollLeft+docWidth;var winBottom=scrollTop+docHeight;var space=new Object();var thisOffset=$(this).offset();space.top=thisOffset.top-scrollTop;space.bottom=docHeight-((thisOffset+height)-scrollTop);space.left=thisOffset.left-scrollLeft;space.right=docWidth-((thisOffset.left+width)-scrollLeft);var textOutHeight=numb($text.outerHeight());var textOutWidth=numb($text.btOuterWidth());if(opts.positions.constructor==String){opts.positions=opts.positions.replace(/ /,"").split(",");}if(opts.positions[0]=="most"){var position="top";for(var pig in space){position=space[pig]>space[position]?pig:position;}}else{for(var x in opts.positions){var position=opts.positions[x];if((position=="left"||position=="right")&&space[position]>textOutWidth+opts.spikeLength){break;}else{if((position=="top"||position=="bottom")&&space[position]>textOutHeight+opts.spikeLength){break;}}}}var horiz=left+((width-textOutWidth)*0.5);var vert=top+((height-textOutHeight)*0.5);var points=new Array();var textTop,textLeft,textRight,textBottom,textTopSpace,textBottomSpace,textLeftSpace,textRightSpace,crossPoint,textCenter,spikePoint;switch(position){case"top":$text.css("margin-bottom",opts.spikeLength+"px");$box.css({top:(top-$text.outerHeight(true))+opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.btOuterWidth(true));var xShift=shadowShiftX;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace;}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={y:textBottom+opts.spikeLength,x:((textRight-textLeft)*0.5)+xShift,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textBottom);crossPoint.x=crossPoint.x(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.CornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:crossPoint.x+(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]=spikePoint;break;case"left":$text.css("margin-right",opts.spikeLength+"px");$box.css({top:vert+"px",left:((left-$text.btOuterWidth(true))+opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=shadowShiftY;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace;}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:textRight+opts.spikeLength,y:((textBottom-textTop)*0.5)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textRight);crossPoint.y=crossPoint.y(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textRight,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break;case"bottom":$text.css("margin-top",opts.spikeLength+"px");$box.css({top:(top+height)-opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.btOuterWidth(true));var xShift=shadowShiftX;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace;}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:((textRight-textLeft)*0.5)+xShift,y:shadowShiftY,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textTop);crossPoint.x=crossPoint.x(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x+opts.spikeGirth/2,y:textTop,type:"join"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textTop,type:"join"};points[points.length]=spikePoint;break;case"right":$text.css("margin-left",(opts.spikeLength+"px"));$box.css({top:vert+"px",left:((left+width)-opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=shadowShiftY;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace;}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:shadowShiftX,y:((textBottom-textTop)*0.5)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textLeft);crossPoint.y=crossPoint.y(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textLeft,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break;}var canvas=document.createElement("canvas");$(canvas).attr("width",(numb($text.btOuterWidth(true))+opts.strokeWidth*2+shadowMarginX)).attr("height",(numb($text.outerHeight(true))+opts.strokeWidth*2+shadowMarginY)).appendTo($box).css({position:"absolute",zIndex:opts.boxzIndex});if(typeof G_vmlCanvasManager!="undefined"){canvas=G_vmlCanvasManager.initElement(canvas);}if(opts.cornerRadius>0){var newPoints=new Array();var newPoint;for(var i=0;i0){$box.css("top",(numb($box.css("top"))-(opts.shadowOffsetX+opts.shadowBlur-shadowOverlap)));}break;case"right":if(shadowShiftX-shadowOverlap>0){$box.css("left",(numb($box.css("left"))+shadowShiftX-shadowOverlap));}break;case"bottom":if(shadowShiftY-shadowOverlap>0){$box.css("top",(numb($box.css("top"))+shadowShiftY-shadowOverlap));}break;case"left":if(opts.shadowOffsetY+opts.shadowBlur-shadowOverlap>0){$box.css("left",(numb($box.css("left"))-(opts.shadowOffsetY+opts.shadowBlur-shadowOverlap)));}break;}}drawIt.apply(ctx,[points],opts.strokeWidth);ctx.fillStyle=opts.fill;if(opts.shadow){ctx.shadowOffsetX=opts.shadowOffsetX;ctx.shadowOffsetY=opts.shadowOffsetY;ctx.shadowBlur=opts.shadowBlur;ctx.shadowColor=opts.shadowColor;}ctx.closePath();ctx.fill();if(opts.strokeWidth>0){ctx.shadowColor="rgba(0, 0, 0, 0)";ctx.lineWidth=opts.strokeWidth;ctx.strokeStyle=opts.strokeStyle;ctx.beginPath();drawIt.apply(ctx,[points],opts.strokeWidth);ctx.closePath();ctx.stroke();}opts.preShow.apply(this,[$box[0]]);$box.css({display:"none",visibility:"visible"});opts.showTip.apply(this,[$box[0]]);if(opts.overlay){var overlay=$('
').css({position:"absolute",backgroundColor:"blue",top:top,left:left,width:width,height:height,opacity:".2"}).appendTo(offsetParent);$(this).data("overlay",overlay);}if((opts.ajaxPath!=null&&opts.ajaxCache==false)||ajaxTimeout){content=false;}if(opts.clickAnywhereToClose){jQuery.bt.vars.clickAnywhereStack.push(this);$(document).click(jQuery.bt.docClick);}if(opts.closeWhenOthersOpen){jQuery.bt.vars.closeWhenOpenStack.push(this);}opts.postShow.apply(this,[$box[0]]);};this.btOff=function(){var box=$(this).data("bt-box");opts.preHide.apply(this,[box]);var i=this;i.btCleanup=function(){var box=$(i).data("bt-box");var contentOrig=$(i).data("bt-content-orig");var overlay=$(i).data("bt-overlay");if(typeof box=="object"){$(box).remove();$(i).removeData("bt-box");}if(typeof contentOrig=="object"){var clones=$(contentOrig.original).data("bt-clones");$(contentOrig).data("bt-clones",arrayRemove(clones,contentOrig.clone));}if(typeof overlay=="object"){$(overlay).remove();$(i).removeData("bt-overlay");}jQuery.bt.vars.clickAnywhereStack=arrayRemove(jQuery.bt.vars.clickAnywhereStack,i);jQuery.bt.vars.closeWhenOpenStack=arrayRemove(jQuery.bt.vars.closeWhenOpenStack,i);$(i).removeClass("bt-active "+opts.activeClass);opts.postHide.apply(i);};opts.hideTip.apply(this,[box,i.btCleanup]);};var refresh=this.btRefresh=function(){this.btOff();this.btOn();};});function drawIt(points,strokeWidth){this.moveTo(points[0].x,points[0].y);for(i=1;i=3.1){return true;}}}catch(err){}return false;}function betweenPoint(point1,point2,dist){var y,x;if(point1.x==point2.x){y=point1.yarcEnd.y){startAngle=(Math.PI/180)*180;endAngle=(Math.PI/180)*90;}else{startAngle=(Math.PI/180)*90;endAngle=0;}}else{if(arcStart.y>arcEnd.y){startAngle=(Math.PI/180)*270;endAngle=(Math.PI/180)*180;}else{startAngle=0;endAngle=(Math.PI/180)*270;}}return{x:x,y:y,type:"center",startAngle:startAngle,endAngle:endAngle};}function findIntersect(r1x1,r1y1,r1x2,r1y2,r2x1,r2y1,r2x2,r2y2){if(r2x1==r2x2){return findIntersectY(r1x1,r1y1,r1x2,r1y2,r2x1);}if(r2y1==r2y2){return findIntersectX(r1x1,r1y1,r1x2,r1y2,r2y1);}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var r2m=(r2y1-r2y2)/(r2x1-r2x2);var r2b=r2y1-(r2m*r2x1);var x=(r2b-r1b)/(r1m-r2m);var y=r1m*x+r1b;return{x:x,y:y};}function findIntersectY(r1x1,r1y1,r1x2,r1y2,x){if(r1y1==r1y2){return{x:x,y:r1y1};}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var y=r1m*x+r1b;return{x:x,y:y};}function findIntersectX(r1x1,r1y1,r1x2,r1y2,y){if(r1x1==r1x2){return{x:r1x1,y:y};}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var x=(y-r1b)/r1m;return{x:x,y:y};}};jQuery.fn.btPosition=function(){function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;};jQuery.fn.btOuterWidth=function(margin){function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}return this["innerWidth"]()+num(this,"borderLeftWidth")+num(this,"borderRightWidth")+(margin?num(this,"marginLeft")+num(this,"marginRight"):0);};jQuery.fn.btOn=function(){return this.each(function(index){if(jQuery.isFunction(this.btOn)){this.btOn();}});};jQuery.fn.btOff=function(){return this.each(function(index){if(jQuery.isFunction(this.btOff)){this.btOff();}});};jQuery.bt.vars={clickAnywhereStack:[],closeWhenOpenStack:[]};jQuery.bt.docClick=function(e){if(!e){var e=window.event;}if(!$(e.target).parents().andSelf().filter(".bt-wrapper, .bt-active").length&&jQuery.bt.vars.clickAnywhereStack.length){$(jQuery.bt.vars.clickAnywhereStack).btOff();$(document).unbind("click",jQuery.bt.docClick);}};jQuery.bt.defaults={trigger:"hover",clickAnywhereToClose:true,closeWhenOthersOpen:false,shrinkToFit:false,width:"200px",padding:"10px",spikeGirth:10,spikeLength:15,overlap:0,overlay:false,killTitle:true,textzIndex:9999,boxzIndex:9998,wrapperzIndex:9997,offsetParent:null,positions:["most"],fill:"rgb(255, 255, 102)",windowMargin:10,strokeWidth:1,strokeStyle:"#000",cornerRadius:5,centerPointX:0.5,centerPointY:0.5,shadow:false,shadowOffsetX:2,shadowOffsetY:2,shadowBlur:3,shadowColor:"#000",shadowOverlap:false,noShadowOpts:{strokeStyle:"#999"},cssClass:"",cssStyles:{},activeClass:"bt-active",contentSelector:"$(this).attr('title')",ajaxPath:null,ajaxError:"ERROR: %error",ajaxLoading:"Loading...",ajaxData:{},ajaxType:"GET",ajaxCache:true,ajaxOpts:{},preBuild:function(){},preShow:function(box){},showTip:function(box){$(box).show();},postShow:function(box){},preHide:function(box){},hideTip:function(box,callback){$(box).hide();callback();},postHide:function(){},hoverIntentOpts:{interval:300,timeout:500}};jQuery.bt.options={};})(jQuery); -------------------------------------------------------------------------------- /example/js/lib/BookReader/jquery.colorbox-min.js: -------------------------------------------------------------------------------- 1 | // ColorBox v1.3.9 - a full featured, light-weight, customizable lightbox based on jQuery 1.3 2 | // c) 2009 Jack Moore - www.colorpowered.com - jack@colorpowered.com 3 | // Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | (function(b,gb){var v="none",t="click",N="LoadedContent",d=false,x="resize.",o="y",u="auto",f=true,M="nofollow",q="on",n="x";function e(a,c){a=a?' id="'+k+a+'"':"";c=c?' style="'+c+'"':"";return b("")}function p(a,b){b=b===n?m.width():m.height();return typeof a==="string"?Math.round(a.match(/%/)?b/100*parseInt(a,10):parseInt(a,10)):a}function Q(c){c=b.isFunction(c)?c.call(h):c;return a.photo||c.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function cb(){for(var c in a)if(b.isFunction(a[c])&&c.substring(0,2)!==q)a[c]=a[c].call(h);a.rel=a.rel||h.rel||M;a.href=a.href||b(h).attr("href");a.title=a.title||h.title}function db(d){h=d;a=b.extend({},b(h).data(r));cb();if(a.rel!==M){i=b("."+H).filter(function(){return (b(this).data(r).rel||this.rel)===a.rel});g=i.index(h);if(g===-1){i=i.add(h);g=i.length-1}}else{i=b(h);g=0}if(!w){w=F=f;R=h;try{R.blur()}catch(e){}b.event.trigger(hb);a.onOpen&&a.onOpen.call(h);y.css({opacity:+a.opacity,cursor:a.overlayClose?"pointer":u}).show();a.w=p(a.initialWidth,n);a.h=p(a.initialHeight,o);c.position(0);S&&m.bind(x+O+" scroll."+O,function(){y.css({width:m.width(),height:m.height(),top:m.scrollTop(),left:m.scrollLeft()})}).trigger("scroll."+O)}T.add(I).add(J).add(z).add(U).hide();V.html(a.close).show();c.slideshow();c.load()}var eb={transition:"elastic",speed:300,width:d,initialWidth:"600",innerWidth:d,maxWidth:d,height:d,initialHeight:"450",innerHeight:d,maxHeight:d,scalePhotos:f,scrolling:f,inline:d,html:d,iframe:d,photo:d,href:d,title:d,rel:d,opacity:.9,preloading:f,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:d,loop:f,slideshow:d,slideshowAuto:f,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:d,onLoad:d,onComplete:d,onCleanup:d,onClosed:d,overlayClose:f,escKey:f,arrowKey:f},r="colorbox",k="cbox",hb=k+"_open",P=k+"_load",W=k+"_complete",X=k+"_cleanup",fb=k+"_closed",G=b.browser.msie&&!b.support.opacity,S=G&&b.browser.version<7,O=k+"_IE6",y,j,E,s,Y,Z,ab,bb,i,m,l,K,L,U,T,z,J,I,V,C,D,A,B,h,R,g,a,w,F,c,H=k+"Element";c=b.fn[r]=b[r]=function(c,d){var a=this;if(!a[0]&&a.selector)return a;c=c||{};if(d)c.onComplete=d;if(!a[0]||a.selector===undefined){a=b("");c.open=f}a.each(function(){b(this).data(r,b.extend({},b(this).data(r)||eb,c)).addClass(H)});c.open&&db(a[0]);return a};c.init=function(){var h="hover";m=b(gb);j=e().attr({id:r,"class":G?k+"IE":""});y=e("Overlay",S?"position:absolute":"").hide();E=e("Wrapper");s=e("Content").append(l=e(N,"width:0; height:0"),L=e("LoadingOverlay").add(e("LoadingGraphic")),U=e("Title"),T=e("Current"),J=e("Next"),I=e("Previous"),z=e("Slideshow"),V=e("Close"));E.append(e().append(e("TopLeft"),Y=e("TopCenter"),e("TopRight")),e().append(Z=e("MiddleLeft"),s,ab=e("MiddleRight")),e().append(e("BottomLeft"),bb=e("BottomCenter"),e("BottomRight"))).children().children().css({"float":"left"});K=e(d,"position:absolute; width:9999px; visibility:hidden; display:none");b("body").prepend(y,j.append(E,K));s.children().hover(function(){b(this).addClass(h)},function(){b(this).removeClass(h)}).addClass(h);C=Y.height()+bb.height()+s.outerHeight(f)-s.height();D=Z.width()+ab.width()+s.outerWidth(f)-s.width();A=l.outerHeight(f);B=l.outerWidth(f);j.css({"padding-bottom":C,"padding-right":D}).hide();J.click(c.next);I.click(c.prev);V.click(c.close);s.children().removeClass(h);b("."+H).live(t,function(a){if(a.button!==0&&typeof a.button!=="undefined"||a.ctrlKey||a.shiftKey||a.altKey)return f;else{db(this);return d}});y.click(function(){a.overlayClose&&c.close()});b(document).bind("keydown",function(b){if(w&&a.escKey&&b.keyCode===27){b.preventDefault();c.close()}if(w&&a.arrowKey&&!F&&i[1])if(b.keyCode===37&&(g||a.loop)){b.preventDefault();I.click()}else if(b.keyCode===39&&(g
").children();a.h=b.height();b.replaceWith(b.children())}l.css({height:a.h});c.position(a.transition===v?0:a.speed)}};c.prep=function(o){var d="hidden";function n(t){var o,q,s,n,d=i.length,e=a.loop;c.position(t,function(){function t(){G&&j[0].style.removeAttribute("filter")}if(w){G&&p&&l.fadeIn(100);a.iframe&&b("