1/*! 2 * jQzoom Evolution Library v2.3 - Javascript Image magnifier 3 * http://www.mind-projects.it 4 * 5 * Copyright 2011, Engineer Marco Renzi 6 * Licensed under the BSD license. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions are met: 10 * * Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * * Neither the name of the organization nor the 16 * names of its contributors may be used to endorse or promote products 17 * derived from this software without specific prior written permission. 18 * 19 * Date: 03 May 2011 22:16:00 20 */ 21(function ($) { 22 //GLOBAL VARIABLES 23 var isIE6 = ($.browser.msie && $.browser.version < 7); 24 var body = $(document.body); 25 var window = $(window); 26 var jqzoompluging_disabled = false; //disabilita globalmente il plugin 27 $.fn.jqzoom = function (options) { 28 return this.each(function () { 29 var node = this.nodeName.toLowerCase(); 30 if (node == 'a') { 31 new jqzoom(this, options); 32 } 33 }); 34 }; 35 jqzoom = function (el, options) { 36 var api = null; 37 api = $(el).data("jqzoom"); 38 if (api) return api; 39 var obj = this; 40 var settings = $.extend({}, $.jqzoom.defaults, options || {}); 41 obj.el = el; 42 el.rel = $(el).attr('rel'); 43 //ANCHOR ELEMENT 44 el.zoom_active = false; 45 el.zoom_disabled = false; //to disable single zoom instance 46 el.largeimageloading = false; //tell us if large image is loading 47 el.largeimageloaded = false; //tell us if large image is loaded 48 el.scale = {}; 49 el.timer = null; 50 el.mousepos = {}; 51 el.mouseDown = false; 52 $(el).css({ 53 'outline-style': 'none', 54 'text-decoration': 'none' 55 }); 56 //BASE IMAGE 57 var img = $("img:eq(0)", el); 58 el.title = $(el).attr('title'); 59 el.imagetitle = img.attr('title'); 60 var zoomtitle = ($.trim(el.title).length > 0) ? el.title : el.imagetitle; 61 var smallimage = new Smallimage(img); 62 var lens = new Lens(); 63 var stage = new Stage(); 64 var largeimage = new Largeimage(); 65 var loader = new Loader(); 66 //preventing default click,allowing the onclick event [exmple: lightbox] 67 $(el).bind('click', function (e) { 68 e.preventDefault(); 69 return false; 70 }); 71 //setting the default zoomType if not in settings 72 var zoomtypes = ['standard', 'drag', 'innerzoom', 'reverse']; 73 if ($.inArray($.trim(settings.zoomType), zoomtypes) < 0) { 74 settings.zoomType = 'standard'; 75 } 76 $.extend(obj, { 77 create: function () { //create the main objects 78 //create ZoomPad 79 if ($(".zoomPad", el).length == 0) { 80 el.zoomPad = $('<div/>').addClass('zoomPad'); 81 img.wrap(el.zoomPad); 82 } 83 if(settings.zoomType == 'innerzoom'){ 84 settings.zoomWidth = smallimage.w; 85 settings.zoomHeight = smallimage.h; 86 } 87 //creating ZoomPup 88 if ($(".zoomPup", el).length == 0) { 89 lens.append(); 90 } 91 //creating zoomWindow 92 if ($(".zoomWindow", el).length == 0) { 93 stage.append(); 94 } 95 //creating Preload 96 if ($(".zoomPreload", el).length == 0) { 97 loader.append(); 98 } 99 //preloading images 100 if (settings.preloadImages || settings.zoomType == 'drag' || settings.alwaysOn) { 101 obj.load(); 102 } 103 obj.init(); 104 }, 105 init: function () { 106 //drag option 107 if (settings.zoomType == 'drag') { 108 $(".zoomPad", el).mousedown(function () { 109 el.mouseDown = true; 110 }); 111 $(".zoomPad", el).mouseup(function () { 112 el.mouseDown = false;
113 }); 114 document.body.ondragstart = function () { 115 return false; 116 }; 117 $(".zoomPad", el).css({ 118 cursor: 'default' 119 }); 120 $(".zoomPup", el).css({ 121 cursor: 'move' 122 }); 123 } 124 if (settings.zoomType == 'innerzoom') { 125 $(".zoomWrapper", el).css({ 126 cursor: 'crosshair' 127 }); 128 } 129 $(".zoomPad", el).bind('mouseenter mouseover', function (event) { 130 img.attr('title', ''); 131 $(el).attr('title', ''); 132 el.zoom_active = true; 133 //if loaded then activate else load large image 134 smallimage.fetchdata(); 135 if (el.largeimageloaded) { 136 obj.activate(event); 137 } else { 138 obj.load(); 139 } 140 }); 141 $(".zoomPad", el).bind('mouseleave', function (event) { 142 obj.deactivate(); 143 }); 144 $(".zoomPad", el).bind('mousemove', function (e) { 145 146 //prevent fast mouse mevements not to fire the mouseout event 147 if (e.pageX > smallimage.pos.r || e.pageX < smallimage.pos.l || e.pageY < smallimage.pos.t || e.pageY > smallimage.pos.b) { 148 lens.setcenter(); 149 return false; 150 } 151 el.zoom_active = true; 152 if (el.largeimageloaded && !$('.zoomWindow', el).is(':visible')) { 153 obj.activate(e); 154 } 155 if (el.largeimageloaded && (settings.zoomType != 'drag' || (settings.zoomType == 'drag' && el.mouseDown))) { 156 lens.setposition(e); 157 } 158 }); 159 var thumb_preload = new Array(); 160 var i = 0; 161 //binding click event on thumbnails 162 var thumblist = new Array(); 163 thumblist = $('a').filter(function () { 164 var regex = new RegExp("gallery[\\s]*:[\\s]*'" + $.trim(el.rel) + "'", "i"); 165 var rel = $(this).attr('rel'); 166 if (regex.test(rel)) { 167 return this; 168 } 169 }); 170 if (thumblist.length > 0) { 171 //getting the first to the last 172 var first = thumblist.splice(0, 1); 173 thumblist.push(first); 174 } 175 thumblist.each(function () { 176 //preloading thumbs 177 if (settings.preloadImages) { 178 var thumb_options = $.extend({}, eval("(" + $.trim($(this).attr('rel')) + ")")); 179 thumb_preload[i] = new Image(); 180 thumb_preload[i].src = thumb_options.largeimage; 181 i++; 182 } 183 $(this).click(function (e) { 184 if($(this).hasClass('zoomThumbActive')){ 185 return false; 186 } 187 thumblist.each(function () { 188 $(this).removeClass('zoomThumbActive'); 189 }); 190 e.preventDefault(); 191 obj.swapimage(this); 192 return false; 193 }); 194 }); 195 }, 196 load: function () { 197 if (el.largeimageloaded == false && el.largeimageloading == false) { 198 var url = $(el).attr('href'); 199 el.largeimageloading = true; 200 largeimage.loadimage(url); 201 } 202 }, 203 activate: function (e) { 204 clearTimeout(el.timer); 205 //show lens and zoomWindow 206 lens.show(); 207 stage.show(); 208 }, 209 deactivate: function (e) { 210 switch (settings.zoomType) { 211 case 'drag': 212 //nothing or lens.setcenter(); 213 break; 214 default:
215 img.attr('title', el.imagetitle); 216 $(el).attr('title', el.title); 217 if (settings.alwaysOn) { 218 lens.setcenter(); 219 } else { 220 stage.hide(); 221 lens.hide(); 222 } 223 break; 224 } 225 el.zoom_active = false; 226 }, 227 swapimage: function (link) { 228 el.largeimageloading = false; 229 el.largeimageloaded = false; 230 var options = new Object(); 231 options = $.extend({}, eval("(" + $.trim($(link).attr('rel')) + ")")); 232 if (options.smallimage && options.largeimage) { 233 var smallimage = options.smallimage; 234 var largeimage = options.largeimage; 235 $(link).addClass('zoomThumbActive'); 236 $(el).attr('href', largeimage); 237 img.attr('src', smallimage); 238 lens.hide(); 239 stage.hide(); 240 obj.load(); 241 } else { 242 alert('ERROR :: Missing parameter for largeimage or smallimage.'); 243 throw 'ERROR :: Missing parameter for largeimage or smallimage.'; 244 } 245 return false; 246 } 247 }); 248 //sometimes image is already loaded and onload will not fire 249 if (img[0].complete) { 250 //fetching data from sallimage if was previously loaded 251 smallimage.fetchdata(); 252 if ($(".zoomPad", el).length == 0) obj.create(); 253 } 254/*========================================================, 255| Smallimage 256|---------------------------------------------------------: 257| Base image into the anchor element 258`========================================================*/ 259 260 function Smallimage(image) { 261 var $obj = this; 262 this.node = image[0]; 263 this.findborder = function () { 264 var bordertop = 0; 265 bordertop = image.css('border-top-width'); 266 btop = ''; 267 var borderleft = 0; 268 borderleft = image.css('border-left-width'); 269 bleft = ''; 270 if (bordertop) { 271 for (i = 0; i < 3; i++) { 272 var x = []; 273 x = bordertop.substr(i, 1); 274 if (isNaN(x) == false) { 275 btop = btop + '' + bordertop.substr(i, 1); 276 } else { 277 break; 278 } 279 } 280 } 281 if (borderleft) { 282 for (i = 0; i < 3; i++) { 283 if (!isNaN(borderleft.substr(i, 1))) { 284 bleft = bleft + borderleft.substr(i, 1) 285 } else { 286 break; 287 } 288 } 289 } 290 $obj.btop = (btop.length > 0) ? eval(btop) : 0; 291 $obj.bleft = (bleft.length > 0) ? eval(bleft) : 0; 292 }; 293 this.fetchdata = function () { 294 $obj.findborder(); 295 $obj.w = image.width(); 296 $obj.h = image.height(); 297 298 if($obj.w > $obj.h) $obj.h = $obj.w; 299 else $obj.w =$obj.h; 300 301 $obj.ow = image.outerWidth(); 302 $obj.oh = image.outerHeight(); 303 304 if($obj.ow > $obj.oh) $obj.oh = $obj.ow; 305 else $obj.ow =$obj.oh; 306 307 $obj.pos = image.offset(); 308 $obj.pos.l = image.offset().left + $obj.bleft; 309 $obj.pos.t = image.offset().top + $obj.btop; 310 $obj.pos.r = $obj.w + $obj.pos.l; 311 $obj.pos.b = $obj.h + $obj.pos.t; 312 $obj.rightlimit = image.offset().left + $obj.ow; 313 $obj.bottomlimit = image.offset().top + $obj.oh; 314 315 }; 316 this.node.onerror = function () { 317 alert('Problems while loading image.'); 318 throw 'Problems while loading image.'; 319 }; 320 this.node.onload = function () { 321 $obj.fetchdata(); 322 if ($(".zoomPad", el).length == 0) obj.create(); 323 }; 324 return $obj; 325 }; 326/*========================================================, 327| Loader 328|---------------------------------------------------------: 329| Show that the large image is loading 330`========================================================*/ 331 332 function Loader() { 333 var $obj = this; 334 this.append = function () {
335 this.node = $('<div/>').addClass('zoomPreload').css('visibility', 'hidden').html(settings.preloadText); 336 $('.zoomPad', el).append(this.node); 337 }; 338 this.show = function () { 339 this.node.top = (smallimage.oh - this.node.height()) / 2; 340 this.node.left = (smallimage.ow - this.node.width()) / 2; 341 //setting position 342 this.node.css({ 343 top: this.node.top, 344 left: this.node.left, 345 position: 'absolute', 346 visibility: 'hidden' 347 }); 348 }; 349 this.hide = function () { 350 this.node.css('visibility', 'hidden'); 351 }; 352 return this; 353 } 354/*========================================================, 355| Lens 356|---------------------------------------------------------: 357| Lens over the image 358`========================================================*/ 359 360 function Lens() { 361 var $obj = this; 362 this.node = $('<div/>').addClass('zoomPup'); 363 //this.nodeimgwrapper = $("<div/>").addClass('zoomPupImgWrapper'); 364 this.append = function () { 365 $('.zoomPad', el).append($(this.node).hide()); 366 if (settings.zoomType == 'reverse') { 367 this.image = new Image(); 368 this.image.src = smallimage.node.src;
368 // fires off async 369 $(this.node).empty().append(this.image); 370 } 371 }; 372 this.setdimensions = function () { 373 this.node.w = (parseInt((settings.zoomWidth) / el.scale.x) > smallimage.w ) ? smallimage.w : (parseInt(settings.zoomWidth / el.scale.x)); 374 this.node.h = (parseInt((settings.zoomHeight) / el.scale.y) > smallimage.h ) ? smallimage.h : (parseInt(settings.zoomHeight / el.scale.y)); 375 this.node.top = (smallimage.oh - this.node.h - 2) / 2; 376 this.node.left = (smallimage.ow - this.node.w - 2) / 2; 377 //centering lens 378 this.node.css({ 379 top: 0, 380 left: 0, 381 width: this.node.w + 'px', 382 height: this.node.h + 'px', 383 position: 'absolute', 384 display: 'none', 385 borderWidth: 1 + 'px' 386 }); 387 388 389 390 if (settings.zoomType == 'reverse') { 391 this.image.src = smallimage.node.src; 392 $(this.node).css({ 393 'opacity': 1 394 }); 395 396 $(this.image).css({ 397 position: 'absolute', 398 display: 'block', 399 left: -(this.node.left + 1 - smallimage.bleft) + 'px', 400 top: -(this.node.top + 1 - smallimage.btop) + 'px' 401 }); 402 403 } 404 }; 405 this.setcenter = function () { 406 //calculating center position 407 this.node.top = (smallimage.oh - this.node.h - 2) / 2; 408 this.node.left = (smallimage.ow - this.node.w - 2) / 2; 409 //centering lens 410 this.node.css({ 411 top: this.node.top, 412 left: this.node.left 413 }); 414 if (settings.zoomType == 'reverse') { 415 $(this.image).css({ 416 position: 'absolute', 417 display: 'block', 418 left: -(this.node.left + 1 - smallimage.bleft) + 'px', 419 top: -(this.node.top + 1 - smallimage.btop) + 'px' 420 }); 421 422 } 423 //centering large image 424 largeimage.setposition(); 425 }; 426 this.setposition = function (e) { 427 el.mousepos.x = e.pageX; 428 el.mousepos.y = e.pageY; 429 var lensleft = 0; 430 var lenstop = 0; 431 432 function overleft(lens) { 433 return el.mousepos.x - (lens.w) / 2 < smallimage.pos.l; 434 } 435 436 function overright(lens) { 437 return el.mousepos.x + (lens.w) / 2 > smallimage.pos.r; 438 439 } 440 441 function overtop(lens) { 442 return el.mousepos.y - (lens.h) / 2 < smallimage.pos.t; 443 } 444 445 function overbottom(lens) { 446 return el.mousepos.y + (lens.h) / 2 > smallimage.pos.b; 447 } 448 449 lensleft = el.mousepos.x + smallimage.bleft - smallimage.pos.l - (this.node.w + 2) / 2; 450 lenstop = el.mousepos.y + smallimage.btop - smallimage.pos.t - (this.node.h + 2) / 2; 451 if (overleft(this.node)) { 452 lensleft = smallimage.bleft - 1; 453 } else if (overright(this.node)) { 454 lensleft = smallimage.w + smallimage.bleft - this.node.w - 1; 455 } 456 if (overtop(this.node)) { 457 lenstop = smallimage.btop - 1; 458 } else if (overbottom(this.node)) { 459 lenstop = smallimage.h + smallimage.btop - this.node.h - 1; 460 } 461 462 this.node.left = lensleft; 463 this.node.top = lenstop; 464 this.node.css({ 465 'left': lensleft + 'px', 466 'top': lenstop + 'px' 467 }); 468 if (settings.zoomType == 'reverse') { 469 if ($.browser.msie && $.browser.version > 7) { 470 $(this.node).empty().append(this.image); 471 } 472 473 $(this.image).css({ 474 position: 'absolute', 475 display: 'block', 476 left: -(this.node.left + 1 - smallimage.bleft) + 'px', 477 top: -(this.node.top + 1 - smallimage.btop) + 'px' 478 }); 479 } 480 481 largeimage.setposition(); 482 }; 483 this.hide = function () { 484 img.css({ 485 'opacity': 1 486 }); 487 this.node.hide(); 488 }; 489 this.show = function () { 490
491 if (settings.zoomType != 'innerzoom' && (settings.lens || settings.zoomType == 'drag')) { 492 this.node.show(); 493 } 494 495 if (settings.zoomType == 'reverse') { 496 img.css({ 497 'opacity': settings.imageOpacity 498 }); 499 } 500 }; 501 this.getoffset = function () { 502 var o = {}; 503 o.left = $obj.node.left; 504 o.top = $obj.node.top; 505 return o; 506 }; 507 return this; 508 }; 509/*========================================================, 510| Stage 511|---------------------------------------------------------: 512| Window area that contains the large image 513`========================================================*/ 514 515 function Stage() { 516 var $obj = this; 517 this.node = $("<div class='zoomWindow'><div class='zoomWrapper'><div class='zoomWrapperTitle'></div><div class='zoomWrapperImage'></div></div></div>"); 518 this.ieframe = $('<iframe class="zoomIframe" src="javascript:\'\';" marginwidth="0" marginheight="0" align="bottom" scrolling="no" frameborder="0" ></iframe>'); 519 this.setposition = function () { 520 this.node.leftpos = 0; 521 this.node.toppos = 0; 522 if (settings.zoomType != 'innerzoom') { 523 //positioning 524 switch (settings.position) { 525 case "left": 526 this.node.leftpos = (smallimage.pos.l - smallimage.bleft - Math.abs(settings.xOffset) - settings.zoomWidth > 0) ? (0 - settings.zoomWidth - Math.abs(settings.xOffset)) : (smallimage.ow + Math.abs(settings.xOffset)); 527 this.node.toppos = Math.abs(settings.yOffset); 528 break; 529 case "top": 530 this.node.leftpos = Math.abs(settings.xOffset); 531 this.node.toppos = (smallimage.pos.t - smallimage.btop - Math.abs(settings.yOffset) - settings.zoomHeight > 0) ? (0 - settings.zoomHeight - Math.abs(settings.yOffset)) : (smallimage.oh + Math.abs(settings.yOffset)); 532 break; 533 case "bottom": 534 this.node.leftpos = Math.abs(settings.xOffset); 535 this.node.toppos = (smallimage.pos.t - smallimage.btop + smallimage.oh + Math.abs(settings.yOffset) + settings.zoomHeight < screen.height) ? (smallimage.oh + Math.abs(settings.yOffset)) : (0 - settings.zoomHeight - Math.abs(settings.yOffset)); 536 break; 537 default: 538 this.node.leftpos = (smallimage.rightlimit + Math.abs(settings.xOffset) + settings.zoomWidth < screen.width) ? (smallimage.ow + Math.abs(settings.xOffset)) : (0 - settings.zoomWidth - Math.abs(settings.xOffset)); 539 this.node.toppos = Math.abs(settings.yOffset); 540 break; 541 } 542 } 543 this.node.css({ 544 'left': this.node.leftpos + 'px', 545 'top': this.node.toppos + 'px' 546 }); 547 return this; 548 }; 549 this.append = function () { 550 $('.zoomPad', el).append(this.node); 551 this.node.css({ 552 position: 'absolute', 553 display: 'none', 554 zIndex: 5001 555 }); 556 if (settings.zoomType == 'innerzoom') { 557 this.node.css({ 558 cursor: 'default' 559 }); 560 var thickness = (smallimage.bleft == 0) ? 1 : smallimage.bleft; 561 $('.zoomWrapper', this.node).css({ 562 borderWidth: thickness + 'px' 563 }); 564 } 565 566 $('.zoomWrapper', this.node).css({ 567 width: Math.round(settings.zoomWidth) + 'px' , 568 borderWidth: thickness + 'px' 569 }); 570 $('.zoomWrapperImage', this.node).css({ 571 width: '100%',
572 height: Math.round(settings.zoomHeight) + 'px' 573 }); 574 //zoom title 575 $('.zoomWrapperTitle', this.node).css({ 576 width: '100%', 577 position: 'absolute' 578 }); 579 580 $('.zoomWrapperTitle', this.node).hide(); 581 if (settings.title && zoomtitle.length > 0) { 582 $('.zoomWrapperTitle', this.node).html(zoomtitle).show(); 583 } 584 $obj.setposition(); 585 }; 586 this.hide = function () { 587 switch (settings.hideEffect) { 588 case 'fadeout': 589 this.node.fadeOut(settings.fadeoutSpeed, function () {}); 590 break; 591 default: 592 this.node.hide(); 593 break; 594 } 595 this.ieframe.hide(); 596 }; 597 this.show = function () { 598 switch (settings.showEffect) { 599 case 'fadein': 600 this.node.fadeIn(); 601 this.node.fadeIn(settings.fadeinSpeed, function () {}); 602 break; 603 default: 604 this.node.show(); 605 break; 606 } 607 if (isIE6 && settings.zoomType != 'innerzoom') { 608 this.ieframe.width = this.node.width(); 609 this.ieframe.height = this.node.height(); 610 this.ieframe.left = this.node.leftpos; 611 this.ieframe.top = this.node.toppos; 612 this.ieframe.css({ 613 display: 'block', 614 position: "absolute", 615 left: this.ieframe.left, 616 top: this.ieframe.top, 617 zIndex: 99, 618 width: this.ieframe.width + 'px', 619 height: this.ieframe.height + 'px' 620 }); 621 $('.zoomPad', el).append(this.ieframe); 622 this.ieframe.show(); 623 }; 624 }; 625 }; 626/*========================================================, 627| LargeImage 628|---------------------------------------------------------: 629| The large detailed image 630`========================================================*/ 631 632 function Largeimage() { 633 var $obj = this; 634 this.node = new Image(); 635 this.loadimage = function (url) { 636 //showing preload 637 loader.show(); 638 this.url = url; 639 this.node.style.position = 'absolute'; 640 this.node.style.border = '0px'; 641 this.node.style.display = 'none'; 642 this.node.style.left = '-5000px'; 643 this.node.style.top = '0px'; 644 document.body.appendChild(this.node); 645 this.node.src = url; // fires off async 646 }; 647 this.fetchdata = function () { 648 var image = $(this.node); 649 var scale = {}; 650 this.node.style.display = 'block'; 651 $obj.w = image.width(); 652 $obj.h = image.height(); 653 $obj.pos = image.offset(); 654 $obj.pos.l = image.offset().left; 655 $obj.pos.t = image.offset().top; 656 $obj.pos.r = $obj.w + $obj.pos.l; 657 $obj.pos.b = $obj.h + $obj.pos.t; 658 scale.x = ($obj.w / smallimage.w); 659 scale.y = ($obj.h / smallimage.h); 660 el.scale = scale; 661 document.body.removeChild(this.node); 662 $('.zoomWrapperImage', el).empty().append(this.node); 663 //setting lens dimensions; 664 lens.setdimensions(); 665 }; 666 this.node.onerror = function () { 667 alert('Problems while loading the big image.'); 668 throw 'Problems while loading the big image.'; 669 }; 670 this.node.onload = function () { 671 //fetching data 672 $obj.fetchdata(); 673 loader.hide(); 674 el.largeimageloading = false;
675 el.largeimageloaded = true; 676 if (settings.zoomType == 'drag' || settings.alwaysOn) { 677 lens.show(); 678 stage.show(); 679 lens.setcenter(); 680 } 681 }; 682 this.setposition = function () { 683 var left = -el.scale.x * (lens.getoffset().left - smallimage.bleft + 1); 684 var top = -el.scale.y * (lens.getoffset().top - smallimage.btop + 1); 685 $(this.node).css({ 686 'left': left + 'px', 687 'top': top + 'px' 688 }); 689 }; 690 return this; 691 }; 692 $(el).data("jqzoom", obj); 693 }; 694 //es. $.jqzoom.disable('#jqzoom1'); 695 $.jqzoom = { 696 defaults: { 697 zoomType: 'standard', 698 //innerzoom/standard/reverse/drag 699 zoomWidth: 520, 700 //zoomWindow default width 701 zoomHeight: 520, 702 //zoomWindow default height 703 xOffset: 10, 704 //zoomWindow x offset, can be negative(more on the left) or positive(more on the right) 705 yOffset: 0, 706 //zoomWindow y offset, can be negative(more on the left) or positive(more on the right) 707 position: "right", 708 //zoomWindow default position 709 preloadImages: true, 710 //image preload 711 preloadText: 'Loading zoom', 712 title: true, 713 lens: true, 714 imageOpacity: 0.4, 715 alwaysOn: false, 716 showEffect: 'show', 717 //show/fadein 718 hideEffect: 'hide', 719 //hide/fadeout 720 fadeinSpeed: 'slow', 721 //fast/slow/number 722 fadeoutSpeed: '2000' //fast/slow/number 723 }, 724 disable: function (el) { 725 var api = $(el).data('jqzoom'); 726 api.disable(); 727 return false; 728 }, 729 enable: function (el) { 730 var api = $(el).data('jqzoom'); 731 api.enable(); 732 return false; 733 }, 734 disableAll: function (el) { 735 jqzoompluging_disabled = true; 736 }, 737 enableAll: function (el) { 738 jqzoompluging_disabled = false; 739 } 740 }; 741})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.