I wrote a program that takes an array of images and forms a lightbox with some nice social bells and whistles. I would like to begin integrating it into WordPress but I have almost no experience developing WordPress other than a hello world plugin. I immagine there is a specific way Wordpress Prefers you do this. I am familiar with some of the wordpress API like $the_post and such.
My question is how can I pull the array of image urls from a WordPress gallery AND how can I add my onlick event to every image overriding whatever default action WordPress places on them?