Not sure if your next step is zen lightbox of fual slimbox. Either way you will need to pin down the specific place where it is failing. From what you've said this looks as though it may be in the main_product_image module.
I'd check whether this is the case by putting echo statements either side of the call to it.



