CueBlocks_Zoom - Version 1.2

Version Notes

1)To have a better view of zoom functionality you need to upload image equal or greater than 800*800 pixels

2)template/catalog/product/view/media.phtml file will be ignored and the one in the extension will be used for the zoom function to work on the product page. So if you have customized your media.phtml file, you will need to copy your custom code and paste it in this "new" file located at /design/frontend/default/default/template/zoom/media.phtml. For help, please get in touch with us at magento@cueblocks.com

3)This extension will work for simple,configurable,bundled,virtual and grouped products.

Download this release

Release Info

Developer Magento Core Team
Extension CueBlocks_Zoom
Version 1.2
Comparing to
See all releases


Code changes from version 1.1 to 1.2

app/code/community/JM/Zoom/Helper/Data.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
  *
4
- * Package :- CueBlocks_Zoom-1.1.tgz
5
- * Version :- 1.1
6
  * Edition :- Community
7
  * Developed By :- CueBlocks.com
8
  *
1
  <?php
2
  /**
3
  *
4
+ * Package :- CueBlocks_Zoom-1.2.tgz
5
+ * Version :- 1.2
6
  * Edition :- Community
7
  * Developed By :- CueBlocks.com
8
  *
app/code/community/JM/Zoom/etc/adminhtml.xml DELETED
@@ -1,33 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- /**
4
- *
5
- * Package :- CueBlocks_Zoom-1.1.tgz
6
- * Version :- 1.1
7
- * Edition :- Community
8
- * Developed By :- CueBlocks.com
9
- *
10
- */
11
- -->
12
- <config>
13
- <acl>
14
- <resources>
15
- <admin>
16
- <children>
17
- <system>
18
- <children>
19
- <config>
20
- <children>
21
- <zoom translate="title" module="zoom">
22
- <title>Zoom Section</title>
23
- <sort_order>55</sort_order>
24
- </zoom>
25
- </children>
26
- </config>
27
- </children>
28
- </system>
29
- </children>
30
- </admin>
31
- </resources>
32
- </acl>
33
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/JM/Zoom/etc/config.xml CHANGED
@@ -2,8 +2,8 @@
2
  <!--
3
  /**
4
  *
5
- * Package :- CueBlocks_Zoom-1.1.tgz
6
- * Version :- 1.1
7
  * Edition :- Community
8
  * Developed By :- CueBlocks.com
9
  *
2
  <!--
3
  /**
4
  *
5
+ * Package :- CueBlocks_Zoom-1.2.tgz
6
+ * Version :- 1.2
7
  * Edition :- Community
8
  * Developed By :- CueBlocks.com
9
  *
app/code/community/JM/Zoom/etc/system.xml DELETED
@@ -1,19 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- *
5
- * Package :- CueBlocks_Zoom-1.1.tgz
6
- * Version :- 1.1
7
- * Edition :- Community
8
- * Developed By :- CueBlocks.com
9
- *
10
- */
11
- -->
12
- <config>
13
- <tabs>
14
- <zoom-master translate="label" module="zoom">
15
- <label>zoom-master</label>
16
- <sort_order>196</sort_order>
17
- </zoom-master>
18
- </tabs>
19
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/JM/readme.txt CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
- * Package :- CueBlocks_Zoom-1.1.tgz
3
- * Version :- 1.1
4
  * Edition :- Community
5
  * Developed By :- CueBlocks.com
6
  *
1
  /**
2
+ * Package :- CueBlocks_Zoom-1.2.tgz
3
+ * Version :- 1.2
4
  * Edition :- Community
5
  * Developed By :- CueBlocks.com
6
  *
app/design/frontend/default/default/layout/zoom.xml CHANGED
@@ -2,8 +2,8 @@
2
  <!--
3
  /**
4
  *
5
- * Package :- CueBlocks_Zoom-1.1.tgz
6
- * Version :- 1.1
7
  * Edition :- Community
8
  * Developed By :- CueBlocks.com
9
  *
@@ -12,11 +12,12 @@
12
  <layout version="0.1.0">
13
 
14
  <catalog_product_view>
15
- <reference name="head">
 
16
  <action method="addJs"><script>jquery/jquery-1.3.2.min.js</script></action>
17
- <action method="addJs"><script>jquery/jqzoom.pack.1.0.1.js</script></action>
18
  <action method="addJs"><script>jquery/Cuejqzoom.js</script></action>
19
- <action method="addItem"><type>skin_css</type><name>css/jqzoom.css</name><params/></action>
20
  </reference>
21
  <reference name="product.info.media">
22
  <action method="setTemplate" ifconfig="zoom/general/enabled"><template>zoom/media.phtml</template></action>
@@ -24,11 +25,12 @@
24
  </catalog_product_view>
25
 
26
  <review_product_list>
27
- <reference name="head">
 
28
  <action method="addJs"><script>jquery/jquery-1.3.2.min.js</script></action>
29
- <action method="addJs"><script>jquery/jqzoom.pack.1.0.1.js</script></action>
30
- <action method="addJs"><script>jquery/Cuejqzoom.js</script></action>
31
- <action method="addItem"><type>skin_css</type><name>css/jqzoom.css</name><params/></action>
32
  </reference>
33
  <reference name="product.info.media">
34
  <action method="setTemplate" ifconfig="zoom/general/enabled"><template>zoom/media.phtml</template></action>
2
  <!--
3
  /**
4
  *
5
+ * Package :- CueBlocks_Zoom-1.2.tgz
6
+ * Version :- 1.2
7
  * Edition :- Community
8
  * Developed By :- CueBlocks.com
9
  *
12
  <layout version="0.1.0">
13
 
14
  <catalog_product_view>
15
+ <reference name="head">
16
+ <action method="addItem"><type>skin_css</type><name>css/jqzoom.css</name><params/></action>
17
  <action method="addJs"><script>jquery/jquery-1.3.2.min.js</script></action>
18
+ <action method="addJs"><script>jquery/jquery.jqzoom1.0.1.js</script></action>
19
  <action method="addJs"><script>jquery/Cuejqzoom.js</script></action>
20
+
21
  </reference>
22
  <reference name="product.info.media">
23
  <action method="setTemplate" ifconfig="zoom/general/enabled"><template>zoom/media.phtml</template></action>
25
  </catalog_product_view>
26
 
27
  <review_product_list>
28
+ <reference name="head">
29
+ <action method="addItem"><type>skin_css</type><name>css/jqzoom.css</name><params/></action>
30
  <action method="addJs"><script>jquery/jquery-1.3.2.min.js</script></action>
31
+ <action method="addJs"><script>jquery/jquery.jqzoom1.0.1.js</script></action>
32
+ <action method="addJs"><script>jquery/Cuejqzoom.js</script></action>
33
+
34
  </reference>
35
  <reference name="product.info.media">
36
  <action method="setTemplate" ifconfig="zoom/general/enabled"><template>zoom/media.phtml</template></action>
app/design/frontend/default/default/template/zoom/media.phtml CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
- * Package :- CueBlocks_Zoom-1.1.tgz
4
- * Version :- 1.1
5
  * Edition :- Community
6
  * Developed By :- CueBlocks.com
7
  *
@@ -11,31 +11,7 @@
11
  * For help, please get in touch with us at cueblocks.com
12
  */
13
  ?>
14
- <script type="text/javascript">
15
 
16
- jQuery(document).ready(function(){
17
-
18
- var options = {
19
-
20
- zoomWidth: 200,
21
-
22
- zoomHeight: 200,
23
-
24
- showEffect: 'show',
25
-
26
- hideEffect: 'fadeout',
27
-
28
- fadeoutSpeed: 'slow',
29
-
30
- title: false
31
-
32
- }
33
-
34
- jQuery(".jqzoom").jqzoom(options);
35
-
36
- });
37
-
38
- </script>
39
  <?php
40
  $_product = $this->getProduct();
41
  $_helper = $this->helper('catalog/output');
@@ -43,16 +19,7 @@
43
  $_zoomConfig = Mage::getStoreConfig('zoom/general');
44
 
45
  ?>
46
- <script type="text/javascript">
47
- // show main image
48
- jQuery(document).ready(function() {
49
-
50
- // On document ready hide all images first
51
- jQuery("#imageShowcase img").hide();
52
- jQuery("#productImgDefault").show();
53
-
54
- });
55
- </script>
56
 
57
  <div id="imageShowcase">
58
  <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
@@ -74,17 +41,16 @@
74
 
75
  if (count($this->getGalleryImages()) > 0):
76
  foreach ($this->getGalleryImages() as $_image):
77
- if($this->htmlEscape($_image->getLabel())=="")
78
- {
79
  // Find out image name from image URL
80
-
81
- $img_name = ExtractImageName($this->helper('catalog/image')->init($this->getProduct(), 'image',$_image->getFile()));
82
- $_img = '<a href="'.$this->helper('catalog/image')->init($this->getProduct(), 'image',$_image->getFile()).'" id="anchorproductImg'.$img_name.'"><img border="0" id="productImg'.$img_name.'" src="'.$this->helper('catalog/image')->init($this->getProduct(), 'image',$_image->getFile())->resize(270).'" alt="'.$this->htmlEscape($_image->getLabel()).'" title="'.$this->htmlEscape($_image->getLabel()).'"/></a>';
83
-
84
- echo $_helper->productAttribute($this->getProduct(), $_img, 'image');
85
- }
86
- endforeach;
87
- endif;
88
 
89
  ?>
90
 
@@ -107,14 +73,11 @@
107
  <ul>
108
  <?php foreach ($this->getGalleryImages() as $_image):
109
 
110
- if($this->htmlEscape($_image->getLabel())=="") { // In this case pass image name
111
- $moreImg = ExtractImageName($this->helper('catalog/image')->init($this->getProduct(), 'image',$_image->getFile()));
112
 
113
- }
114
- else { // In this case pass color code
115
- $moreImg = $_image->getLabel();
116
-
117
- }
118
  ?>
119
  <li><img border="0" src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" onclick="switchmore('<?php echo $moreImg;?>');" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" />
120
 
@@ -140,4 +103,42 @@ function ExtractImageName($fullImagePath)
140
  return $ImgName;
141
  }
142
 
143
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /**
3
+ * Package :- CueBlocks_Zoom-1.2.tgz
4
+ * Version :- 1.2
5
  * Edition :- Community
6
  * Developed By :- CueBlocks.com
7
  *
11
  * For help, please get in touch with us at cueblocks.com
12
  */
13
  ?>
 
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  <?php
16
  $_product = $this->getProduct();
17
  $_helper = $this->helper('catalog/output');
19
  $_zoomConfig = Mage::getStoreConfig('zoom/general');
20
 
21
  ?>
22
+
 
 
 
 
 
 
 
 
 
23
 
24
  <div id="imageShowcase">
25
  <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
41
 
42
  if (count($this->getGalleryImages()) > 0):
43
  foreach ($this->getGalleryImages() as $_image):
44
+
 
45
  // Find out image name from image URL
46
+
47
+ $img_name = ExtractImageName($this->helper('catalog/image')->init($this->getProduct(), 'image',$_image->getFile()));
48
+ $_img = '<a href="'.$this->helper('catalog/image')->init($this->getProduct(), 'image',$_image->getFile()).'" id="anchorproductImg'.$img_name.'"><img border="0" id="productImg'.$img_name.'" src="'.$this->helper('catalog/image')->init($this->getProduct(), 'image',$_image->getFile())->resize(270).'" alt="'.$this->htmlEscape($_image->getLabel()).'" title="'.$this->htmlEscape($_image->getLabel()).'"/></a>';
49
+
50
+ echo $_helper->productAttribute($this->getProduct(), $_img, 'image');
51
+
52
+ endforeach;
53
+ endif;
54
 
55
  ?>
56
 
73
  <ul>
74
  <?php foreach ($this->getGalleryImages() as $_image):
75
 
76
+
77
+ $moreImg = ExtractImageName($this->helper('catalog/image')->init($this->getProduct(), 'image',$_image->getFile()));
78
 
79
+
80
+
 
 
 
81
  ?>
82
  <li><img border="0" src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" onclick="switchmore('<?php echo $moreImg;?>');" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" />
83
 
103
  return $ImgName;
104
  }
105
 
106
+ ?>
107
+
108
+ jQuery(document).ready(function(){
109
+
110
+ var options = {
111
+
112
+ zoomWidth: 200,
113
+
114
+ zoomHeight: 200,
115
+
116
+ showEffect: 'show',
117
+
118
+ hideEffect: 'fadeout',
119
+
120
+ fadeoutSpeed: 'slow',
121
+
122
+ title: false,
123
+
124
+ zoomtype:'innerzoom',
125
+
126
+ showPreload: false
127
+
128
+ }
129
+
130
+ jQuery(".jqzoom").jqzoom(options);
131
+
132
+ });
133
+
134
+ </script>
135
+ <script type="text/javascript">
136
+ // show main image
137
+ jQuery(document).ready(function() {
138
+
139
+ // On document ready hide all images first
140
+ jQuery("#imageShowcase img").hide();
141
+ jQuery("#productImgDefault").show();
142
+
143
+ });
144
+ </script>
app/etc/modules/JM_Zoom.xml CHANGED
@@ -2,8 +2,8 @@
2
  <!--
3
  /**
4
  *
5
- * Package :- CueBlocks_Zoom-1.1.tgz
6
- * Version :- 1.1
7
  * Edition :- Community
8
  * Developed By :- CueBlocks.com
9
  *
2
  <!--
3
  /**
4
  *
5
+ * Package :- CueBlocks_Zoom-1.2.tgz
6
+ * Version :- 1.2
7
  * Edition :- Community
8
  * Developed By :- CueBlocks.com
9
  *
js/jquery/Cuejqzoom.js CHANGED
@@ -1,12 +1,10 @@
1
- /**
2
- *
3
- * Package :- CueBlocks_Zoom-1.1.tgz
4
- * Version :- 1.1
5
  * Edition :- Community
6
  * Developed By :- CueBlocks.com
7
  *
8
  */
9
- var zoomDone = new Array();
10
  // SWITCH MAIN IMAGE BASED ON MORE IMAGES ON MEDIA FILE
11
  function switchmore(imagename){
12
  jQuery("#imageShowcase a").hide();
@@ -30,11 +28,11 @@ function switchmore(imagename){
30
 
31
  }
32
 
33
- if(!zoomDone.in_array(imagename))
34
- {
35
- jQuery("#anchorproductImg" + imagename).jqzoom(options);
36
- zoomDone.push(imagename);
37
- }
38
 
39
  }
40
 
1
+ /* :- CueBlocks_Zoom-1.2.tgz
2
+ * Version :- 1.2
 
 
3
  * Edition :- Community
4
  * Developed By :- CueBlocks.com
5
  *
6
  */
7
+ //var zoomDone = new Array();
8
  // SWITCH MAIN IMAGE BASED ON MORE IMAGES ON MEDIA FILE
9
  function switchmore(imagename){
10
  jQuery("#imageShowcase a").hide();
28
 
29
  }
30
 
31
+ //if(!zoomDone.in_array(imagename))
32
+ //{
33
+ jQuery("#anchorproductImg" + imagename).jqzoom(options);
34
+ // zoomDone.push(imagename);
35
+ //}
36
 
37
  }
38
 
js/jquery/jquery.jqzoom1.0.1.js ADDED
@@ -0,0 +1,1143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * JQZoom Evolution 1.0.1 - Javascript Image magnifier
3
+ *
4
+ * Copyright (c) Engineer Renzi Marco(www.mind-projects.it)
5
+ *
6
+ * $Date: 12-12-2008
7
+ *
8
+ * ChangeLog:
9
+ *
10
+ * $License : GPL,so any change to the code you should copy and paste this section,and would be nice to report this to me(renzi.mrc@gmail.com).
11
+ */
12
+ (function($)
13
+ {
14
+ $.fn.jqzoom = function(options)
15
+ {
16
+
17
+
18
+ var settings = {
19
+ zoomType: 'standard', //standard/reverse/innerzoom
20
+ zoomWidth: 200, //zoomed width default width
21
+ zoomHeight: 200, //zoomed div default width
22
+ xOffset: 10, //zoomed div default offset
23
+ yOffset: 0,
24
+ position: "right" ,//zoomed div default position,offset position is to the right of the image
25
+ lens:true, //zooming lens over the image,by default is 1;
26
+ lensReset : false,
27
+ imageOpacity: 0.2,
28
+ title : true,
29
+ alwaysOn: false,
30
+ showEffect: 'show',
31
+ hideEffect: 'hide',
32
+ fadeinSpeed: 'fast',
33
+ fadeoutSpeed: 'slow',
34
+ preloadImages :true,
35
+ showPreload: true,
36
+ preloadText : 'Loading zoom',
37
+ preloadPosition : 'center' //bycss
38
+ };
39
+
40
+ //extending options
41
+ options = options || {};
42
+ $.extend(settings, options);
43
+
44
+
45
+ return this.each(function()
46
+ {
47
+ var a = $(this);
48
+ var aTitle = a.attr('title'); //variabile per memorizzare il titolo href
49
+ $(a).removeAttr('title');
50
+ $(a).css('outline-style','none');
51
+
52
+
53
+ var img = $("img", this);
54
+ var imageTitle = img.attr('title');
55
+ img.removeAttr('title'); //variabile per memorizzare il titolo immagine
56
+
57
+ var smallimage = new Smallimage( img );
58
+ var smallimagedata = {};
59
+ //imageborder
60
+ var btop = 0;
61
+ var bleft = 0;
62
+
63
+ var loader = null; //variabile per memorizzare oggetto loader
64
+ loader = new Loader();
65
+
66
+ var ZoomTitle = (trim(aTitle).length > 0) ? aTitle :
67
+ (trim(imageTitle).length > 0) ? imageTitle : null; //setting zoomtitle
68
+ var ZoomTitleObj = new zoomTitle();
69
+
70
+ var largeimage = new Largeimage( a[0].href );
71
+
72
+ var lens = new Lens();
73
+ var lensdata = {};
74
+ //lensborder
75
+
76
+
77
+
78
+ var largeimageloaded = false;
79
+ var scale = {}; //rapporto tra immagine grande e piccola scale.x/scale.y
80
+ var stage = null; // quadrato che mostra l'immagine ingrandita
81
+ var running = false; // running = true quando si verifica l'evento che mostra lo zoom(adesso mouseover).
82
+ var mousepos = {};
83
+ var firstime = 0;
84
+ var preloadshow = false;
85
+ var isMouseDown = false;
86
+ var dragstatus = false
87
+ //loading smallimagedata
88
+ smallimage.loadimage();
89
+
90
+ //ritorna false al click dell href
91
+ $(this).click(function(){return false;});
92
+
93
+ //se settato alwaysOn attivo lo Zoom e lo mostro.
94
+
95
+ //attivo al mouseover
96
+ $(this).hover(function(e)
97
+ {
98
+ mousepos.x = e.pageX;
99
+ mousepos.y = e.pageY;
100
+ activate();
101
+ },function()
102
+ {
103
+ deactivate();
104
+ });
105
+
106
+
107
+ //ALWAYS ON
108
+ if(settings.alwaysOn)
109
+ {
110
+ setTimeout(function(){activate();},150);
111
+ }
112
+
113
+
114
+ function activate()
115
+ {
116
+
117
+ if ( !running ) {
118
+
119
+ //finding border
120
+ smallimage.findborder();
121
+
122
+ running = true;
123
+
124
+ //rimuovo il titolo al mouseover
125
+ imageTitle = img.attr('title');
126
+ img.removeAttr('title');
127
+ aTitle = a.attr('title');
128
+ $(a).removeAttr('title');
129
+
130
+ //se non c� creo l'oggetto largeimage
131
+ if (!largeimage || $.browser.safari) {
132
+ largeimage = new Largeimage( a[0].href );
133
+ }
134
+
135
+ //se l'immagine grande non � stata caricata la carico
136
+ if(!largeimageloaded || $.browser.safari)
137
+ {
138
+ largeimage.loadimage();
139
+ }else
140
+ {
141
+ //after preload
142
+ if(settings.zoomType != 'innerzoom')
143
+ {
144
+ stage = new Stage();
145
+ stage.activate();
146
+ }
147
+ lens = new Lens;
148
+ lens.activate();
149
+ }
150
+
151
+ //hack per MAC
152
+ /* if($.browser.safari)
153
+ {
154
+ if(settings.zoomType != 'innerzoom') //se innerzoom non mostro la finestra dello zoom
155
+ {
156
+ stage = new Stage();
157
+ stage.activate();
158
+ }
159
+ if($('div.jqZoomPup').length <= 0)
160
+ {
161
+ lens = new Lens();
162
+ }
163
+ //if(settings.zoomType == 'innerzoom'){lens = new Lens()};
164
+ lens.activate();
165
+ (settings.alwaysOn) ? lens.center() : lens.setposition(null);
166
+ }
167
+ */
168
+ a[0].blur();
169
+ //alert($('div.jqZoomPup').length);
170
+ return false;
171
+ }
172
+
173
+
174
+
175
+
176
+ }
177
+
178
+ function deactivate()
179
+ {
180
+ if(settings.zoomType == 'reverse' && !settings.alwaysOn)
181
+ {
182
+ img.css({'opacity' : 1});
183
+ }
184
+
185
+ if(!settings.alwaysOn)
186
+ {
187
+ //resetting parameters
188
+ running = false;
189
+ largeimageloaded = false;
190
+ $(lens.node).unbind('mousemove');
191
+ lens.remove();
192
+ if($('div.jqZoomWindow').length >0)
193
+ {
194
+ stage.remove();
195
+ }
196
+ if($('div.jqZoomTitle').length > 0)
197
+ {
198
+ ZoomTitleObj.remove();
199
+ }
200
+ //resetting title
201
+ img.attr('title',imageTitle);
202
+ a.attr('title',aTitle);
203
+ $().unbind();
204
+
205
+ a.unbind('mousemove');
206
+ //resetto il parametro che mi dice che � la prima volta che mostor lo zoom
207
+ firstime = 0;
208
+ //remove ieiframe
209
+ if(jQuery('.zoom_ieframe').length > 0)
210
+ {
211
+ jQuery('.zoom_ieframe').remove();
212
+ }
213
+ }else
214
+ {
215
+ if(settings.lensReset)
216
+ {
217
+ switch(settings.zoomType)
218
+ {
219
+ case 'innerzoom':
220
+ largeimage.setcenter();
221
+ break;
222
+ default:
223
+ lens.center();
224
+ break;
225
+ }
226
+ }
227
+ }
228
+
229
+ //non so se serve da provare
230
+ if(settings.alwaysOn)
231
+ {
232
+ activate();
233
+ }
234
+ };
235
+
236
+
237
+
238
+
239
+
240
+ //smallimage
241
+ function Smallimage( image )
242
+ {
243
+ this.node = image[0];
244
+
245
+ this.loadimage = function() {
246
+ this.node.src = image[0].src;
247
+ if (typeof smallimagedata.top === "undefined") {
248
+ this.node.onload();
249
+ }
250
+
251
+ };
252
+
253
+ this.findborder = function()
254
+ {
255
+ var bordertop = '';
256
+ bordertop = $(img).css('border-top-width');
257
+ btop = '';
258
+ var borderleft = '';
259
+ borderleft = $(img).css('border-left-width');
260
+ bleft = '';
261
+ /*if($.browser.msie)
262
+ {
263
+ var temp = bordertop.split(' ');
264
+
265
+ bordertop = temp[1];
266
+ var temp = borderleft.split(' ');
267
+ borderleft = temp[1];
268
+ }*/
269
+
270
+ if(bordertop)
271
+ {
272
+ for(i=0;i<3;i++)
273
+ {
274
+ var x = [];
275
+ x = bordertop.substr(i,1);
276
+
277
+ if(isNaN(x) == false)
278
+ {
279
+ btop = btop +''+ bordertop.substr(i,1);
280
+ }else
281
+ {
282
+ break;
283
+ }
284
+ }
285
+ }
286
+
287
+ if(borderleft)
288
+ {
289
+ for(i=0;i<3;i++)
290
+ {
291
+ if(!isNaN(borderleft.substr(i,1)))
292
+ {
293
+ bleft = bleft + borderleft.substr(i,1)
294
+ }else
295
+ {
296
+ break;
297
+ }
298
+ }
299
+ }
300
+ btop = (btop.length > 0) ? eval(btop) : 0;
301
+ bleft = (bleft.length > 0) ? eval(bleft) : 0;
302
+
303
+
304
+ }
305
+
306
+
307
+ this.node.onload = function()
308
+ {
309
+ //setto il cursor e la posizione dell'href
310
+
311
+
312
+ a.css({'cursor':'crosshair','display':'block'});
313
+
314
+ if(a.css('position')!= 'absolute' && a.parent().css('position'))
315
+ {
316
+ a.css({'cursor':'crosshair','position':'relative','display':'block'});
317
+ }
318
+ if(a.parent().css('position') != 'absolute')
319
+ {
320
+ a.parent().css('position','relative');
321
+ //a.css('position','relative');
322
+ }
323
+ else{
324
+ //a.css('position','relative');
325
+ }
326
+ if($.browser.safari || $.browser.opera)
327
+ {
328
+ $(img).css({position:'absolute',top:'0px',left:'0px'});
329
+ }
330
+ /*if(a.css('position')!= 'absolute' && a.parent().css('position'))
331
+ {
332
+ a.css({'cursor':'crosshair','position':'relative','display':'block'});
333
+ }
334
+ if(a.parent().css('position') != 'absolute')
335
+ {
336
+ alert('in');
337
+ a.parent().css('position','relative');
338
+ //a.css('position','relative');
339
+ }
340
+ else{
341
+ //a.css('position','relative');
342
+ }*/
343
+
344
+
345
+
346
+ /*
347
+ if(a.parent().css('position') != 'relative' && a.css('position') != 'absolute')
348
+ {
349
+ a.css({'cursor':'crosshair','position':'relative','display':'block'});
350
+ }*/
351
+
352
+ //al docuemnt ready viene caricato l'src quindi viene azionato l'onload e carico tutti i dati
353
+ smallimagedata.w = $( this ).width();
354
+ smallimagedata.h = $( this ).height();
355
+
356
+
357
+ //non viene fatta assegnazione alla variabile globale
358
+ smallimagedata.h = $( this ).height();
359
+ smallimagedata.pos = $( this ).offset();
360
+ smallimagedata.pos.l = $( this ).offset().left;
361
+ smallimagedata.pos.t = $( this ).offset().top;
362
+ smallimagedata.pos.r = smallimagedata.w + smallimagedata.pos.l;
363
+ smallimagedata.pos.b = smallimagedata.h + smallimagedata.pos.t;
364
+
365
+ //per sicurezza setto l'altezza e la width dell'href
366
+ a.height(smallimagedata.h);
367
+ a.width(smallimagedata.w);
368
+
369
+
370
+ //PRELOAD IMAGES
371
+ if(settings.preloadImages)
372
+ {
373
+ largeimage.loadimage();
374
+ }
375
+
376
+
377
+
378
+ };
379
+
380
+
381
+ return this;
382
+ };
383
+
384
+
385
+
386
+
387
+
388
+ //Lens
389
+ function Lens()
390
+ {
391
+
392
+
393
+ //creating element and adding class
394
+ this.node = document.createElement("div");
395
+ $(this.node).addClass('jqZoomPup');
396
+
397
+ this.node.onerror = function() {
398
+ $( lens.node ).remove();
399
+ lens = new Lens();
400
+ lens.activate() ;
401
+ };
402
+
403
+
404
+
405
+
406
+ //funzione privata per il caricamento dello zoom
407
+ this.loadlens = function()
408
+ {
409
+
410
+
411
+ switch(settings.zoomType)
412
+ {
413
+ case 'reverse':
414
+ this.image = new Image();
415
+ this.image.src = smallimage.node.src; // fires off async
416
+ this.node.appendChild( this.image );
417
+ $( this.node ).css({'opacity' : 1});
418
+ break;
419
+ case 'innerzoom':
420
+
421
+ this.image = new Image();
422
+ this.image.src = largeimage.node.src; // fires off async
423
+ this.node.appendChild( this.image );
424
+ $( this.node ).css({'opacity' : 1});
425
+ break
426
+ default:
427
+ break;
428
+ }
429
+
430
+
431
+
432
+ switch(settings.zoomType)
433
+ {
434
+ case 'innerzoom':
435
+ lensdata.w = smallimagedata.w;
436
+ lensdata.h = smallimagedata.h;
437
+ break;
438
+ default:
439
+ lensdata.w = (settings.zoomWidth)/scale.x;
440
+ lensdata.h = (settings.zoomHeight)/scale.y;
441
+ break;
442
+ }
443
+
444
+ $( this.node ).css({
445
+ width: lensdata.w + 'px',
446
+ height: lensdata.h + 'px',
447
+ position: 'absolute',
448
+ /*cursor: 'crosshair',*/
449
+ display: 'none',
450
+ //border: '1px solid blue'
451
+ borderWidth: 1+'px'
452
+ });
453
+ a.append(this.node);
454
+ }
455
+ return this;
456
+ };
457
+
458
+ Lens.prototype.activate = function()
459
+ {
460
+ //carico la lente
461
+ this.loadlens();
462
+
463
+ switch(settings.zoomType)
464
+ {
465
+ case 'reverse':
466
+ img.css({'opacity' : settings.imageOpacity});
467
+
468
+ (settings.alwaysOn) ? lens.center() : lens.setposition(null);
469
+ //lens.center();
470
+ //bindo ad a il mousemove della lente
471
+ a.bind( 'mousemove', function(e)
472
+ {
473
+ mousepos.x = e.pageX;
474
+ mousepos.y = e.pageY;
475
+ lens.setposition( e );
476
+ });
477
+ break;
478
+ case 'innerzoom':
479
+
480
+ // lens = new Lens();
481
+ // lens.activate();
482
+
483
+ $( this.node ).css({top : 0 ,left: 0});
484
+ if(settings.title)
485
+ {
486
+ ZoomTitleObj.loadtitle();
487
+ }
488
+
489
+ largeimage.setcenter();
490
+
491
+ a.bind( 'mousemove', function(e)
492
+ {
493
+ mousepos.x = e.pageX;
494
+ mousepos.y = e.pageY;
495
+ largeimage.setinner( e );
496
+
497
+ /*if(settings.zoomType == 'innerzoom' && running)
498
+ {
499
+ $(a).mousemove(function(){
500
+ if($('div.jqZoomPup').length <= 0)
501
+ {
502
+ lens = new Lens();
503
+ lens.activate();
504
+ }
505
+ });
506
+ }*/
507
+
508
+ /*if($('div.jqZoomPup').length <= 0)
509
+ {
510
+ lens = new Lens();
511
+ lens.activate();
512
+ }*/
513
+
514
+ });
515
+ break;
516
+ default:
517
+ /*$(document).mousemove(function(e){
518
+ if(isMouseDown && dragstatus != false){
519
+ lens.setposition( e );
520
+ }
521
+ });
522
+ lens.center()
523
+
524
+
525
+ dragstatus = 'on'
526
+ $(document).mouseup(function(e){
527
+ if(isMouseDown && dragstatus != false){
528
+ isMouseDown = false;
529
+ dragstatus = false;
530
+
531
+ }
532
+ });
533
+
534
+ $(this.node).mousedown(function(e){
535
+ $('div.jqZoomPup').css("cursor", "move");
536
+ $(this.node).css("position", "absolute");
537
+
538
+ // set z-index
539
+ $(this.node).css("z-index", parseInt( new Date().getTime()/1000 ));
540
+ if($.browser.safari)
541
+ {
542
+ $(a).css("cursor", "move");
543
+ }
544
+ isMouseDown = true;
545
+ dragstatus = 'on';
546
+ lens.setposition( e );
547
+ });
548
+ */
549
+
550
+
551
+ (settings.alwaysOn) ? lens.center() : lens.setposition(null);
552
+
553
+ //bindo ad a il mousemove della lente
554
+ $(a).bind( 'mousemove', function(e)
555
+ {
556
+
557
+ mousepos.x = e.pageX;
558
+ mousepos.y = e.pageY;
559
+ lens.setposition( e );
560
+ });
561
+
562
+ break;
563
+ }
564
+
565
+
566
+ return this;
567
+ };
568
+
569
+ Lens.prototype.setposition = function( e)
570
+ {
571
+
572
+
573
+ if(e)
574
+ {
575
+ mousepos.x = e.pageX;
576
+ mousepos.y = e.pageY;
577
+ }
578
+
579
+ if(firstime == 0)
580
+ {
581
+ var lensleft = (smallimagedata.w)/2 - (lensdata.w)/2 ;
582
+ var lenstop = (smallimagedata.h)/2 - (lensdata.h)/2 ;
583
+ //ADDED
584
+
585
+
586
+
587
+
588
+ $('div.jqZoomPup').show()
589
+ if(settings.lens)
590
+ {
591
+ this.node.style.visibility = 'visible';
592
+ document.getElementById("roll_on").innerHTML = "Roll off to zoom out";
593
+ }
594
+ else
595
+ {
596
+ this.node.style.visibility = 'hidden';
597
+ document.getElementById("roll_on").innerHTML = "Roll on to zoom in";
598
+ $('div.jqZoomPup').hide();
599
+
600
+ }
601
+ //ADDED
602
+ firstime = 1;
603
+
604
+ }else
605
+ {
606
+ var lensleft = mousepos.x - smallimagedata.pos.l - (lensdata.w)/2 ;
607
+ var lenstop = mousepos.y - smallimagedata.pos.t -(lensdata.h)/2 ;
608
+ }
609
+
610
+
611
+ //a sinistra
612
+ if(overleft())
613
+ {
614
+ lensleft = 0 + bleft;
615
+ }else
616
+ //a destra
617
+ if(overright())
618
+ {
619
+ if($.browser.msie)
620
+ {
621
+ lensleft = smallimagedata.w - lensdata.w + bleft + 1 ;
622
+ }else
623
+ {
624
+ lensleft = smallimagedata.w - lensdata.w + bleft - 1 ;
625
+ }
626
+
627
+
628
+ }
629
+
630
+ //in alto
631
+ if(overtop())
632
+ {
633
+ lenstop = 0 + btop ;
634
+ }else
635
+ //sotto
636
+ if(overbottom())
637
+ {
638
+
639
+ if($.browser.msie)
640
+ {
641
+ lenstop = smallimagedata.h - lensdata.h + btop + 1 ;
642
+ }else
643
+ {
644
+ lenstop = smallimagedata.h - lensdata.h - 1 + btop ;
645
+ }
646
+
647
+ }
648
+ lensleft = parseInt(lensleft);
649
+ lenstop = parseInt(lenstop);
650
+
651
+ //setto lo zoom ed un eventuale immagine al centro
652
+ $('div.jqZoomPup',a).css({top: lenstop,left: lensleft });
653
+
654
+ if(settings.zoomType == 'reverse')
655
+ {
656
+ $('div.jqZoomPup img',a).css({'position': 'absolute','top': -( lenstop - btop +1) ,'left': -(lensleft - bleft +1) });
657
+ }
658
+
659
+ this.node.style.left = lensleft + 'px';
660
+ this.node.style.top = lenstop + 'px';
661
+
662
+ //setto l'immagine grande
663
+ largeimage.setposition();
664
+
665
+ function overleft() {
666
+ return mousepos.x - (lensdata.w +2*1)/2 - bleft < smallimagedata.pos.l;
667
+ }
668
+
669
+ function overright() {
670
+
671
+ return mousepos.x + (lensdata.w + 2* 1)/2 > smallimagedata.pos.r + bleft ;
672
+ }
673
+
674
+ function overtop() {
675
+ return mousepos.y - (lensdata.h + 2* 1)/2 - btop < smallimagedata.pos.t;
676
+ }
677
+
678
+ function overbottom() {
679
+ return mousepos.y + (lensdata.h + 2* 1)/2 > smallimagedata.pos.b + btop;
680
+ }
681
+
682
+ return this;
683
+ };
684
+
685
+
686
+ //mostra la lente al centro dell'immagine
687
+ Lens.prototype.center = function()
688
+ {
689
+ $('div.jqZoomPup',a).css('display','none');
690
+ document.getElementById("roll_on").innerHTML = "Roll on to zoom in";
691
+ var lensleft = (smallimagedata.w)/2 - (lensdata.w)/2 ;
692
+ var lenstop = (smallimagedata.h)/2 - (lensdata.h)/2;
693
+ this.node.style.left = lensleft + 'px';
694
+ this.node.style.top = lenstop + 'px';
695
+ $('div.jqZoomPup',a).css({top: lenstop,left: lensleft });
696
+
697
+ if(settings.zoomType == 'reverse')
698
+ {
699
+ /*if($.browser.safari){
700
+ alert('safari');
701
+ alert(2*bleft);
702
+ $('div.jqZoomPup img',a).css({'position': 'absolute','top': -( lenstop - btop +1) ,'left': -(lensleft - 2*bleft) });
703
+ }else
704
+ {*/
705
+ $('div.jqZoomPup img',a).css({'position': 'absolute','top': -(lenstop - btop + 1) ,'left': -( lensleft - bleft +1) });
706
+ //}
707
+ }
708
+
709
+ largeimage.setposition();
710
+ if($.browser.msie)
711
+ {
712
+ $('div.jqZoomPup',a).show();
713
+ document.getElementById("roll_on").innerHTML = "Roll off to zoom out";
714
+ }else
715
+ {
716
+ setTimeout(function(){$('div.jqZoomPup').fadeIn('fast');},10);
717
+ }
718
+ };
719
+
720
+
721
+ //ritorna l'offset
722
+ Lens.prototype.getoffset = function() {
723
+ var o = {};
724
+ o.left = parseInt(this.node.style.left) ;
725
+ o.top = parseInt(this.node.style.top) ;
726
+ return o;
727
+ };
728
+
729
+ //rimuove la lente
730
+ Lens.prototype.remove = function()
731
+ {
732
+
733
+ if(settings.zoomType == 'innerzoom')
734
+ {
735
+ $('div.jqZoomPup',a).fadeOut('fast',function(){/*$('div.jqZoomPup img').remove();*/$(this).remove();});
736
+
737
+ }else
738
+ {
739
+ //$('div.jqZoomPup img').remove();
740
+ $('div.jqZoomPup',a).remove();
741
+ document.getElementById("roll_on").innerHTML = "Roll on to zoom in";
742
+ }
743
+ };
744
+
745
+ Lens.prototype.findborder = function()
746
+ {
747
+ var bordertop = '';
748
+ bordertop = $('div.jqZoomPup').css('borderTop');
749
+ //alert(bordertop);
750
+ lensbtop = '';
751
+ var borderleft = '';
752
+ borderleft = $('div.jqZoomPup').css('borderLeft');
753
+ lensbleft = '';
754
+ if($.browser.msie)
755
+ {
756
+ var temp = bordertop.split(' ');
757
+
758
+ bordertop = temp[1];
759
+ var temp = borderleft.split(' ');
760
+ borderleft = temp[1];
761
+ }
762
+
763
+ if(bordertop)
764
+ {
765
+ for(i=0;i<3;i++)
766
+ {
767
+ var x = [];
768
+ x = bordertop.substr(i,1);
769
+
770
+ if(isNaN(x) == false)
771
+ {
772
+ lensbtop = lensbtop +''+ bordertop.substr(i,1);
773
+ }else
774
+ {
775
+ break;
776
+ }
777
+ }
778
+ }
779
+
780
+ if(borderleft)
781
+ {
782
+ for(i=0;i<3;i++)
783
+ {
784
+ if(!isNaN(borderleft.substr(i,1)))
785
+ {
786
+ lensbleft = lensbleft + borderleft.substr(i,1)
787
+ }else
788
+ {
789
+ break;
790
+ }
791
+ }
792
+ }
793
+
794
+
795
+ lensbtop = (lensbtop.length > 0) ? eval(lensbtop) : 0;
796
+ lensbleft = (lensbleft.length > 0) ? eval(lensbleft) : 0;
797
+ }
798
+
799
+ //LARGEIMAGE
800
+ function Largeimage( url )
801
+ {
802
+ this.url = url;
803
+ this.node = new Image();
804
+
805
+ /*if(settings.preloadImages)
806
+ {
807
+ preload.push(new Image());
808
+ preload.slice(-1).src = url ;
809
+ }*/
810
+
811
+ this.loadimage = function()
812
+ {
813
+
814
+
815
+ if(!this.node)
816
+ this.node = new Image();
817
+
818
+ this.node.style.position = 'absolute';
819
+ this.node.style.display = 'none';
820
+ this.node.style.left = '-5000px';
821
+ this.node.style.top = '10px';
822
+ loader = new Loader();
823
+
824
+ if(settings.showPreload && !preloadshow)
825
+ {
826
+ loader.show();
827
+ preloadshow = true;
828
+ }
829
+
830
+ document.body.appendChild( this.node );
831
+ this.node.src = this.url; // fires off async
832
+ }
833
+
834
+ this.node.onload = function()
835
+ {
836
+ this.style.display = 'block';
837
+ var w = Math.round($(this).width());
838
+ var h = Math.round($(this).height());
839
+
840
+ this.style.display = 'none';
841
+
842
+ //setting scale
843
+ scale.x = (w / smallimagedata.w);
844
+ scale.y = (h / smallimagedata.h);
845
+
846
+
847
+
848
+
849
+
850
+ if($('div.preload').length > 0)
851
+ {
852
+ $('div.preload').remove();
853
+ }
854
+
855
+ largeimageloaded = true;
856
+
857
+ if(settings.zoomType != 'innerzoom' && running){
858
+ stage = new Stage();
859
+ stage.activate();
860
+ }
861
+
862
+ if(running)
863
+ {
864
+ //alert('in');
865
+ lens = new Lens();
866
+
867
+ lens.activate() ;
868
+
869
+ }
870
+ //la attivo
871
+
872
+ if($('div.preload').length > 0)
873
+ {
874
+ $('div.preload').remove();
875
+ }
876
+ }
877
+ return this;
878
+ }
879
+
880
+
881
+ Largeimage.prototype.setposition = function()
882
+ {
883
+ this.node.style.left = Math.ceil( - scale.x * parseInt(lens.getoffset().left) + bleft) + 'px';
884
+ this.node.style.top = Math.ceil( - scale.y * parseInt(lens.getoffset().top) +btop) + 'px';
885
+ };
886
+
887
+ //setto la posizione dell'immagine grande nel caso di innerzoom
888
+ Largeimage.prototype.setinner = function(e) {
889
+ this.node.style.left = Math.ceil( - scale.x * Math.abs(e.pageX - smallimagedata.pos.l)) + 'px';
890
+ this.node.style.top = Math.ceil( - scale.y * Math.abs(e.pageY - smallimagedata.pos.t)) + 'px';
891
+ $('div.jqZoomPup img',a).css({'position': 'absolute','top': this.node.style.top,'left': this.node.style.left });
892
+ };
893
+
894
+
895
+ Largeimage.prototype.setcenter = function() {
896
+ this.node.style.left = Math.ceil(- scale.x * Math.abs((smallimagedata.w)/2)) + 'px';
897
+ this.node.style.top = Math.ceil( - scale.y * Math.abs((smallimagedata.h)/2)) + 'px';
898
+
899
+
900
+ $('div.jqZoomPup img',a).css({'position': 'absolute','top': this.node.style.top,'left': this.node.style.left });
901
+ };
902
+
903
+
904
+ //STAGE
905
+ function Stage()
906
+ {
907
+
908
+ var leftpos = smallimagedata.pos.l;
909
+ var toppos = smallimagedata.pos.t;
910
+ //creating element and class
911
+ this.node = document.createElement("div");
912
+ $(this.node).addClass('jqZoomWindow');
913
+
914
+ $( this.node )
915
+ .css({
916
+ position: 'absolute',
917
+ width: Math.round(settings.zoomWidth) + 'px',
918
+ height: Math.round(settings.zoomHeight) + 'px',
919
+ display: 'none',
920
+ zIndex: 10000,
921
+ overflow: 'hidden'
922
+ });
923
+
924
+ //fa il positionamento
925
+ switch(settings.position)
926
+ {
927
+ case "right":
928
+
929
+ leftpos = (smallimagedata.pos.r + Math.abs(settings.xOffset) + settings.zoomWidth < screen.width)
930
+ ? (smallimagedata.pos.l + smallimagedata.w + Math.abs(settings.xOffset))
931
+ : (smallimagedata.pos.l - settings.zoomWidth - Math.abs(settings.xOffset));
932
+
933
+ topwindow = smallimagedata.pos.t + settings.yOffset + settings.zoomHeight;
934
+ toppos = (topwindow < screen.height && topwindow > 0)
935
+ ? smallimagedata.pos.t + settings.yOffset
936
+ : smallimagedata.pos.t;
937
+
938
+ break;
939
+ case "left":
940
+
941
+ leftpos = (smallimagedata.pos.l - Math.abs(settings.xOffset) - settings.zoomWidth > 0)
942
+ ? (smallimagedata.pos.l - Math.abs(settings.xOffset) - settings.zoomWidth)
943
+ : (smallimagedata.pos.l + smallimagedata.w + Math.abs(settings.xOffset));
944
+
945
+ topwindow = smallimagedata.pos.t + settings.yOffset + settings.zoomHeight;
946
+ toppos = (topwindow < screen.height && topwindow > 0)
947
+ ? smallimagedata.pos.t + settings.yOffset
948
+ : smallimagedata.pos.t;
949
+
950
+ break;
951
+ case "top":
952
+
953
+ toppos = (smallimagedata.pos.t - Math.abs(settings.yOffset) - settings.zoomHeight > 0)
954
+ ? (smallimagedata.pos.t - Math.abs(settings.yOffset) - settings.zoomHeight)
955
+ : (smallimagedata.pos.t + smallimagedata.h + Math.abs(settings.yOffset));
956
+
957
+
958
+ leftwindow = smallimagedata.pos.l + settings.xOffset + settings.zoomWidth;
959
+ leftpos = (leftwindow < screen.width && leftwindow > 0)
960
+ ? smallimagedata.pos.l + settings.xOffset
961
+ : smallimagedata.pos.l;
962
+
963
+ break;
964
+ case "bottom":
965
+
966
+
967
+ toppos = (smallimagedata.pos.b + Math.abs(settings.yOffset) + settings.zoomHeight < $('body').height())
968
+ ? (smallimagedata.pos.b + Math.abs(settings.yOffset))
969
+ : (smallimagedata.pos.t - settings.zoomHeight - Math.abs(settings.yOffset));
970
+
971
+
972
+ leftwindow = smallimagedata.pos.l + settings.xOffset + settings.zoomWidth;
973
+ leftpos = (leftwindow < screen.width && leftwindow > 0)
974
+ ? smallimagedata.pos.l + settings.xOffset
975
+ : smallimagedata.pos.l;
976
+
977
+ break;
978
+ default:
979
+
980
+ leftpos = (smallimagedata.pos.l + smallimagedata.w + settings.xOffset + settings.zoomWidth < screen.width)
981
+ ? (smallimagedata.pos.l + smallimagedata.w + Math.abs(settings.xOffset))
982
+ : (smallimagedata.pos.l - settings.zoomWidth - Math.abs(settings.xOffset));
983
+
984
+ toppos = (smallimagedata.pos.b + Math.abs(settings.yOffset) + settings.zoomHeight < screen.height)
985
+ ? (smallimagedata.pos.b + Math.abs(settings.yOffset))
986
+ : (smallimagedata.pos.t - settings.zoomHeight - Math.abs(settings.yOffset));
987
+
988
+ break;
989
+ }
990
+
991
+ this.node.style.left = leftpos + 'px';
992
+ this.node.style.top = toppos + 'px';
993
+ return this;
994
+ }
995
+
996
+
997
+ Stage.prototype.activate = function()
998
+ {
999
+
1000
+ if ( !this.node.firstChild )
1001
+ this.node.appendChild( largeimage.node );
1002
+
1003
+
1004
+ if(settings.title)
1005
+ {
1006
+ ZoomTitleObj.loadtitle();
1007
+ }
1008
+
1009
+
1010
+
1011
+ document.body.appendChild( this.node );
1012
+
1013
+
1014
+ switch(settings.showEffect)
1015
+ {
1016
+ case 'show':
1017
+ $(this.node).show();
1018
+ break;
1019
+ case 'fadein':
1020
+ $(this.node).fadeIn(settings.fadeinSpeed);
1021
+ break;
1022
+ default:
1023
+ $(this.node).show();
1024
+ break;
1025
+ }
1026
+
1027
+ $(this.node).show();
1028
+
1029
+ if ($.browser.msie && $.browser.version < 7) {
1030
+ this.ieframe = $('<iframe class="zoom_ieframe" frameborder="0" src="#"></iframe>')
1031
+ .css({ position: "absolute", left:this.node.style.left,top:this.node.style.top,zIndex: 99,width:settings.zoomWidth,height:settings.zoomHeight })
1032
+ .insertBefore(this.node);
1033
+ };
1034
+
1035
+
1036
+ largeimage.node.style.display = 'block';
1037
+ }
1038
+
1039
+ Stage.prototype.remove = function() {
1040
+ switch(settings.hideEffect)
1041
+ {
1042
+ case 'hide':
1043
+ $('.jqZoomWindow').remove();
1044
+ break;
1045
+ case 'fadeout':
1046
+ $('.jqZoomWindow').fadeOut(settings.fadeoutSpeed);
1047
+ break;
1048
+ default:
1049
+ $('.jqZoomWindow').remove();
1050
+ break;
1051
+ }
1052
+ }
1053
+
1054
+ function zoomTitle()
1055
+ {
1056
+
1057
+ this.node = jQuery('<div />')
1058
+ .addClass('jqZoomTitle')
1059
+ .html('' + ZoomTitle +'');
1060
+
1061
+ this.loadtitle = function()
1062
+ {
1063
+ if(settings.zoomType == 'innerzoom')
1064
+ {
1065
+ $(this.node)
1066
+ .css({position: 'absolute',
1067
+ top: smallimagedata.pos.b +3,
1068
+ left: (smallimagedata.pos.l+1),
1069
+ width:smallimagedata.w
1070
+ })
1071
+ .appendTo('body');
1072
+ }else
1073
+ {
1074
+ $(this.node).appendTo(stage.node);
1075
+ }
1076
+ };
1077
+ }
1078
+
1079
+ zoomTitle.prototype.remove = function() {
1080
+ $('.jqZoomTitle').remove();
1081
+ }
1082
+
1083
+
1084
+ function Loader()
1085
+ {
1086
+
1087
+ this.node = document.createElement("div");
1088
+ $(this.node).addClass('preload');
1089
+ $(this.node).html(settings.preloadText);//appendo il testo
1090
+
1091
+ $(this.node )
1092
+ .appendTo("body")
1093
+ .css('visibility','hidden');
1094
+
1095
+
1096
+
1097
+ this.show = function()
1098
+ {
1099
+ switch(settings.preloadPosition)
1100
+ {
1101
+ case 'center':
1102
+ loadertop = smallimagedata.pos.t + (smallimagedata.h - $(this.node ).height())/2;
1103
+ loaderleft = smallimagedata.pos.l + (smallimagedata.w - $(this.node ).width())/2;
1104
+ break;
1105
+ default:
1106
+ var loaderoffset = this.getoffset();
1107
+ loadertop = !isNaN(loaderoffset.top) ? smallimagedata.pos.t + loaderoffset.top : smallimagedata.pos.t + 0;
1108
+ loaderleft = !isNaN(loaderoffset.left) ? smallimagedata.pos.l + loaderoffset.left : smallimagedata.pos.l + 0;
1109
+ break;
1110
+ }
1111
+
1112
+ //setting position
1113
+ $(this.node).css({
1114
+ top: loadertop ,
1115
+ left: loaderleft ,
1116
+ position: 'absolute',
1117
+ visibility:'visible'
1118
+ });
1119
+ }
1120
+ return this;
1121
+ }
1122
+
1123
+ Loader.prototype.getoffset = function()
1124
+ {
1125
+ var o = null;
1126
+ o = $('div.preload').offset();
1127
+ return o;
1128
+ }
1129
+
1130
+ });
1131
+ }
1132
+ })(jQuery);
1133
+
1134
+ function trim(stringa)
1135
+ {
1136
+ while (stringa.substring(0,1) == ' '){
1137
+ stringa = stringa.substring(1, stringa.length);
1138
+ }
1139
+ while (stringa.substring(stringa.length-1, stringa.length) == ' '){
1140
+ stringa = stringa.substring(0,stringa.length-1);
1141
+ }
1142
+ return stringa;
1143
+ }
js/jquery/jqzoom.pack.1.0.1.js DELETED
@@ -1,12 +0,0 @@
1
- /*
2
- * JQZoom Evolution 1.0.1 - Javascript Image magnifier
3
- *
4
- * Copyright (c) Engineer Renzi Marco(www.mind-projects.it)
5
- *
6
- * $Date: 12-12-2008
7
- *
8
- * ChangeLog:
9
- *
10
- * $License : GPL,so any change to the code you should copy and paste this section,and would be nice to report this to me(renzi.mrc@gmail.com).
11
- */
12
- 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}('(6($){$.30.31=6(G){I H={17:\'32\',18:2l,19:2l,1a:10,1b:0,Q:"2m",2n:1s,2o:12,2p:0.3,14:1s,1p:12,2q:\'1g\',2r:\'23\',2s:\'24\',2t:\'33\',2u:12,2v:1s,2w:\'34 35\',2x:\'1t\'};G=G||{};$.36(H,G);R 4.37(6(){I a=$(4);I d=a.1q(\'14\');$(a).1Q(\'14\');$(a).J(\'38-K\',\'1r\');$(a).J(\'39-3a\',\'1r\');I f=$(a).1q(\'3b\');I g=$("1H",4);I j=g.1q(\'14\');g.1Q(\'14\');I k=U 25(g);I l={};I m=0;I n=0;I p=1u;p=U 1R();I q=(26(d).Y>0)?d:(26(j).Y>0)?j:1u;I r=U 27();I s=U 1v(a[0].2y);I t=U 1c();I u={};I v=12;I y={};I z=1u;I A=12;I B={};I C=0;I D=12;I E=12;I F=12;k.1I();$(4).3c(6(){R 12});$(4).3d(6(e){B.x=e.1w;B.y=e.1x;k.1S();1d()},6(){k.1S();2z()});8(H.1p){2A(6(){1d()},3e)}6 1d(){8(!A){k.28();A=1s;j=g.1q(\'14\');g.1Q(\'14\');d=a.1q(\'14\');$(a).1Q(\'14\');s=U 1v(a[0].2y);8(!v||$.1e.2B){s.1I()}V{8(H.17!=\'1j\'){z=U 1J();z.1d()}t=U 1c;t.1d()}a[0].3f();R 12}};6 2z(){8(H.17==\'1K\'&&!H.1p){g.J({\'1T\':1})}8(!H.1p){A=12;v=12;$(t.5).29(\'1L\');t.Z();8($(\'P.1M\').Y>0){z.Z()}8($(\'P.2a\').Y>0){r.Z()}g.1q(\'14\',j);a.1q(\'14\',d);$().29();a.29(\'1L\');C=0;8(1y(\'.2b\').Y>0){1y(\'.2b\').Z()}}V{8(H.2o){1k(H.17){11\'1j\':s.2c();N;1l:t.1t();N}}}8(H.1p){1d()}};6 25(c){4.5=c[0];4.1I=6(){4.5.1m=c[0].1m};4.28=6(){I a=\'\';a=$(g).J(\'2C-L-W\');m=\'\';I b=\'\';b=$(g).J(\'2C-M-W\');n=\'\';8(a){1U(i=0;i<3;i++){I x=[];x=a.1n(i,1);8(1V(x)==12){m=m+\'\'+a.1n(i,1)}V{N}}}8(b){1U(i=0;i<3;i++){8(!1V(b.1n(i,1))){n=n+b.1n(i,1)}V{N}}}m=(m.Y>0)?1W(m):0;n=(n.Y>0)?1W(n):0};4.5.2D=6(){a.J({\'2E\':\'2F\',\'1h\':\'1X\'});8(a.J(\'Q\')!=\'15\'&&a.2d().J(\'Q\')){a.J({\'2E\':\'2F\',\'Q\':\'2G\',\'1h\':\'1X\'})}8(a.2d().J(\'Q\')!=\'15\'){a.2d().J(\'Q\',\'2G\')}V{}8($.1e.2B||$.1e.3g){$(g).J({Q:\'15\',L:\'2H\',M:\'2H\'})}l.w=$(4).W();l.h=$(4).1f();l.9=$(4).1i();l.9.l=$(4).1i().M;l.9.t=$(4).1i().L;l.9.r=l.w+l.9.l;l.9.b=l.h+l.9.t;a.1f(l.h);a.W(l.w);8(H.2u){k.1S();s.1I()}};R 4};25.13.1S=6(){l.9=$(g).1i();l.9.l=$(g).1i().M;l.9.t=$(g).1i().L;l.9.r=l.w+l.9.l;l.9.b=l.h+l.9.t};6 1c(){4.5=16.2e("P");$(4.5).1Y(\'X\');4.5.3h=6(){$(t.5).Z();t=U 1c();t.1d()};4.2I=6(){1k(H.17){11\'1K\':4.1z=U 1Z();4.1z.1m=k.5.1m;4.5.1N(4.1z);$(4.5).J({\'1T\':1});N;11\'1j\':4.1z=U 1Z();4.1z.1m=s.5.1m;4.5.1N(4.1z);$(4.5).J({\'1T\':1});N;1l:N}1k(H.17){11\'1j\':u.w=l.w;u.h=l.h;N;1l:u.w=(H.18)/y.x;u.h=(H.19)/y.y;N}$(4.5).J({W:u.w+\'S\',1f:u.h+\'S\',Q:\'15\',1h:\'1r\',3i:1+\'S\'});a.3j(4.5)};R 4};1c.13.1d=6(){4.2I();1k(H.17){11\'1K\':g.J({\'1T\':H.2p});(H.1p)?t.1t():t.1o(1u);a.2f(\'1L\',6(e){B.x=e.1w;B.y=e.1x;t.1o(e)});N;11\'1j\':$(4.5).J({L:0,M:0});8(H.14){r.2g()}s.2c();a.2f(\'1L\',6(e){B.x=e.1w;B.y=e.1x;s.2J(e)});N;1l:(H.1p)?t.1t():t.1o(1u);$(a).2f(\'1L\',6(e){B.x=e.1w;B.y=e.1x;t.1o(e)});N}R 4};1c.13.1o=6(e){8(e){B.x=e.1w;B.y=e.1x}8(C==0){I b=(l.w)/2-(u.w)/2;I c=(l.h)/2-(u.h)/2;$(\'P.X\').1g();8(H.2n){4.5.K.20=\'2K\'}V{4.5.K.20=\'2h\';$(\'P.X\').23()}C=1}V{I b=B.x-l.9.l-(u.w)/2;I c=B.y-l.9.t-(u.h)/2}8(2L()){b=0+n}V 8(2M()){8($.1e.1O&&$.1e.2i<7){b=l.w-u.w+n-1}V{b=l.w-u.w+n-1}}8(2N()){c=0+m}V 8(2O()){8($.1e.1O&&$.1e.2i<7){c=l.h-u.h+m-1}V{c=l.h-u.h-1+m}}b=1A(b);c=1A(c);$(\'P.X\',a).J({L:c,M:b});8(H.17==\'1K\'){$(\'P.X 1H\',a).J({\'Q\':\'15\',\'L\':-(c-m+1),\'M\':-(b-n+1)})}4.5.K.M=b+\'S\';4.5.K.L=c+\'S\';s.1o();6 2L(){R B.x-(u.w+2*1)/2-n<l.9.l}6 2M(){R B.x+(u.w+2*1)/2>l.9.r+n}6 2N(){R B.y-(u.h+2*1)/2-m<l.9.t}6 2O(){R B.y+(u.h+2*1)/2>l.9.b+m}R 4};1c.13.1t=6(){$(\'P.X\',a).J(\'1h\',\'1r\');I b=(l.w)/2-(u.w)/2;I c=(l.h)/2-(u.h)/2;4.5.K.M=b+\'S\';4.5.K.L=c+\'S\';$(\'P.X\',a).J({L:c,M:b});8(H.17==\'1K\'){$(\'P.X 1H\',a).J({\'Q\':\'15\',\'L\':-(c-m+1),\'M\':-(b-n+1)})}s.1o();8($.1e.1O){$(\'P.X\',a).1g()}V{2A(6(){$(\'P.X\').2P(\'24\')},10)}};1c.13.1P=6(){I o={};o.M=1A(4.5.K.M);o.L=1A(4.5.K.L);R o};1c.13.Z=6(){8(H.17==\'1j\'){$(\'P.X\',a).2Q(\'24\',6(){$(4).Z()})}V{$(\'P.X\',a).Z()}};1c.13.28=6(){I a=\'\';a=$(\'P.X\').J(\'3k\');1B=\'\';I b=\'\';b=$(\'P.X\').J(\'3l\');1C=\'\';8($.1e.1O){I c=a.2R(\' \');a=c[1];I c=b.2R(\' \');b=c[1]}8(a){1U(i=0;i<3;i++){I x=[];x=a.1n(i,1);8(1V(x)==12){1B=1B+\'\'+a.1n(i,1)}V{N}}}8(b){1U(i=0;i<3;i++){8(!1V(b.1n(i,1))){1C=1C+b.1n(i,1)}V{N}}}1B=(1B.Y>0)?1W(1B):0;1C=(1C.Y>0)?1W(1C):0};6 1v(a){4.2S=a;4.5=U 1Z();4.1I=6(){8(!4.5)4.5=U 1Z();4.5.K.Q=\'15\';4.5.K.1h=\'1r\';4.5.K.M=\'-3m\';4.5.K.L=\'3n\';p=U 1R();8(H.2v&&!D){p.1g();D=1s}16.2j.1N(4.5);4.5.1m=4.2S};4.5.2D=6(){4.K.1h=\'1X\';I w=O.21($(4).W());I h=O.21($(4).1f());4.K.1h=\'1r\';y.x=(w/l.w);y.y=(h/l.h);8($(\'P.1D\').Y>0){$(\'P.1D\').Z()}v=1s;8(H.17!=\'1j\'&&A){z=U 1J();z.1d()}8(A){t=U 1c();t.1d()}8($(\'P.1D\').Y>0){$(\'P.1D\').Z()}};R 4};1v.13.1o=6(){4.5.K.M=O.1E(-y.x*1A(t.1P().M)+n)+\'S\';4.5.K.L=O.1E(-y.y*1A(t.1P().L)+m)+\'S\'};1v.13.2J=6(e){4.5.K.M=O.1E(-y.x*O.T(e.1w-l.9.l))+\'S\';4.5.K.L=O.1E(-y.y*O.T(e.1x-l.9.t))+\'S\';$(\'P.X 1H\',a).J({\'Q\':\'15\',\'L\':4.5.K.L,\'M\':4.5.K.M})};1v.13.2c=6(){4.5.K.M=O.1E(-y.x*O.T((l.w)/2))+\'S\';4.5.K.L=O.1E(-y.y*O.T((l.h)/2))+\'S\';$(\'P.X 1H\',a).J({\'Q\':\'15\',\'L\':4.5.K.L,\'M\':4.5.K.M})};6 1J(){I a=1y(g).1i().M;I b=1y(g).1i().L;4.5=16.2e("P");$(4.5).1Y(\'1M\');$(4.5).J({Q:\'15\',W:O.21(H.18)+\'S\',1f:O.21(H.19)+\'S\',1h:\'1r\',2T:3o,3p:\'2h\'});1k(H.Q){11"2m":a=(a+$(g).W()+O.T(H.1a)+H.18<$(16).W())?(a+$(g).W()+O.T(H.1a)):(a-H.18-10);1F=b+H.1b+H.19;b=(1F<$(16).1f()&&1F>0)?b+H.1b:b;N;11"M":a=(l.9.l-O.T(H.1a)-H.18>0)?(l.9.l-O.T(H.1a)-H.18):(l.9.l+l.w+10);1F=l.9.t+H.1b+H.19;b=(1F<$(16).1f()&&1F>0)?l.9.t+H.1b:l.9.t;N;11"L":b=(l.9.t-O.T(H.1b)-H.19>0)?(l.9.t-O.T(H.1b)-H.19):(l.9.t+l.h+10);1G=l.9.l+H.1a+H.18;a=(1G<$(16).W()&&1G>0)?l.9.l+H.1a:l.9.l;N;11"3q":b=(l.9.b+O.T(H.1b)+H.19<$(16).1f())?(l.9.b+O.T(H.1b)):(l.9.t-H.19-10);1G=l.9.l+H.1a+H.18;a=(1G<$(16).W()&&1G>0)?l.9.l+H.1a:l.9.l;N;1l:a=(l.9.l+l.w+H.1a+H.18<$(16).W())?(l.9.l+l.w+O.T(H.1a)):(l.9.l-H.18-O.T(H.1a));b=(l.9.b+O.T(H.1b)+H.19<$(16).1f())?(l.9.b+O.T(H.1b)):(l.9.t-H.19-O.T(H.1b));N}4.5.K.M=a+\'S\';4.5.K.L=b+\'S\';R 4};1J.13.1d=6(){8(!4.5.3r)4.5.1N(s.5);8(H.14){r.2g()}16.2j.1N(4.5);1k(H.2q){11\'1g\':$(4.5).1g();N;11\'3s\':$(4.5).2P(H.2s);N;1l:$(4.5).1g();N}$(4.5).1g();8($.1e.1O&&$.1e.2i<7){4.3t=$(\'<2U 3u="2b" 3v="3w" 3x="0" 1m="#" K="3y-3z: 2V" 3A="2V"></2U>\').J({Q:"15",M:4.5.K.M,L:4.5.K.L,2T:3B,W:(H.18+2),1f:(H.19)}).3C(4.5)};s.5.K.1h=\'1X\'};1J.13.Z=6(){1k(H.2r){11\'23\':$(\'.1M\').Z();N;11\'3D\':$(\'.1M\').2Q(H.2t);N;1l:$(\'.1M\').Z();N}};6 27(){4.5=1y(\'<P />\').1Y(\'2a\').2W(\'\'+q+\'\');4.2g=6(){8(H.17==\'1j\'){$(4.5).J({Q:\'15\',L:l.9.b+3,M:(l.9.l+1),W:l.w}).2k(\'2j\')}V{$(4.5).2k(z.5)}}};27.13.Z=6(){$(\'.2a\').Z()};6 1R(){4.5=16.2e("P");$(4.5).1Y(\'1D\');$(4.5).2W(H.2w);$(4.5).2k(a).J(\'20\',\'2h\');4.1g=6(){1k(H.2x){11\'1t\':2X=(l.h-$(4.5).1f())/2;2Y=(l.w-$(4.5).W())/2;$(4.5).J({L:2X,M:2Y});N;1l:I a=4.1P();N}$(4.5).J({Q:\'15\',20:\'2K\'})};R 4};1R.13.1P=6(){I o=1u;o=$(\'P.1D\').1i();R o}})}})(1y);6 26(a){2Z(a.22(0,1)==\' \'){a=a.22(1,a.Y)}2Z(a.22(a.Y-1,a.Y)==\' \'){a=a.22(0,a.Y-1)}R a};',62,226,'||||this|node|function||if|pos|||||||||||||||||||||||||||||||||||var|css|style|top|left|break|Math|div|position|return|px|abs|new|else|width|jqZoomPup|length|remove||case|false|prototype|title|absolute|document|zoomType|zoomWidth|zoomHeight|xOffset|yOffset|Lens|activate|browser|height|show|display|offset|innerzoom|switch|default|src|substr|setposition|alwaysOn|attr|none|true|center|null|Largeimage|pageX|pageY|jQuery|image|parseInt|lensbtop|lensbleft|preload|ceil|topwindow|leftwindow|img|loadimage|Stage|reverse|mousemove|jqZoomWindow|appendChild|msie|getoffset|removeAttr|Loader|setpos|opacity|for|isNaN|eval|block|addClass|Image|visibility|round|substring|hide|fast|Smallimage|trim|zoomTitle|findborder|unbind|jqZoomTitle|zoom_ieframe|setcenter|parent|createElement|bind|loadtitle|hidden|version|body|appendTo|200|right|lens|lensReset|imageOpacity|showEffect|hideEffect|fadeinSpeed|fadeoutSpeed|preloadImages|showPreload|preloadText|preloadPosition|href|deactivate|setTimeout|safari|border|onload|cursor|crosshair|relative|0px|loadlens|setinner|visible|overleft|overright|overtop|overbottom|fadeIn|fadeOut|split|url|zIndex|iframe|transparent|html|loadertop|loaderleft|while|fn|jqzoom|standard|slow|Loading|zoom|extend|each|outline|text|decoration|rel|click|hover|150|blur|opera|onerror|borderWidth|append|borderTop|borderLeft|5000px|10px|10000|overflow|bottom|firstChild|fadein|ieframe|class|name|content|frameborder|background|color|bgcolor|99|insertBefore|fadeout'.split('|'),0,{}))
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>CueBlocks_Zoom</name>
4
- <version>1.1</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
@@ -12,11 +12,11 @@
12
 
13
  2)template/catalog/product/view/media.phtml file will be ignored and the one in the extension will be used for the zoom function to work on the product page. So if you have customized your media.phtml file, you will need to copy your custom code and paste it in this "new" file located at /design/frontend/default/default/template/zoom/media.phtml. For help, please get in touch with us at magento@cueblocks.com
14
 
15
- 3)This extension will work for simple,configurable,bundled and grouped products.</notes>
16
  <authors><author><name>ekta puri</name><user>auto-converted</user><email>ekta.puri@cueblocks.com</email></author></authors>
17
- <date>2010-12-21</date>
18
- <time>08:21:16</time>
19
- <contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="zoom.xml" hash="9d7ceb5e15f5e80388dd25fe92b6f42a"/></dir><dir name="template"><dir name="zoom"><file name="media.phtml" hash="98e3ed410008dbe0651b97260d8934e8"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="JM"><dir name="Zoom"><dir name="etc"><file name="adminhtml.xml" hash="1787aafe175420dc3170eea9e0bf8f85"/><file name="config.xml" hash="8e9a686dff35f90589d45283d63ad45c"/><file name="system.xml" hash="8eb123d6f3235525069648bc28d0c388"/></dir><dir name="Helper"><file name="Data.php" hash="6f0d1d2d05d34668d4baaea47a69468e"/></dir></dir><file name="readme.txt" hash="7123a84962f0daa579c636b7bef08a57"/></dir></target><target name="mage"><dir name="js"><dir name="jquery"><file name="Cuejqzoom.js" hash="353ebe8a1e93ec9efcd596409973cd2f"/><file name="jquery-1.3.2.min.js" hash="25e59325cb47d2ab5ea650d47f431a9c"/><file name="jqzoom.pack.1.0.1.js" hash="336bd8d6f95ebd7cf144b86a2d2b462f"/></dir></dir><dir name="skin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="jqzoom.css" hash="1628687a7483ecad8c72abe1e008ffaf"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="JM_Zoom.xml" hash="5f9e5dcb20d6404adc69298787b13b36"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>CueBlocks_Zoom</name>
4
+ <version>1.2</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
12
 
13
  2)template/catalog/product/view/media.phtml file will be ignored and the one in the extension will be used for the zoom function to work on the product page. So if you have customized your media.phtml file, you will need to copy your custom code and paste it in this "new" file located at /design/frontend/default/default/template/zoom/media.phtml. For help, please get in touch with us at magento@cueblocks.com
14
 
15
+ 3)This extension will work for simple,configurable,bundled,virtual and grouped products.</notes>
16
  <authors><author><name>ekta puri</name><user>auto-converted</user><email>ekta.puri@cueblocks.com</email></author></authors>
17
+ <date>2010-12-22</date>
18
+ <time>08:06:00</time>
19
+ <contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="zoom.xml" hash="08b141509cfe1ee0446284cdc7f96190"/></dir><dir name="template"><dir name="zoom"><file name="media.phtml" hash="bade83e2391b1c516904d838260e9653"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="JM"><dir name="Zoom"><dir name="etc"><file name="config.xml" hash="f26eb7b6402402352fa5652048e08ade"/></dir><dir name="Helper"><file name="Data.php" hash="2245b8126f8ebf4298f860b4ee281dca"/></dir></dir><file name="readme.txt" hash="138b38dbe41de82e75ac53b3c229e4ae"/></dir></target><target name="mage"><dir name="js"><dir name="jquery"><file name="Cuejqzoom.js" hash="f5c86178d61b4f4dada2e116a6ce104a"/><file name="jquery-1.3.2.min.js" hash="25e59325cb47d2ab5ea650d47f431a9c"/><file name="jquery.jqzoom1.0.1.js" hash="e15445b6384c0be0b55b6d9b3f873867"/></dir></dir><dir name="skin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="jqzoom.css" hash="6b12d033e477ead2050d9d5cd58d7185"/></dir><dir name="images"><file name="zoomloader.gif" hash="7b9776076d5fceef4993b55c9383dedd"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="JM_Zoom.xml" hash="a663efed0c95b85798e6aa7ffd644c8b"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>
skin/frontend/default/default/css/jqzoom.css CHANGED
@@ -56,11 +56,12 @@ div.jqZoomTitle
56
  position:absolute;
57
  top:3px;
58
  left:3px;
 
59
  }
60
 
61
  .jqZoomWindow
62
  {
63
- /*border: 5px solid #000;*/
64
  margin-top:30px;
65
  background-color: #FFF;
66
  }
56
  position:absolute;
57
  top:3px;
58
  left:3px;
59
+
60
  }
61
 
62
  .jqZoomWindow
63
  {
64
+ border: 1px solid #000;
65
  margin-top:30px;
66
  background-color: #FFF;
67
  }
skin/frontend/default/default/images/zoomloader.gif ADDED
Binary file