Hello everybody.

I have a problem with running javascript.

On my website: http://s479828935.onlinehome.fr/work.php when you open the page and all videos are not yet posted, my pirobox js does not work. Only once all the videos are loaded and I click on a video, the video opens well in a modal window. But it's long...

And it's the same for the left menu, when you go to the artist page, the menu opens, then you click to work page, the menu is still open and artist in black. Whereas it should close and be yellow directly when clicking the work link.

The correct thing would be, all the menu to be in yellow except work, when clickink on work menu (it works for other pages), and if not all images of the video are loaded, when clicking on a video, this one should be opened thanks to the pirobox script. Masonry can load at the very end, I don't need this first.

I tried many things with .onload or .ready but I'm not very good with this then it did not work. You can see all the code with firebug.

Thank you in advance for your precious help.