We now need to create the wrappers for each of the overlay images (note that this code is still within the each()
method and so will be executed for each of the images that have the expanded
class name):
$("<div></div>", { "class": "expander-wrapper", css: { top: coords.top, left: (webkit === true && expander.css("float") === "right") ? (coords.left + expander.width()) : coords.left,direction: (expander.css("float") === "right") ? "rtl" : "ltr" }, html: copy, width: expander.width(), height: expander.height(), click: function() { var img = $(this).find("img"), id = img.attr("id"); if (!img.hasClass("expanded")) { img.addClass("expanded").animate({ width: dims[id].big.width, height: dims[id].big.height }, { queue: false }); } else { img.animate({ width: dims[id].small.width, ...