Event handler duplicating object

Event handler duplicating object

I am fairly new to jQuery, and I've added an event handler to launch a slideshow from the "a" tag around an image. The problem arises when I try to ad a plain hyperlink to the caption for the image, that has another handler to open the same slideshow. Now when I use either the image or the hyperlink to open the slideshow, the number of slides is doubled, because it is creating another instance of the object colorbox()

How can I handle this?  I thought since I was refrencing the same "a.slideGroup" it would be fine. Here are my handlers:

  1. $('.slide').on('click', 'a.isSlideshow', function() {
  2.    $('a.slideGroup').colorbox({rel:'slideGroup1', open:true});
  3. });
  4. $('.imageCaption').on('click', 'a#openGallery', function() {
  5.  $('a.slideGroup').colorbox({open:true});
  6. });