Featured Image Zoomer (now w/Multi-Zoom) v2.1
http://www.dynamicdrive.com/dynamicindex4/featuredzoomer.htm
by ravimallya
CSS
.magnifyarea { /* CSS to add shadow to magnified image. Optional */
box-shadow: 5px 5px 7px #818181;
-webkit-box-shadow: 5px 5px 7px #818181;
-moz-box-shadow: 5px 5px 7px #818181;
filter: progid:DXImageTransform.Microsoft.dropShadow(color=#818181, offX=5, offY=5, positive=true);
background: white;
}
.targetarea { /* CSS for container div(s) of the zoomable image */
width: 325px; /* wide or wider than the widest zoomable image */
height: 338px; /* high or higher than the tallest zoomable image */
margin-top:3px;
}
#two { /* Added CSS for second target div of zoomable images */
height: 243px; /* high or higher than the tallest zoomable image */
}
.targetarea img { /* zoomable image */
margin: auto; /* for horizontal centering */
display: block; /* also for horizontal centering */
position: relative; /* along with on the fly calculations in script, for vertical centering */
border-width: 0;
}
.thumbs { /* divs holding the trigger links - styles optional, used here to center their links below their respective zoomable image */
padding-top: 25px;
width: 325px;
text-align: center;
}
.thumbs a { /* trigger links on the thumbnail images */
text-decoration: none; /* avoid underlines of images, text or spaces in these links */
}
.thumbs img { /* trigger images - the thumbnails used to load new zoomable images into the targetarea */
border-width: 0; /* avoid default borders in some browsers */
}
#description, #description2 {
position: absolute; /* required for description folows image bottom (descpos: true) */
width: 325px; /* should be width of zoomable image container (.targetarea) */
text-align: center;
font: bold 95% sans-serif;
margin-top: 3px; /* when following image bottom, this sets a fixed distance for that */
color: #222;
background-color: #fff;
}
JavaScript
// Multi-Zoom Script (c)2012 John Davenport Scheuer
// as first seen in http://www.dynamicdrive.com/forums/
// username: jscheuer1 - This Notice Must Remain for Legal Use
// requires: a modified version of Dynamic Drive's Featured Image Zoomer (w/ adjustable power) (included)
/*Featured Image Zoomer (May 8th, 2010)
* This notice must stay intact for usage
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/
// Feb 21st, 2011: Script updated to v1.5, which now includes new feature by jscheuer1 (http://www.dynamicdrive.com/forums/member.php?u=2033) to show optional "magnifying lens" while over thumbnail image.
// March 1st, 2011: Script updated to v1.51. Minor improvements to inner workings of script.
// July 9th, 12': Script updated to v1.5.1, which fixes mouse wheel issue with script when used with a more recent version of jQuery.
// Nov 5th, 2012: Unofficial update to v1.5.1m for integration with multi-zoom (adds multiple images to be zoomed via thumbnail activated image swapping)
// Nov 28th, 2012: Version 2.1 w/Multi Zoom, updates - new features and bug fixes
var featuredimagezoomer = { // the two options for Featured Image Zoomer:
loadinggif:...