I need help OVERLAY

I need help OVERLAY

Hi Masters.. I need help with the Overlay.. I am making a gallery picture at the moment and I am stuck coz my boss wants more..
My case :

- I have database for my gallery and two tables in it (album and gallery)
- First I load the album..

- and after I click one of the album it shows the gallery inside in Overlay function..

The pictures above are Pics in the first Album I clicked..



- If I clicked one of the gallery its like pop up (i don't know whats the name what I know its overlay) and I can click next to see the next pictures in the album...

My Boss wants :
- After I clicked one of the album it directly show the overlay of the pictures of the album's just like the picture number three above.. No Thumbnail again..

I confuse how to make it.. coz What i coded is first it need to get in to the album and I have to click one of the pic so the overlay can be shown...

Someone please help me... Maybe by giving an example.. Thanks..

Sorry If My grammar isn't good.

Thanks