So, I'm making progress!
Here is what I have now: http://xmxbx.com/cart/index.php?main...roducts_id=211
Things I'm concerned about:
//find med size attribute images. location must be in /images/medium/attributes and image name must be image_MED.ext
$array_filename = split("[/\\.]", $products_options->fields['attributes_image']) ;
$filename = $array_filename[count($array_filename)-2];
$extension = '.'.$array_filename[count($array_filename)-1];
$filename = $filename.'_MED';
$path = DIR_WS_IMAGES . 'medium/attributes/';
$attribute_image_med = $path . $filename. $extension;
(note the double //'s)
So, the links are created on the images, but when you click them, nothing happens. You can load the images if you type in the path manually, so file permissions are good.
I was looking over your code, and I see that you use popWindow, as opposed to popImage. Yours also seems to use a full image path, where mine uses relative paths... No idea if that relevant, though.