summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorMarco Renzi <renzi.mrc@gmail.com>2011-04-12 09:35:33 +0200
committerMarco Renzi <renzi.mrc@gmail.com>2011-04-12 09:35:33 +0200
commit2c540c8c8c05b7c545470a7e6c92982380ff3bfe (patch)
tree795032ac89f218d98d63503cd8353802a2615e51 /js
parent887a53954b6e5010445c911938d7b5e5e7f81e86 (diff)
downloadjqzoom-master.zip
jqzoom-master.tar.gz
jqzoom-master.tar.bz2
jqzoom evolution 2.2 public releaseHEAD2.22.1.1origin/masterorigin/HEADmaster
Diffstat (limited to 'js')
-rw-r--r--js/jquery.jqzoom-core.js375
-rw-r--r--js/jquery.jqzoom-core.pack.js21
2 files changed, 114 insertions, 282 deletions
diff --git a/js/jquery.jqzoom-core.js b/js/jquery.jqzoom-core.js
index 7ce4ecc..481e428 100644
--- a/js/jquery.jqzoom-core.js
+++ b/js/jquery.jqzoom-core.js
@@ -1,10 +1,10 @@
/*!
- * jQzoom Evolution Library v2.1 - Javascript Image magnifier
+ * jQzoom Evolution Library v2.2 - Javascript Image magnifier
* http://www.mind-projects.it
*
* Copyright 2011, Engineer Marco Renzi
* Licensed under the BSD license.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@@ -14,19 +14,16 @@
* documentation and/or other materials provided with the distribution.
* * Neither the name of the organization nor the
* names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * derived from this software without specific prior written permission.
*
- * Date: 21 March 2011 09:26:00
+ * Date: 11 April 2011 22:16:00
*/
-
-
(function ($) {
//GLOBAL VARIABLES
var isIE6 = ($.browser.msie && $.browser.version < 7);
var body = $(document.body);
var window = $(window);
var jqzoompluging_disabled = false; //disabilita globalmente il plugin
-
$.fn.jqzoom = function (options) {
return this.each(function () {
var node = this.nodeName.toLowerCase();
@@ -34,14 +31,11 @@
new jqzoom(this, options);
}
});
- }
-
+ };
jqzoom = function (el, options) {
var api = null;
api = $(el).data("jqzoom");
if (api) return api;
-
-
var obj = this;
var settings = $.extend({}, $.jqzoom.defaults, options || {});
obj.el = el;
@@ -52,81 +46,61 @@
el.largeimageloading = false; //tell us if large image is loading
el.largeimageloaded = false; //tell us if large image is loaded
el.scale = {};
+ el.timer = null;
el.mousepos = {};
el.mouseDown = false;
$(el).css({
'outline-style': 'none',
'text-decoration': 'none'
});
-
//BASE IMAGE
var img = $("img:eq(0)", el);
el.title = $(el).attr('title');
el.imagetitle = img.attr('title');
-
var zoomtitle = ($.trim(el.title).length > 0) ? el.title : el.imagetitle;
var smallimage = new Smallimage(img);
var lens = new Lens();
var stage = new Stage();
var largeimage = new Largeimage();
var loader = new Loader();
-
-
-
//preventing default click,allowing the onclick event [exmple: lightbox]
$(el).bind('click', function (e) {
e.preventDefault();
return false;
});
-
//setting the default zoomType if not in settings
var zoomtypes = ['standard', 'drag', 'innerzoom', 'reverse'];
if ($.inArray($.trim(settings.zoomType), zoomtypes) < 0) {
settings.zoomType = 'standard';
}
-
-
$.extend(obj, {
-
create: function () { //create the main objects
-
//create ZoomPad
if ($(".zoomPad", el).length == 0) {
el.zoomPad = $('<div/>').addClass('zoomPad');
img.wrap(el.zoomPad);
}
-
-
//creating ZoomPup
if ($(".zoomPup", el).length == 0) {
lens.append();
}
-
//creating zoomWindow
if ($(".zoomWindow", el).length == 0) {
stage.append();
}
-
//creating Preload
if ($(".zoomPreload", el).length == 0) {
loader.append();
}
-
-
//preloading images
if (settings.preloadImages || settings.zoomType == 'drag' || settings.alwaysOn) {
obj.load();
}
-
obj.init();
-
-
},
init: function () {
//drag option
if (settings.zoomType == 'drag') {
-
-
$(".zoomPad", el).mousedown(function () {
el.mouseDown = true;
});
@@ -135,48 +109,41 @@
});
document.body.ondragstart = function () {
return false;
- }
+ };
$(".zoomPad", el).css({
cursor: 'default'
});
$(".zoomPup", el).css({
cursor: 'move'
});
-
}
-
if (settings.zoomType == 'innerzoom') {
$(".zoomWrapper", el).css({
cursor: 'crosshair'
});
}
-
-
-
$(".zoomPad", el).bind('mouseenter mouseover', function (event) {
-
img.attr('title', '');
$(el).attr('title', '');
el.zoom_active = true;
//if loaded then activate else load large image
+ smallimage.fetchdata();
if (el.largeimageloaded) {
obj.activate(event);
- } else {
+ }
+ else {
obj.load();
}
-
-
-
});
-
- //////////////////////////////////////////////////////////////////////
- $(".zoomPad", el).bind('mouseleave', this, function (event) {
+ $(".zoomPad", el).bind('mouseleave', function (event) {
obj.deactivate();
- el.zoom_active = false;
-
});
-
$(".zoomPad", el).bind('mousemove', function (e) {
+ //prevent fast mouse mevements not to fire the mouseout event
+ if (e.pageX > smallimage.pos.r || e.pageX < smallimage.pos.l || e.pageY < smallimage.pos.t || e.pageY > smallimage.pos.b) {
+ lens.setcenter();
+ return false;
+ }
el.zoom_active = true;
if (el.largeimageloaded && !$('.zoomWindow', el).is(':visible')) {
obj.activate(e);
@@ -185,31 +152,23 @@
lens.setposition(e);
}
});
-
-
-
var thumb_preload = new Array();
var i = 0;
//binding click event on thumbnails
var thumblist = new Array();
thumblist = $('a').filter(function () {
var regex = new RegExp("gallery[\\s]*:[\\s]*'" + $.trim(el.rel) + "'", "i");
-
var rel = $(this).attr('rel');
if (regex.test(rel)) {
return this;
}
});
-
if (thumblist.length > 0) {
//getting the first to the last
var first = thumblist.splice(0, 1);
thumblist.push(first);
}
-
-
thumblist.each(function () {
-
//preloading thumbs
if (settings.preloadImages) {
var thumb_options = $.extend({}, eval("(" + $.trim($(this).attr('rel')) + ")"));
@@ -217,40 +176,30 @@
thumb_preload[i].src = thumb_options.largeimage;
i++;
}
-
-
-
$(this).click(function (e) {
-
thumblist.each(function () {
$(this).removeClass('zoomThumbActive');
});
- e.preventDefault()
-
+ e.preventDefault();
obj.swapimage(this);
return false;
});
});
-
-
},
-
load: function () {
if (el.largeimageloaded == false && el.largeimageloading == false) {
var url = $(el).attr('href');
el.largeimageloading = true;
largeimage.loadimage(url);
}
-
-
},
activate: function (e) {
+ clearTimeout(el.timer);
//show lens and zoomWindow
lens.show();
stage.show();
},
deactivate: function (e) {
-
switch (settings.zoomType) {
case 'drag':
//nothing or lens.setcenter();
@@ -260,18 +209,16 @@
$(el).attr('title', el.title);
if (settings.alwaysOn) {
lens.setcenter();
- } else {
-
- lens.hide();
+ }
+ else {
stage.hide();
+ lens.hide();
}
-
break;
}
-
+ el.zoom_active = false;
},
swapimage: function (link) {
-
el.largeimageloading = false;
el.largeimageloaded = false;
var options = new Object();
@@ -282,42 +229,32 @@
$(link).addClass('zoomThumbActive');
$(el).attr('href', largeimage);
img.attr('src', smallimage);
-
lens.hide();
stage.hide();
obj.load();
-
- } else {
+ }
+ else {
alert('ERROR :: Missing parameter for largeimage or smallimage.');
throw 'ERROR :: Missing parameter for largeimage or smallimage.';
}
return false;
}
-
});
-
-
-
//sometimes image is already loaded and onload will not fire
if (img[0].complete) {
//fetching data from sallimage if was previously loaded
smallimage.fetchdata();
if ($(".zoomPad", el).length == 0) obj.create();
-
}
-
-
/*========================================================,
| Smallimage
|---------------------------------------------------------:
-| Base image that is the smallest one
+| Base image into the anchor element
`========================================================*/
function Smallimage(image) {
var $obj = this;
-
this.node = image[0];
-
this.findborder = function () {
var bordertop = 0;
bordertop = image.css('border-top-width');
@@ -325,49 +262,44 @@
var borderleft = 0;
borderleft = image.css('border-left-width');
bleft = '';
-
if (bordertop) {
for (i = 0; i < 3; i++) {
var x = [];
x = bordertop.substr(i, 1);
-
if (isNaN(x) == false) {
btop = btop + '' + bordertop.substr(i, 1);
- } else {
+ }
+ else {
break;
}
}
}
-
if (borderleft) {
for (i = 0; i < 3; i++) {
if (!isNaN(borderleft.substr(i, 1))) {
bleft = bleft + borderleft.substr(i, 1)
- } else {
+ }
+ else {
break;
}
}
}
$obj.btop = (btop.length > 0) ? eval(btop) : 0;
$obj.bleft = (bleft.length > 0) ? eval(bleft) : 0;
-
-
};
this.fetchdata = function () {
+ $obj.findborder();
$obj.w = image.width();
$obj.h = image.height();
$obj.ow = image.outerWidth();
$obj.oh = image.outerHeight();
-
$obj.pos = image.offset();
- $obj.pos.l = image.offset().left;
- $obj.pos.t = image.offset().top;
+ $obj.pos.l = image.offset().left + $obj.bleft;
+ $obj.pos.t = image.offset().top + $obj.btop;
$obj.pos.r = $obj.w + $obj.pos.l;
$obj.pos.b = $obj.h + $obj.pos.t;
-
-
-
- $obj.findborder();
+ $obj.rightlimit = image.offset().left + $obj.ow;
+ $obj.bottomlimit = image.offset().top + $obj.oh;
};
this.node.onerror = function () {
alert('Problems while loading image.');
@@ -379,8 +311,6 @@
};
return $obj;
};
-
-
/*========================================================,
| Loader
|---------------------------------------------------------:
@@ -388,8 +318,7 @@
`========================================================*/
function Loader() {
- var $obj = this
-
+ var $obj = this;
this.append = function () {
this.node = $('<div/>').addClass('zoomPreload').css('visibility', 'hidden').html(settings.preloadText);
$('.zoomPad', el).append(this.node);
@@ -397,8 +326,6 @@
this.show = function () {
this.node.top = (smallimage.oh - this.node.height()) / 2;
this.node.left = (smallimage.ow - this.node.width()) / 2;
-
-
//setting position
this.node.css({
top: this.node.top,
@@ -409,13 +336,9 @@
};
this.hide = function () {
this.node.css('visibility', 'hidden');
- }
+ };
return this;
}
-
-
-
-
/*========================================================,
| Lens
|---------------------------------------------------------:
@@ -435,14 +358,10 @@
}
};
this.setdimensions = function () {
-
- this.node.w = (settings.zoomWidth) / el.scale.x;
- this.node.h = (settings.zoomHeight) / el.scale.y;
-
+ this.node.w = (parseInt((settings.zoomWidth) / el.scale.x) > smallimage.w) ? smallimage.w : parseInt((settings.zoomWidth) / el.scale.x);
+ this.node.h = (parseInt((settings.zoomHeight) / el.scale.y) > smallimage.h) ? smallimage.h : parseInt((settings.zoomHeight) / el.scale.y);
this.node.top = (smallimage.oh - this.node.h - 2) / 2;
this.node.left = (smallimage.ow - this.node.w - 2) / 2;
-
-
//centering lens
this.node.css({
top: 0,
@@ -453,8 +372,6 @@
display: 'none',
borderWidth: 1 + 'px'
});
-
-
if (settings.zoomType == 'reverse') {
this.image.src = smallimage.node.src;
$(this.node).css({
@@ -465,24 +382,17 @@
left: -(this.node.left + 1 - smallimage.bleft) + 'px',
top: -(this.node.top + 1 - smallimage.btop) + 'px'
});
-
}
-
-
};
-
this.setcenter = function () {
-
//calculating center position
this.node.top = (smallimage.oh - this.node.h - 2) / 2;
this.node.left = (smallimage.ow - this.node.w - 2) / 2;
-
//centering lens
this.node.css({
top: this.node.top,
left: this.node.left
});
-
if (settings.zoomType == 'reverse') {
$(this.image).css({
position: 'absolute',
@@ -490,81 +400,50 @@
top: -(this.node.top + 1 - smallimage.btop) + 'px'
});
}
-
-
//centering large image
largeimage.setposition();
-
};
-
-
this.setposition = function (e) {
-
el.mousepos.x = e.pageX;
el.mousepos.y = e.pageY;
var lensleft = 0;
var lenstop = 0;
function overleft(lens) {
- return el.mousepos.x - (lens.w) / 2 - smallimage.bleft < smallimage.pos.l;
+ return el.mousepos.x - (lens.w) / 2 < smallimage.pos.l; //el.mousepos.x - (lens.w) / 2 - smallimage.bleft <
}
function overright(lens) {
- return el.mousepos.x + (lens.w) / 2 > smallimage.pos.r + smallimage.bleft;
+ return el.mousepos.x + (lens.w) / 2 > smallimage.pos.r; //+ smallimage.bleft
}
function overtop(lens) {
- return el.mousepos.y - (lens.h) / 2 < smallimage.pos.t + smallimage.btop;
+ return el.mousepos.y - (lens.h) / 2 < smallimage.pos.t; // + smallimage.btop;
}
function overbottom(lens) {
- return el.mousepos.y + (lens.h) / 2 > smallimage.pos.b + smallimage.btop;
+ return el.mousepos.y + (lens.h) / 2 > smallimage.pos.b; // + smallimage.btop;
}
-
- lensleft = el.mousepos.x - smallimage.pos.l - (this.node.w + 2) / 2;
- lenstop = el.mousepos.y - smallimage.pos.t - (this.node.h + 2) / 2;
-
-
+ lensleft = el.mousepos.x + smallimage.bleft - smallimage.pos.l - (this.node.w + 2) / 2;
+ lenstop = el.mousepos.y + smallimage.btop - smallimage.pos.t - (this.node.h + 2) / 2;
if (overleft(this.node)) {
- lensleft = smallimage.btop - 1;
- } else
-
- if (overright(this.node)) {
-
- if ($.browser.mozilla) {
- lensleft = smallimage.w + smallimage.bleft - this.node.w - 1;
- } else {
- lensleft = smallimage.w + smallimage.bleft - this.node.w;
- }
-
+ lensleft = smallimage.bleft - 1;
+ }
+ else if (overright(this.node)) {
+ lensleft = smallimage.w + smallimage.bleft - this.node.w - 1;
}
-
-
if (overtop(this.node)) {
lenstop = smallimage.btop - 1;
- } else
-
- if (overbottom(this.node)) {
-
-
- if ($.browser.mozilla) {
- lenstop = smallimage.h + smallimage.btop - this.node.h - 1;
- } else {
- lenstop = smallimage.h + smallimage.btop - this.node.h;
- }
-
-
}
-
-
-
+ else if (overbottom(this.node)) {
+ lenstop = smallimage.h + smallimage.btop - this.node.h - 1;
+ }
this.node.left = lensleft;
this.node.top = lenstop;
this.node.css({
'left': lensleft + 'px',
'top': lenstop + 'px'
});
-
if (settings.zoomType == 'reverse') {
$(this.image).css({
position: 'absolute',
@@ -572,10 +451,7 @@
top: -(this.node.top + 1 - smallimage.btop) + 'px'
});
}
-
largeimage.setposition();
-
-
};
this.hide = function () {
img.css({
@@ -597,15 +473,10 @@
var o = {};
o.left = $obj.node.left;
o.top = $obj.node.top;
-
return o;
};
return this;
};
-
-
-
-
/*========================================================,
| Stage
|---------------------------------------------------------:
@@ -617,27 +488,25 @@
this.node = $("<div class='zoomWindow'><div class='zoomWrapper'><div class='zoomWrapperTitle'></div><div class='zoomWrapperImage'></div></div></div>");
this.ieframe = $('<iframe class="zoomIframe" src="javascript:\'\';" marginwidth="0" marginheight="0" align="bottom" scrolling="no" frameborder="0" ></iframe>');
this.setposition = function () {
-
this.node.leftpos = 0;
this.node.toppos = 0;
if (settings.zoomType != 'innerzoom') {
-
//positioning
switch (settings.position) {
case "left":
- this.node.leftpos = (smallimage.pos.l - smallimage.bleft - Math.abs(settings.xOffset) - settings.zoomWidth > 0) ? (0 - settings.zoomWidth - Math.abs(settings.xOffset)) : (smallimage.w + 2 * smallimage.bleft + Math.abs(settings.xOffset));
+ 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));
this.node.toppos = Math.abs(settings.yOffset);
break;
case "top":
- this.node.leftpos = Math.abs(settings.yOffset);
- this.node.toppos = (smallimage.pos.t - smallimage.btop - Math.abs(settings.yOffset) - settings.zoomHeight > 0) ? (0 - settings.zoomHeight - Math.abs(settings.yOffset)) : (smallimage.h + 2 * smallimage.btop + Math.abs(settings.yOffset));
+ this.node.leftpos = Math.abs(settings.xOffset);
+ 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));
break;
case "bottom":
- this.node.leftpos = Math.abs(settings.yOffset);
- this.node.toppos = (smallimage.pos.t + smallimage.w + 2 * smallimage.btop + Math.abs(settings.yOffset) + settings.zoomHeight < screen.height) ? (smallimage.h + 2 * smallimage.btop + Math.abs(settings.yOffset)) : (0 - settings.zoomHeight - Math.abs(settings.yOffset));
+ this.node.leftpos = Math.abs(settings.xOffset);
+ 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));
break;
default:
- this.node.leftpos = (smallimage.pos.l + 2 * smallimage.bleft + smallimage.w + Math.abs(settings.xOffset) + settings.zoomWidth < screen.width) ? (smallimage.w + 2 * smallimage.bleft + Math.abs(settings.xOffset)) : (0 - settings.zoomWidth - Math.abs(settings.xOffset));
+ 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));
this.node.toppos = Math.abs(settings.yOffset);
break;
}
@@ -649,22 +518,17 @@
return this;
};
this.append = function () {
-
$('.zoomPad', el).append(this.node);
-
this.node.css({
position: 'absolute',
display: 'none',
zIndex: 5001
});
-
-
if (settings.zoomType == 'innerzoom') {
-
this.node.css({
cursor: 'default'
});
- var thickness = (smallimage.bleft == 0) ? 1 : smallimage.bleft
+ var thickness = (smallimage.bleft == 0) ? 1 : smallimage.bleft;
$('.zoomWrapper', this.node).css({
width: smallimage.w + 'px',
borderWidth: thickness + 'px'
@@ -673,82 +537,57 @@
width: '100%',
height: smallimage.h + 'px'
});
-
$('.zoomWrapperTitle', this.node).css({
width: '100%',
position: 'absolute'
});
- } else {
-
-
+ }
+ else {
$('.zoomWrapper', this.node).css({
width: Math.round(settings.zoomWidth) + 'px'
});
-
$('.zoomWrapperImage', this.node).css({
width: '100%',
height: Math.round(settings.zoomHeight) + 'px'
});
-
-
-
- this.node.bind('mouseover mousemove mouseenter', function (event) {
- obj.deactivate();
- if (settings.zoomType != 'innerzoom' && !settings.alwaysOn) {
- //obj.deactivate();
- }
- });
-
$('.zoomWrapperTitle', this.node).css({
width: '100%',
position: 'absolute'
});
}
-
//zoom title
$('.zoomWrapperTitle', this.node).hide();
if (settings.title && zoomtitle.length > 0) {
-
$('.zoomWrapperTitle', this.node).html(zoomtitle).show();
}
$obj.setposition();
-
-
};
-
this.hide = function () {
switch (settings.hideEffect) {
case 'fadeout':
- this.node.fadeOut(settings.fadeoutSpeed, function () {
- if (el.zoom_active) $(this).show();
- });
+ this.node.fadeOut(settings.fadeoutSpeed, function () {});
break;
default:
this.node.hide();
break;
}
this.ieframe.hide();
- }
+ };
this.show = function () {
-
switch (settings.showEffect) {
case 'fadein':
- this.node.fadeIn(settings.fadeinSpeed, function () {
- if (!el.zoom_active) $(this).hide();
- });
+ this.node.fadeIn();
+ this.node.fadeIn(settings.fadeinSpeed, function () {});
break;
default:
this.node.show();
break;
}
-
if (isIE6 && settings.zoomType != 'innerzoom') {
-
this.ieframe.width = this.node.width();
this.ieframe.height = this.node.height();
this.ieframe.left = this.node.leftpos;
this.ieframe.top = this.node.toppos;
-
this.ieframe.css({
display: 'block',
position: "absolute",
@@ -761,11 +600,8 @@
$('.zoomPad', el).append(this.ieframe);
this.ieframe.show();
};
-
-
- }
- }
-
+ };
+ };
/*========================================================,
| LargeImage
|---------------------------------------------------------:
@@ -775,36 +611,24 @@
function Largeimage() {
var $obj = this;
this.node = new Image();
-
this.loadimage = function (url) {
-
//showing preload
loader.show();
this.url = url;
-
-
- //if(!this.node)
- //this.node = new Image();
this.node.style.position = 'absolute';
this.node.style.border = '0px';
this.node.style.display = 'none';
this.node.style.left = '-5000px';
this.node.style.top = '0px';
-
-
document.body.appendChild(this.node);
this.node.src = url; // fires off async
-
- }
+ };
this.fetchdata = function () {
var image = $(this.node);
- var scale = {}
+ var scale = {};
this.node.style.display = 'block';
-
$obj.w = image.width();
$obj.h = image.height();
-
-
$obj.pos = image.offset();
$obj.pos.l = image.offset().left;
$obj.pos.t = image.offset().top;
@@ -813,77 +637,67 @@
scale.x = ($obj.w / smallimage.w);
scale.y = ($obj.h / smallimage.h);
el.scale = scale;
-
document.body.removeChild(this.node);
$('.zoomWrapperImage', el).empty().append(this.node);
-
//setting lens dimensions;
lens.setdimensions();
-
-
};
-
this.node.onerror = function () {
alert('Problems while loading the big image.');
throw 'Problems while loading the big image.';
- }
-
-
+ };
this.node.onload = function () {
-
//fetching data
$obj.fetchdata();
-
-
loader.hide();
el.largeimageloading = false;
el.largeimageloaded = true;
if (settings.zoomType == 'drag' || settings.alwaysOn) {
-
lens.show();
stage.show();
lens.setcenter();
}
};
-
this.setposition = function () {
-
-
var left = -el.scale.x * (lens.getoffset().left - smallimage.bleft + 1);
var top = -el.scale.y * (lens.getoffset().top - smallimage.btop + 1);
$(this.node).css({
'left': left + 'px',
'top': top + 'px'
});
-
};
-
return this;
- }
-
- $(el).data("jqzoom",obj);
- }
-
-
-
+ };
+ $(el).data("jqzoom", obj);
+ };
//es. $.jqzoom.disable('#jqzoom1');
$.jqzoom = {
defaults: {
- zoomType: 'standard',//innerzoom/standard/reverse/drag
- zoomWidth: 300,//zoomWindow default width
- zoomHeight: 300,//zoomWindow default height
- xOffset: 10,//zoomWindow x offset, can be negative(more on the left) or positive(more on the right)
- yOffset: 0,//zoomWindow y offset, can be negative(more on the left) or positive(more on the right)
- position: "right",//zoomWindow default position
- preloadImages: true,//image preload
+ zoomType: 'standard',
+ //innerzoom/standard/reverse/drag
+ zoomWidth: 300,
+ //zoomWindow default width
+ zoomHeight: 300,
+ //zoomWindow default height
+ xOffset: 10,
+ //zoomWindow x offset, can be negative(more on the left) or positive(more on the right)
+ yOffset: 0,
+ //zoomWindow y offset, can be negative(more on the left) or positive(more on the right)
+ position: "right",
+ //zoomWindow default position
+ preloadImages: true,
+ //image preload
preloadText: 'Loading zoom',
title: true,
lens: true,
imageOpacity: 0.4,
alwaysOn: false,
- showEffect: 'show',//show/fadein
- hideEffect: 'hide',//hide/fadeout
- fadeinSpeed: 'slow',//fast/slow/number
+ showEffect: 'show',
+ //show/fadein
+ hideEffect: 'hide',
+ //hide/fadeout
+ fadeinSpeed: 'slow',
+ //fast/slow/number
fadeoutSpeed: '2000' //fast/slow/number
},
disable: function (el) {
@@ -902,8 +716,5 @@
enableAll: function (el) {
jqzoompluging_disabled = false;
}
-
- }
-
-
+ };
})(jQuery); \ No newline at end of file
diff --git a/js/jquery.jqzoom-core.pack.js b/js/jquery.jqzoom-core.pack.js
new file mode 100644
index 0000000..70d3203
--- /dev/null
+++ b/js/jquery.jqzoom-core.pack.js
@@ -0,0 +1,21 @@
+/*!
+ * jQzoom Evolution Library v2.2 - Javascript Image magnifier
+ * http://www.mind-projects.it
+ *
+ * Copyright 2011, Engineer Marco Renzi
+ * Licensed under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the organization nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * Date: 11 April 2011 22:16:00
+ */
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(8($){9 v=($.2f.3b&&$.2f.3c<7);9 w=$(1A.1B);9 y=$(y);9 z=F;$.3d.14=8(b){H 5.1Y(8(){9 a=5.3e.3f();A(a==\'a\'){Q 14(5,b)}})};14=8(g,h){9 j=2g;j=$(g).1C("14");A(j)H j;9 k=5;9 l=$.1D({},$.14.2h,h||{});k.3g=g;g.1n=$(g).R(\'1n\');g.1E=F;g.3h=F;g.1t=F;g.1h=F;g.19={};g.2i=2g;g.15={};g.1F=F;$(g).D({\'3i-1i\':\'1u\',\'3j-3k\':\'1u\'});9 m=$("3l:3m(0)",g);g.U=$(g).R(\'U\');g.1Z=m.R(\'U\');9 n=($.1v(g.U).Y>0)?g.U:g.1Z;9 p=Q 2j(m);9 q=Q 2k();9 r=Q 2l();9 s=Q 2m();9 t=Q 2n();$(g).1G(\'2o\',8(e){e.2p();H F});9 u=[\'20\',\'1a\',\'1o\',\'1p\'];A($.3n($.1v(l.I),u)<0){l.I=\'20\'}$.1D(k,{21:8(){A($(".M",g).Y==0){g.M=$(\'<Z/>\').1H(\'M\');m.3o(g.M)}A($(".22",g).Y==0){q.V()}A($(".23",g).Y==0){r.V()}A($(".2q",g).Y==0){t.V()}A(l.24||l.I==\'1a\'||l.1I){k.1J()}k.2r()},2r:8(){A(l.I==\'1a\'){$(".M",g).3p(8(){g.1F=16});$(".M",g).3q(8(){g.1F=F});1A.1B.3r=8(){H F};$(".M",g).D({1K:\'1q\'});$(".22",g).D({1K:\'3s\'})}A(l.I==\'1o\'){$(".1L",g).D({1K:\'3t\'})}$(".M",g).1G(\'3u 3v\',8(a){m.R(\'U\',\'\');$(g).R(\'U\',\'\');g.1E=16;p.1r();A(g.1h){k.25(a)}1b{k.1J()}});$(".M",g).1G(\'3w\',8(a){k.2s()});$(".M",g).1G(\'3x\',8(e){A(e.26>p.E.r||e.26<p.E.l||e.27<p.E.t||e.27>p.E.b){q.1M();H F}g.1E=16;A(g.1h&&!$(\'.23\',g).3y(\':2t\')){k.25(e)}A(g.1h&&(l.I!=\'1a\'||(l.I==\'1a\'&&g.1F))){q.1j(e)}});9 c=Q 2u();9 i=0;9 d=Q 2u();d=$(\'a\').3z(8(){9 a=Q 3A("3B[\\\\s]*:[\\\\s]*\'"+$.1v(g.1n)+"\'","i");9 b=$(5).R(\'1n\');A(a.3C(b)){H 5}});A(d.Y>0){9 f=d.3D(0,1);d.3E(f)}d.1Y(8(){A(l.24){9 a=$.1D({},1N("("+$.1v($(5).R(\'1n\'))+")"));c[i]=Q 28();c[i].1c=a.1w;i++}$(5).2o(8(e){d.1Y(8(){$(5).3F(\'2v\')});e.2p();k.2w(5);H F})})},1J:8(){A(g.1h==F&&g.1t==F){9 a=$(g).R(\'2x\');g.1t=16;s.2y(a)}},25:8(e){3G(g.2i);q.S();r.S()},2s:8(e){1O(l.I){1s\'1a\':W;1q:m.R(\'U\',g.1Z);$(g).R(\'U\',g.U);A(l.1I){q.1M()}1b{r.P();q.P()}W}g.1E=F},2w:8(a){g.1t=F;g.1h=F;9 b=Q 3H();b=$.1D({},1N("("+$.1v($(a).R(\'1n\'))+")"));A(b.1P&&b.1w){9 c=b.1P;9 d=b.1w;$(a).1H(\'2v\');$(g).R(\'2x\',d);m.R(\'1c\',c);q.P();r.P();k.1J()}1b{29(\'2z :: 2A 2B 1Q 1w 2C 1P.\');2a\'2z :: 2A 2B 1Q 1w 2C 1P.\';}H F}});A(m[0].3I){p.1r();A($(".M",g).Y==0)k.21()}8 2j(c){9 d=5;5.6=c[0];5.2D=8(){9 a=0;a=c.D(\'2b-B-K\');N=\'\';9 b=0;b=c.D(\'2b-C-K\');L=\'\';A(a){1Q(i=0;i<3;i++){9 x=[];x=a.1R(i,1);A(2E(x)==F){N=N+\'\'+a.1R(i,1)}1b{W}}}A(b){1Q(i=0;i<3;i++){A(!2E(b.1R(i,1))){L=L+b.1R(i,1)}1b{W}}}d.N=(N.Y>0)?1N(N):0;d.L=(L.Y>0)?1N(L):0};5.1r=8(){d.2D();d.w=c.K();d.h=c.11();d.1k=c.3J();d.1d=c.3K();d.E=c.1e();d.E.l=c.1e().C+d.L;d.E.t=c.1e().B+d.N;d.E.r=d.w+d.E.l;d.E.b=d.h+d.E.t;d.2F=c.1e().C+d.1k;d.3L=c.1e().B+d.1d};5.6.2G=8(){29(\'1S 1T 1U 12.\');2a\'1S 1T 1U 12.\';};5.6.2H=8(){d.1r();A($(".M",g).Y==0)k.21()};H d};8 2n(){9 a=5;5.V=8(){5.6=$(\'<Z/>\').1H(\'2q\').D(\'2c\',\'2I\').2J(l.2K);$(\'.M\',g).V(5.6)};5.S=8(){5.6.B=(p.1d-5.6.11())/2;5.6.C=(p.1k-5.6.K())/2;5.6.D({B:5.6.B,C:5.6.C,X:\'13\',2c:\'2t\'})};5.P=8(){5.6.D(\'2c\',\'2I\')};H 5}8 2k(){9 d=5;5.6=$(\'<Z/>\').1H(\'22\');5.V=8(){$(\'.M\',g).V($(5.6).P());A(l.I==\'1p\'){5.12=Q 28();5.12.1c=p.6.1c;$(5.6).2L().V(5.12)}};5.2M=8(){5.6.w=(1V((l.1f)/g.19.x)>p.w)?p.w:1V((l.1f)/g.19.x);5.6.h=(1V((l.1g)/g.19.y)>p.h)?p.h:1V((l.1g)/g.19.y);5.6.B=(p.1d-5.6.h-2)/2;5.6.C=(p.1k-5.6.w-2)/2;5.6.D({B:0,C:0,K:5.6.w+\'G\',11:5.6.h+\'G\',X:\'13\',1x:\'1u\',2N:1+\'G\'});A(l.I==\'1p\'){5.12.1c=p.6.1c;$(5.6).D({\'2d\':1});$(5.12).D({X:\'13\',C:-(5.6.C+1-p.L)+\'G\',B:-(5.6.B+1-p.N)+\'G\'})}};5.1M=8(){5.6.B=(p.1d-5.6.h-2)/2;5.6.C=(p.1k-5.6.w-2)/2;5.6.D({B:5.6.B,C:5.6.C});A(l.I==\'1p\'){$(5.12).D({X:\'13\',C:-(5.6.C+1-p.L)+\'G\',B:-(5.6.B+1-p.N)+\'G\'})}s.1j()};5.1j=8(e){g.15.x=e.26;g.15.y=e.27;9 b=0;9 c=0;8 2O(a){H g.15.x-(a.w)/2<p.E.l}8 2P(a){H g.15.x+(a.w)/2>p.E.r}8 2Q(a){H g.15.y-(a.h)/2<p.E.t}8 2R(a){H g.15.y+(a.h)/2>p.E.b}b=g.15.x+p.L-p.E.l-(5.6.w+2)/2;c=g.15.y+p.N-p.E.t-(5.6.h+2)/2;A(2O(5.6)){b=p.L-1}1b A(2P(5.6)){b=p.w+p.L-5.6.w-1}A(2Q(5.6)){c=p.N-1}1b A(2R(5.6)){c=p.h+p.N-5.6.h-1}5.6.C=b;5.6.B=c;5.6.D({\'C\':b+\'G\',\'B\':c+\'G\'});A(l.I==\'1p\'){$(5.12).D({X:\'13\',C:-(5.6.C+1-p.L)+\'G\',B:-(5.6.B+1-p.N)+\'G\'})}s.1j()};5.P=8(){m.D({\'2d\':1});5.6.P()};5.S=8(){A(l.I!=\'1o\'&&(l.2S||l.I==\'1a\')){5.6.S()}A(l.I==\'1p\'){m.D({\'2d\':l.2T})}};5.2e=8(){9 o={};o.C=d.6.C;o.B=d.6.B;H o};H 5};8 2l(){9 b=5;5.6=$("<Z 1y=\'23\'><Z 1y=\'1L\'><Z 1y=\'1z\'></Z><Z 1y=\'1W\'></Z></Z></Z>");5.T=$(\'<2U 1y="3M" 1c="3N:\\\'\\\';" 3O="0" 3P="0" 3Q="2V" 3R="3S" 3T="0" ></2U>\');5.1j=8(){5.6.1l=0;5.6.1m=0;A(l.I!=\'1o\'){1O(l.X){1s"C":5.6.1l=(p.E.l-p.L-J.O(l.17)-l.1f>0)?(0-l.1f-J.O(l.17)):(p.1k+J.O(l.17));5.6.1m=J.O(l.18);W;1s"B":5.6.1l=J.O(l.17);5.6.1m=(p.E.t-p.N-J.O(l.18)-l.1g>0)?(0-l.1g-J.O(l.18)):(p.1d+J.O(l.18));W;1s"2V":5.6.1l=J.O(l.17);5.6.1m=(p.E.t-p.N+p.1d+J.O(l.18)+l.1g<2W.11)?(p.1d+J.O(l.18)):(0-l.1g-J.O(l.18));W;1q:5.6.1l=(p.2F+J.O(l.17)+l.1f<2W.K)?(p.1k+J.O(l.17)):(0-l.1f-J.O(l.17));5.6.1m=J.O(l.18);W}}5.6.D({\'C\':5.6.1l+\'G\',\'B\':5.6.1m+\'G\'});H 5};5.V=8(){$(\'.M\',g).V(5.6);5.6.D({X:\'13\',1x:\'1u\',2X:3U});A(l.I==\'1o\'){5.6.D({1K:\'1q\'});9 a=(p.L==0)?1:p.L;$(\'.1L\',5.6).D({K:p.w+\'G\',2N:a+\'G\'});$(\'.1W\',5.6).D({K:\'1X%\',11:p.h+\'G\'});$(\'.1z\',5.6).D({K:\'1X%\',X:\'13\'})}1b{$(\'.1L\',5.6).D({K:J.2Y(l.1f)+\'G\'});$(\'.1W\',5.6).D({K:\'1X%\',11:J.2Y(l.1g)+\'G\'});$(\'.1z\',5.6).D({K:\'1X%\',X:\'13\'})}$(\'.1z\',5.6).P();A(l.U&&n.Y>0){$(\'.1z\',5.6).2J(n).S()}b.1j()};5.P=8(){1O(l.2Z){1s\'3V\':5.6.3W(l.30,8(){});W;1q:5.6.P();W}5.T.P()};5.S=8(){1O(l.31){1s\'3X\':5.6.32();5.6.32(l.33,8(){});W;1q:5.6.S();W}A(v&&l.I!=\'1o\'){5.T.K=5.6.K();5.T.11=5.6.11();5.T.C=5.6.1l;5.T.B=5.6.1m;5.T.D({1x:\'34\',X:"13",C:5.T.C,B:5.T.B,2X:3Y,K:5.T.K+\'G\',11:5.T.11+\'G\'});$(\'.M\',g).V(5.T);5.T.S()}}};8 2m(){9 c=5;5.6=Q 28();5.2y=8(a){t.S();5.3Z=a;5.6.1i.X=\'13\';5.6.1i.2b=\'35\';5.6.1i.1x=\'1u\';5.6.1i.C=\'-40\';5.6.1i.B=\'35\';1A.1B.41(5.6);5.6.1c=a};5.1r=8(){9 a=$(5.6);9 b={};5.6.1i.1x=\'34\';c.w=a.K();c.h=a.11();c.E=a.1e();c.E.l=a.1e().C;c.E.t=a.1e().B;c.E.r=c.w+c.E.l;c.E.b=c.h+c.E.t;b.x=(c.w/p.w);b.y=(c.h/p.h);g.19=b;1A.1B.42(5.6);$(\'.1W\',g).2L().V(5.6);q.2M()};5.6.2G=8(){29(\'1S 1T 1U 36 37 12.\');2a\'1S 1T 1U 36 37 12.\';};5.6.2H=8(){c.1r();t.P();g.1t=F;g.1h=16;A(l.I==\'1a\'||l.1I){q.S();r.S();q.1M()}};5.1j=8(){9 a=-g.19.x*(q.2e().C-p.L+1);9 b=-g.19.y*(q.2e().B-p.N+1);$(5.6).D({\'C\':a+\'G\',\'B\':b+\'G\'})};H 5};$(g).1C("14",k)};$.14={2h:{I:\'20\',1f:38,1g:38,17:10,18:0,X:"43",24:16,2K:\'44 45\',U:16,2S:16,2T:0.4,1I:F,31:\'S\',2Z:\'P\',33:\'46\',30:\'47\'},39:8(a){9 b=$(a).1C(\'14\');b.39();H F},3a:8(a){9 b=$(a).1C(\'14\');b.3a();H F},48:8(a){z=16},49:8(a){z=F}}})(4a);',62,259,'|||||this|node||function|var|||||||||||||||||||||||||||if|top|left|css|pos|false|px|return|zoomType|Math|width|bleft|zoomPad|btop|abs|hide|new|attr|show|ieframe|title|append|break|position|length|div||height|image|absolute|jqzoom|mousepos|true|xOffset|yOffset|scale|drag|else|src|oh|offset|zoomWidth|zoomHeight|largeimageloaded|style|setposition|ow|leftpos|toppos|rel|innerzoom|reverse|default|fetchdata|case|largeimageloading|none|trim|largeimage|display|class|zoomWrapperTitle|document|body|data|extend|zoom_active|mouseDown|bind|addClass|alwaysOn|load|cursor|zoomWrapper|setcenter|eval|switch|smallimage|for|substr|Problems|while|loading|parseInt|zoomWrapperImage|100|each|imagetitle|standard|create|zoomPup|zoomWindow|preloadImages|activate|pageX|pageY|Image|alert|throw|border|visibility|opacity|getoffset|browser|null|defaults|timer|Smallimage|Lens|Stage|Largeimage|Loader|click|preventDefault|zoomPreload|init|deactivate|visible|Array|zoomThumbActive|swapimage|href|loadimage|ERROR|Missing|parameter|or|findborder|isNaN|rightlimit|onerror|onload|hidden|html|preloadText|empty|setdimensions|borderWidth|overleft|overright|overtop|overbottom|lens|imageOpacity|iframe|bottom|screen|zIndex|round|hideEffect|fadeoutSpeed|showEffect|fadeIn|fadeinSpeed|block|0px|the|big|300|disable|enable|msie|version|fn|nodeName|toLowerCase|el|zoom_disabled|outline|text|decoration|img|eq|inArray|wrap|mousedown|mouseup|ondragstart|move|crosshair|mouseenter|mouseover|mouseleave|mousemove|is|filter|RegExp|gallery|test|splice|push|removeClass|clearTimeout|Object|complete|outerWidth|outerHeight|bottomlimit|zoomIframe|javascript|marginwidth|marginheight|align|scrolling|no|frameborder|5001|fadeout|fadeOut|fadein|99|url|5000px|appendChild|removeChild|right|Loading|zoom|slow|2000|disableAll|enableAll|jQuery'.split('|'),0,{})) \ No newline at end of file