title: make loop in jquery lightbox
body: <p>Hello i'm trying to create loop for image gallery in jquery lightbox plugin <a href="http://leandrovieira.com/projects/jquery/lightbox/" rel="nofollow">http://leandrovieira.com/projects/jquery/lightbox/</a>. (when it reaches the last image show next button for first image, or when it is showing first image, display prev button for last image) So far I have found that i need to change these lines : </p>
  
  <pre><code>        // Show the prev button, if not the first image in set
          if ( settings.activeImage != 0 ) {
              if ( settings.fixedNavigation ) {
                  $('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
                      .unbind()
                      .bind('click',function() {
                          settings.activeImage = settings.activeImage - 1;
                          _set_image_to_view();
                          return false;
                      });
              } else {
                  // Show the images button for Next buttons
                  $('#lightbox-nav-btnPrev').unbind().hover(function() {
                      $(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
                  },function() {
                      $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
                  }).show().bind('click',function() {
                      settings.activeImage = settings.activeImage - 1;
                      _set_image_to_view();
                      return false;
                  });
              }
          }
  
          // Show the next button, if not the last image in set
          if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
              if ( settings.fixedNavigation ) {
                  $('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
                      .unbind()
                      .bind('click',function() {
                          settings.activeImage = settings.activeImage + 1;
                          _set_image_to_view();
                          return false;
                      });
              } else {
                  // Show the images button for Next buttons
                  $('#lightbox-nav-btnNext').unbind().hover(function() {
                      $(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
                  },function() {
                      $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
                  }).show().bind('click',function() {
                      settings.activeImage = settings.activeImage + 1;
                      _set_image_to_view();
                      return false;
                  });
              }
          }
  </code></pre>
  
  <p>My knowledge in jquery is basic, so maybe someone can help?</p>