Moo_CloudZoom - Version 1.2.2

Version Notes

Release 1.2.1

- New feature: view image in Lightbox instead of Magento popup view.

Release 1.2.2

- Bug fixes

Download this release

Release Info

Developer Magento Core Team
Extension Moo_CloudZoom
Version 1.2.2
Comparing to
See all releases


Code changes from version 1.2.1 to 1.2.2

package.xml CHANGED
@@ -1,9 +1,9 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Moo_CloudZoom</name>
4
- <version>1.2.1</version>
5
  <stability>stable</stability>
6
- <license/>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension replaces the image gallery with the cloudZoom widget.</summary>
@@ -20,14 +20,18 @@ Define lens opacity.&#xD;
20
  Dimensions of the main image.&#xD;
21
  Soft focus and inner zoom features.&#xD;
22
  Overlay color and opacity on hover.&#xD;
23
- To Configure it you can navigate to "System &gt; Configuration &gt; Catalog &gt; Moo Product Gallery "CloudZoom"</description>
24
  <notes>Release 1.2.1&#xD;
25
  &#xD;
26
- - New feature: view image in Lightbox instead of Magento popup view.</notes>
 
 
 
 
27
  <authors><author><name>mohammed</name><user>auto-converted</user><email>mohamed.alsharaf@gmail.com</email></author></authors>
28
- <date>2013-10-15</date>
29
- <time>22:24:50</time>
30
- <contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="cloud-zoom.css" hash="c38ebaa2cece30139d7f120d719c079a"/><file name="lightbox.css" hash="94e23810a71de44a5568107466c9390c"/></dir><dir name="js"><file name="cloud-zoom.1.0.2.min.js" hash="9638cde69145ca3e4de6e67c1d79ae99"/><file name="lightbox.js" hash="c7ec2f4c002fe84a21daea97e5fa1297"/><file name="jquery.js" hash="b11ced65f32fedbe9bf81ef9db0f3c94"/></dir><dir name="images"><dir name="lightbox"><file name="close.png" hash="d9d2d0b1308cb694aa8116915592e2a9"/><file name="loading.gif" hash="2299ad0b3f63413f026dfec20c205b8f"/><file name="next.png" hash="31f15875975aab69085470aabbfec802"/><file name="prev.png" hash="84b76dee6b27b795e89e3649078a11c2"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="moo_cloudzoom.xml" hash="81740bfb723df27dfa0b6859deefa75e"/></dir><dir name="template"><dir name="moo"><dir name="catalog"><dir name="product"><dir name="view"><file name="media.phtml" hash="658c249066f2ce49a9404fdb5bacf43d"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Moo_Catalog.xml" hash="7e8911b4eee9ea250d37eece71397548"/></dir></dir></dir></target><target name="magecommunity"><dir name="Moo"><dir name="Catalog"><dir name="Block"><dir name="Product"><dir name="View"><file name="Media.php" hash="9ac7840191c531e0157400abd1108abb"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="db4d7e3d14e325fcf8d80fc7e11fec0b"/></dir><dir name="Model"><dir name="Gallery"><dir name="CloudZoom"><file name="OpacityRange.php" hash="e17df12617e2e056f48797c523cc7360"/><file name="Position.php" hash="c45ea77fd3bcea8c1dc9edf2d8675b6a"/><file name="SmoothMove.php" hash="755000a5128b6dfda00c5b6f6c07392a"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="5bc32e5a5bce296391a6924ba45f3d43"/><file name="system.xml" hash="881e4273e5f3cbce71a3b69ebe8f8f5c"/></dir></dir></dir></target></contents>
31
  <compatible/>
32
- <dependencies/>
33
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Moo_CloudZoom</name>
4
+ <version>1.2.2</version>
5
  <stability>stable</stability>
6
+ <license>New BSD License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension replaces the image gallery with the cloudZoom widget.</summary>
20
  Dimensions of the main image.&#xD;
21
  Soft focus and inner zoom features.&#xD;
22
  Overlay color and opacity on hover.&#xD;
23
+ To Configure it you can navigate to "System &amp;gt; Configuration &amp;gt; Catalog &amp;gt; Moo Product Gallery "CloudZoom"</description>
24
  <notes>Release 1.2.1&#xD;
25
  &#xD;
26
+ - New feature: view image in Lightbox instead of Magento popup view.&#xD;
27
+ &#xD;
28
+ Release 1.2.2&#xD;
29
+ &#xD;
30
+ - Bug fixes</notes>
31
  <authors><author><name>mohammed</name><user>auto-converted</user><email>mohamed.alsharaf@gmail.com</email></author></authors>
32
+ <date>2013-11-17</date>
33
+ <time>23:22:56</time>
34
+ <contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="cloud-zoom.css" hash="c38ebaa2cece30139d7f120d719c079a"/><file name="lightbox.css" hash="94e23810a71de44a5568107466c9390c"/></dir><dir name="js"><file name="cloud-zoom.1.0.2.min.js" hash="09bb9fcf8a3128efbcf7d0e81cc856b5"/><file name="lightbox.js" hash="c7ec2f4c002fe84a21daea97e5fa1297"/><file name="jquery.js" hash="b11ced65f32fedbe9bf81ef9db0f3c94"/></dir><dir name="images"><dir name="lightbox"><file name="close.png" hash="d9d2d0b1308cb694aa8116915592e2a9"/><file name="loading.gif" hash="2299ad0b3f63413f026dfec20c205b8f"/><file name="next.png" hash="31f15875975aab69085470aabbfec802"/><file name="prev.png" hash="84b76dee6b27b795e89e3649078a11c2"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="moo_cloudzoom.xml" hash="81740bfb723df27dfa0b6859deefa75e"/></dir><dir name="template"><dir name="moo"><dir name="catalog"><dir name="product"><dir name="view"><file name="media.phtml" hash="658c249066f2ce49a9404fdb5bacf43d"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Moo_Catalog.xml" hash="7e8911b4eee9ea250d37eece71397548"/></dir></dir></dir></target><target name="magecommunity"><dir name="Moo"><dir name="Catalog"><dir name="Block"><dir name="Product"><dir name="View"><file name="Media.php" hash="9ac7840191c531e0157400abd1108abb"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="db4d7e3d14e325fcf8d80fc7e11fec0b"/></dir><dir name="Model"><dir name="Gallery"><dir name="CloudZoom"><file name="OpacityRange.php" hash="e17df12617e2e056f48797c523cc7360"/><file name="Position.php" hash="c45ea77fd3bcea8c1dc9edf2d8675b6a"/><file name="SmoothMove.php" hash="755000a5128b6dfda00c5b6f6c07392a"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="5bc32e5a5bce296391a6924ba45f3d43"/><file name="system.xml" hash="881e4273e5f3cbce71a3b69ebe8f8f5c"/></dir></dir></dir></target></contents>
35
  <compatible/>
36
+ <dependencies><required><php><min>5.2.0</min><max>5.6.0</max></php></required></dependencies>
37
  </package>
skin/frontend/default/default/js/cloud-zoom.1.0.2.min.js CHANGED
@@ -6,4 +6,4 @@
6
  // Please retain this copyright header in all versions of the software
7
  //////////////////////////////////////////////////////////////////////////////////
8
  jQuery.noConflict();
9
- (function($){jQuery(function() {jQuery('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();});function format(str){for(var i=1;i<arguments.length;i++){str=str.replace('%'+(i-1),arguments[i])}return str}function CloudZoom(jWin,opts){var sImg=$('img',jWin);var img1;var img2;var zoomDiv=null;var $mouseTrap=null;var lens=null;var $tint=null;var softFocus=null;var $ie6Fix=null;var zoomImage;var controlTimer=0;var cw,ch;var destU=0;var destV=0;var currV=0;var currU=0;var filesLoaded=0;var mx,my;var ctx=this,zw;setTimeout(function(){if($mouseTrap===null){var w=jWin.width();jWin.parent().append(format('<div style="width:%0px;position:absolute;top:75%;left:%1px;text-align:center" class="cloud-zoom-loading" >Loading...</div>',w/3,(w/2)-(w/6))).find(':last').css('opacity',0.5)}},200);var ie6FixRemove=function(){if($ie6Fix!==null){$ie6Fix.remove();$ie6Fix=null}};this.removeBits=function(){if(lens){lens.remove();lens=null}if($tint){$tint.remove();$tint=null}if(softFocus){softFocus.remove();softFocus=null}ie6FixRemove();$('.cloud-zoom-loading',jWin.parent()).remove()};this.destroy=function(){jWin.data('zoom',null);if($mouseTrap){$mouseTrap.unbind();$mouseTrap.remove();$mouseTrap=null}if(zoomDiv){zoomDiv.remove();zoomDiv=null}this.removeBits()};this.fadedOut=function(){if(zoomDiv){zoomDiv.remove();zoomDiv=null}this.removeBits()};this.controlLoop=function(){if(lens){var x=(mx-sImg.offset().left-(cw*0.5))>>0;var y=(my-sImg.offset().top-(ch*0.5))>>0;if(x<0){x=0}else if(x>(sImg.outerWidth()-cw)){x=(sImg.outerWidth()-cw)}if(y<0){y=0}else if(y>(sImg.outerHeight()-ch)){y=(sImg.outerHeight()-ch)}lens.css({left:x,top:y});lens.css('background-position',(-x)+'px '+(-y)+'px');destU=(((x)/sImg.outerWidth())*zoomImage.width)>>0;destV=(((y)/sImg.outerHeight())*zoomImage.height)>>0;currU+=(destU-currU)/opts.smoothMove;currV+=(destV-currV)/opts.smoothMove;zoomDiv.css('background-position',(-(currU>>0)+'px ')+(-(currV>>0)+'px'))}controlTimer=setTimeout(function(){ctx.controlLoop()},30)};this.init2=function(img,id){filesLoaded++;if(id===1){zoomImage=img}if(filesLoaded===2){this.init()}};this.init=function(){$('.cloud-zoom-loading',jWin.parent()).remove();$mouseTrap=jWin.parent().append(format("<div class='mousetrap' style='background-image:url(\".\");z-index:999;position:absolute;width:%0px;height:%1px;left:%2px;top:%3px;\'></div>",sImg.outerWidth(),sImg.outerHeight(),0,0)).find(':last');$mouseTrap.bind('mousemove',this,function(event){mx=event.pageX;my=event.pageY});$mouseTrap.bind('mouseleave',this,function(event){clearTimeout(controlTimer);if(lens){lens.fadeOut(299)}if($tint){$tint.fadeOut(299)}if(softFocus){softFocus.fadeOut(299)}zoomDiv.fadeOut(300,function(){ctx.fadedOut()});return false});$mouseTrap.bind('mouseenter',this,function(event){mx=event.pageX;my=event.pageY;zw=event.data;if(zoomDiv){zoomDiv.stop(true,false);zoomDiv.remove()}var xPos=opts.adjustX,yPos=opts.adjustY;var siw=sImg.outerWidth();var sih=sImg.outerHeight();var w=opts.zoomWidth;var h=opts.zoomHeight;if(opts.zoomWidth=='auto'){w=siw}if(opts.zoomHeight=='auto'){h=sih}var appendTo=jWin.parent();switch(opts.position){case'top':yPos-=h;break;case'right':xPos+=siw;break;case'bottom':yPos+=sih;break;case'left':xPos-=w;break;case'inside':w=siw;h=sih;break;default:appendTo=$('#'+opts.position);if(!appendTo.length){appendTo=jWin;xPos+=siw;yPos+=sih}else{w=appendTo.innerWidth();h=appendTo.innerHeight()}}zoomDiv=appendTo.append(format('<div id="cloud-zoom-big" class="cloud-zoom-big" style="display:none;position:absolute;left:%0px;top:%1px;width:%2px;height:%3px;background-image:url(\'%4\');z-index:99;"></div>',xPos,yPos,w,h,zoomImage.src)).find(':last');if(sImg.attr('title')&&opts.showTitle){zoomDiv.append(format('<div class="cloud-zoom-title">%0</div>',sImg.attr('title'))).find(':last').css('opacity',opts.titleOpacity)}if($.browser.msie&&$.browser.version<7){$ie6Fix=$('<iframe frameborder="0" src="#"></iframe>').css({position:"absolute",left:xPos,top:yPos,zIndex:99,width:w,height:h}).insertBefore(zoomDiv)}zoomDiv.fadeIn(500);if(lens){lens.remove();lens=null}cw=(sImg.outerWidth()/zoomImage.width)*parseInt(zoomDiv.css('width'));ch=(sImg.outerHeight()/zoomImage.height)*zoomDiv.height();lens=jWin.append(format("<div class = 'cloud-zoom-lens' style='display:none;z-index:98;position:absolute;width:%0px;height:%1px;'></div>",cw,ch)).find(':last');$mouseTrap.css('cursor',lens.css('cursor'));$mouseTrap.unbind('click').bind('click',function(){var a=$(this).prev('a');var l=a.attr('data-lightbox');if(l!= null){a.trigger('click');return;}var t=a.attr('gallery');if(t==''){return;}popWin(t,'gallery','width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes');});var noTrans=false;if(opts.tint){lens.css('background','url("'+sImg.attr('src')+'")');$tint=jWin.append(format('<div style="display:none;position:absolute; left:0px; top:0px; width:%0px; height:%1px; background-color:%2;" />',sImg.outerWidth(),sImg.outerHeight(),opts.tint)).find(':last');$tint.css('opacity',opts.tintOpacity);noTrans=true;$tint.fadeIn(500)}if(opts.softFocus){lens.css('background','url("'+sImg.attr('src')+'")');softFocus=jWin.append(format('<div style="position:absolute;display:none;top:2px; left:2px; width:%0px; height:%1px;" />',sImg.outerWidth()-2,sImg.outerHeight()-2,opts.tint)).find(':last');softFocus.css('background','url("'+sImg.attr('src')+'")');softFocus.css('opacity',0.5);noTrans=true;softFocus.fadeIn(500)}if(!noTrans){lens.css('opacity',opts.lensOpacity)}if(opts.position!=='inside'){lens.fadeIn(500)}zw.controlLoop();return})};img1=new Image();$(img1).load(function(){ctx.init2(this,0)});img1.src=sImg.attr('src');img2=new Image();$(img2).load(function(){ctx.init2(this,1)});img2.src=jWin.attr('href')}$.fn.CloudZoom=function(options){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}this.each(function(){var relOpts,opts;eval('var a = {'+$(this).attr('rel')+'}');relOpts=a;if($(this).is('.cloud-zoom')){$(this).css({'position':'relative','display':'block'});$('img',$(this)).css({'display':'block'});if($(this).parent().attr('id')!='wrap'){$(this).wrap('<div id="wrap" style="top:0px;z-index:9999;position:relative;"></div>')}opts=$.extend({},$.fn.CloudZoom.defaults,options);opts=$.extend({},opts,relOpts);$(this).data('zoom',new CloudZoom($(this),opts))}else if($(this).is('.cloud-zoom-gallery')){opts=$.extend({},relOpts,options);$(this).data('relOpts',opts);$(this).bind('click',$(this),function(event){var data=event.data.data('relOpts');$('#'+data.useZoom).data('zoom').destroy();$('#'+data.useZoom).attr('href',event.data.attr('href'));var t = event.data.attr('title');var bimg = $('#'+data.useZoom+' img').attr('src',event.data.data('relOpts').smallImage);if(t!=''){bimg.attr('title', t);}bimg.parent().attr('gallery',event.data.data('relOpts').popupWin);$('#'+event.data.data('relOpts').useZoom).CloudZoom();return false})}});return this};$.fn.CloudZoom.defaults={zoomWidth:'auto',zoomHeight:'auto',position:'right',tint:false,tintOpacity:0.5,lensOpacity:0.5,softFocus:false,smoothMove:3,showTitle:true,titleOpacity:0.5,adjustX:0,adjustY:0}})(jQuery);
6
  // Please retain this copyright header in all versions of the software
7
  //////////////////////////////////////////////////////////////////////////////////
8
  jQuery.noConflict();
9
+ (function($){jQuery(function() {jQuery('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();});function format(str){for(var i=1;i<arguments.length;i++){str=str.replace('%'+(i-1),arguments[i])}return str}function CloudZoom(jWin,opts){var sImg=$('img',jWin);var img1;var img2;var zoomDiv=null;var $mouseTrap=null;var lens=null;var $tint=null;var softFocus=null;var $ie6Fix=null;var zoomImage;var controlTimer=0;var cw,ch;var destU=0;var destV=0;var currV=0;var currU=0;var filesLoaded=0;var mx,my;var ctx=this,zw;setTimeout(function(){if($mouseTrap===null){var w=jWin.width();jWin.parent().append(format('<div style="width:%0px;position:absolute;top:75%;left:%1px;text-align:center" class="cloud-zoom-loading" >Loading...</div>',w/3,(w/2)-(w/6))).find(':last').css('opacity',0.5)}},200);var ie6FixRemove=function(){if($ie6Fix!==null){$ie6Fix.remove();$ie6Fix=null}};this.removeBits=function(){if(lens){lens.remove();lens=null}if($tint){$tint.remove();$tint=null}if(softFocus){softFocus.remove();softFocus=null}ie6FixRemove();$('.cloud-zoom-loading',jWin.parent()).remove()};this.destroy=function(){jWin.data('zoom',null);if($mouseTrap){$mouseTrap.unbind();$mouseTrap.remove();$mouseTrap=null}if(zoomDiv){zoomDiv.remove();zoomDiv=null}this.removeBits()};this.fadedOut=function(){if(zoomDiv){zoomDiv.remove();zoomDiv=null}this.removeBits()};this.controlLoop=function(){if(lens){var x=(mx-sImg.offset().left-(cw*0.5))>>0;var y=(my-sImg.offset().top-(ch*0.5))>>0;if(x<0){x=0}else if(x>(sImg.outerWidth()-cw)){x=(sImg.outerWidth()-cw)}if(y<0){y=0}else if(y>(sImg.outerHeight()-ch)){y=(sImg.outerHeight()-ch)}lens.css({left:x,top:y});lens.css('background-position',(-x)+'px '+(-y)+'px');destU=(((x)/sImg.outerWidth())*zoomImage.width)>>0;destV=(((y)/sImg.outerHeight())*zoomImage.height)>>0;currU+=(destU-currU)/opts.smoothMove;currV+=(destV-currV)/opts.smoothMove;zoomDiv.css('background-position',(-(currU>>0)+'px ')+(-(currV>>0)+'px'))}controlTimer=setTimeout(function(){ctx.controlLoop()},30)};this.init2=function(img,id){filesLoaded++;if(id===1){zoomImage=img}if(filesLoaded===2){this.init()}};this.init=function(){$('.cloud-zoom-loading',jWin.parent()).remove();$mouseTrap=jWin.parent().append(format("<div class='mousetrap' style='background-image:url(\".\");z-index:999;position:absolute;width:%0px;height:%1px;left:%2px;top:%3px;\'></div>",sImg.outerWidth(),sImg.outerHeight(),0,0)).find(':last');$mouseTrap.bind('mousemove',this,function(event){mx=event.pageX;my=event.pageY});$mouseTrap.bind('mouseleave',this,function(event){clearTimeout(controlTimer);if(lens){lens.fadeOut(299)}if($tint){$tint.fadeOut(299)}if(softFocus){softFocus.fadeOut(299)}zoomDiv.fadeOut(300,function(){ctx.fadedOut()});return false});$mouseTrap.bind('mouseenter',this,function(event){mx=event.pageX;my=event.pageY;zw=event.data;if(zoomDiv){zoomDiv.stop(true,false);zoomDiv.remove()}var xPos=opts.adjustX,yPos=opts.adjustY;var siw=sImg.outerWidth();var sih=sImg.outerHeight();var w=opts.zoomWidth;var h=opts.zoomHeight;if(opts.zoomWidth=='auto'){w=siw}if(opts.zoomHeight=='auto'){h=sih}var appendTo=jWin.parent();switch(opts.position){case'top':yPos-=h;break;case'right':xPos+=siw;break;case'bottom':yPos+=sih;break;case'left':xPos-=w;break;case'inside':w=siw;h=sih;break;default:appendTo=$('#'+opts.position);if(!appendTo.length){appendTo=jWin;xPos+=siw;yPos+=sih}else{w=appendTo.innerWidth();h=appendTo.innerHeight()}}zoomDiv=appendTo.append(format('<div id="cloud-zoom-big" class="cloud-zoom-big" style="display:none;position:absolute;left:%0px;top:%1px;width:%2px;height:%3px;background-image:url(\'%4\');z-index:99;"></div>',xPos,yPos,w,h,zoomImage.src)).find(':last');if(sImg.attr('title')&&opts.showTitle){zoomDiv.append(format('<div class="cloud-zoom-title">%0</div>',sImg.attr('title'))).find(':last').css('opacity',opts.titleOpacity)}zoomDiv.fadeIn(500);if(lens){lens.remove();lens=null}cw=(sImg.outerWidth()/zoomImage.width)*parseInt(zoomDiv.css('width'));ch=(sImg.outerHeight()/zoomImage.height)*zoomDiv.height();lens=jWin.append(format("<div class = 'cloud-zoom-lens' style='display:none;z-index:98;position:absolute;width:%0px;height:%1px;'></div>",cw,ch)).find(':last');$mouseTrap.css('cursor',lens.css('cursor'));$mouseTrap.unbind('click').bind('click',function(){var a=$(this).prev('a');var l=a.attr('data-lightbox');if(l!= null){a.trigger('click');return;}var t=a.attr('gallery');if(t==''){return;}popWin(t,'gallery','width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes');});var noTrans=false;if(opts.tint){lens.css('background','url("'+sImg.attr('src')+'")');$tint=jWin.append(format('<div style="display:none;position:absolute; left:0px; top:0px; width:%0px; height:%1px; background-color:%2;" />',sImg.outerWidth(),sImg.outerHeight(),opts.tint)).find(':last');$tint.css('opacity',opts.tintOpacity);noTrans=true;$tint.fadeIn(500)}if(opts.softFocus){lens.css('background','url("'+sImg.attr('src')+'")');softFocus=jWin.append(format('<div style="position:absolute;display:none;top:2px; left:2px; width:%0px; height:%1px;" />',sImg.outerWidth()-2,sImg.outerHeight()-2,opts.tint)).find(':last');softFocus.css('background','url("'+sImg.attr('src')+'")');softFocus.css('opacity',0.5);noTrans=true;softFocus.fadeIn(500)}if(!noTrans){lens.css('opacity',opts.lensOpacity)}if(opts.position!=='inside'){lens.fadeIn(500)}zw.controlLoop();return})};img1=new Image();$(img1).load(function(){ctx.init2(this,0)});img1.src=sImg.attr('src');img2=new Image();$(img2).load(function(){ctx.init2(this,1)});img2.src=jWin.attr('href')}$.fn.CloudZoom=function(options){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}this.each(function(){var relOpts,opts;eval('var a = {'+$(this).attr('rel')+'}');relOpts=a;if($(this).is('.cloud-zoom')){$(this).css({'position':'relative','display':'block'});$('img',$(this)).css({'display':'block'});if($(this).parent().attr('id')!='wrap'){$(this).wrap('<div id="wrap" style="top:0px;z-index:9999;position:relative;"></div>')}opts=$.extend({},$.fn.CloudZoom.defaults,options);opts=$.extend({},opts,relOpts);$(this).data('zoom',new CloudZoom($(this),opts))}else if($(this).is('.cloud-zoom-gallery')){opts=$.extend({},relOpts,options);$(this).data('relOpts',opts);$(this).bind('click',$(this),function(event){var data=event.data.data('relOpts');$('#'+data.useZoom).data('zoom').destroy();$('#'+data.useZoom).attr('href',event.data.attr('href'));var t = event.data.attr('title');var bimg = $('#'+data.useZoom+' img').attr('src',event.data.data('relOpts').smallImage);if(t!=''){bimg.attr('title', t);}bimg.parent().attr('gallery',event.data.data('relOpts').popupWin);$('#'+event.data.data('relOpts').useZoom).CloudZoom();return false})}});return this};$.fn.CloudZoom.defaults={zoomWidth:'auto',zoomHeight:'auto',position:'right',tint:false,tintOpacity:0.5,lensOpacity:0.5,softFocus:false,smoothMove:3,showTitle:true,titleOpacity:0.5,adjustX:0,adjustY:0}})(jQuery);