For popup / new windows this is the JavaScript I use.
It is taken from Jeremy Keith's book, Dom Scripting. It's the best...
[...code block...]
I always seem to have models that have many attachments, but some of them are special. Like on this site I have a Site class that has a tout image, a before image, and an after image (for ... more