Using jquery with generated content

Hi, need a little advice on some jquery. I’m would like to add a light box to a site that has content generated by php. Basically it is a property site and will have a thumbnail image and description. When the user clicks on thumbnail I would like to display a gallery of pictures relevant to the property. Each property will be generated dynamically by php. My question is how do I enter the selector for the gallery into jquery. I am thinking of using Fancy Zoom as you can use hidden elements, as the gallery will be hidden.
I have a feeling it will involve ‘this’ but just not sure how.
I hope this all makes sense.
Any help would be much appreciated.
Thanks in advance.

Not sure exactly what your problem is but from what i can see is that you should be looking for the lightwindow to open a url with a query string value of the property…

e.g - gallery.php?propertyId=1

If this isn’t what you mean let us know