Building your own jQuery image viewer or image gallery plugins is definitely doable...but it's also a pretty time consuming process. If you don't have the time to write your own script, check out any of these jQuery image viewer plugins, all of which come with options for sleek lightbox effects.
Magnific Popup is a versatile and simple image viewer plugin with lightbox effects. One of the most unique aspects of this plugin is the image scaling options that are available for your gallery that allow you to completely customize the way that your images take up space on the window. The plugin isn't limited to images -- you can also use it to create video, form, and text pop-ups.
You can use the fancyBox image viewer to display HTML elements, SWF movies, iFrames, and Ajax requests -- all of which can have a lightbox effect applied to them.
Colorbox is a popular image gallery plugin that comes with many different display options -- you can choose to include a lightbox, to add a slideshow option, or to include smooth CSS transition effects.
PhotoSwipe is a simple, responsive lightbox gallery with slideshow options that work on mobile devices. You can just to include all sorts of features in your image galleries, including captions, share buttons, close buttons, and toggle controls.
Swipebox is another lightbox plugin that creates a fully responsive image gallery that can be swiped through on tablets and mobile devices. The plugin is lightweight and customizable.