 
     changeImage: (e) ->
         img = $(@).attr 'href'
-        oldImg = $ 'div.drm-blackout img.img-visible'
-        oldImgSrc = oldImg.attr 'src'
+        _oldImg = $ 'div.drm-blackout img.img-visible'
+        _oldImgSrc = _oldImg.attr 'src'
         speed = @speed
 
         e.preventDefault()
 
-        if oldImgSrc isnt img             
-            oldImg.fadeOut speed, ->
+        if _oldImgSrc isnt img             
+            _oldImg.fadeOut speed, ->
                 $(@).attr('src', img).fadeIn speed
 
         e.stopPropagation()

        self.body.on 'click', 'div.drm-blackout', self.removeLightbox

    createThumbnails: ->
        links = @images.find 'a'
        thumbnailList = []          
        thumbnails = ''

        # populate imgList array
        links.each ->
            thumbnailList.push $(@).attr 'href'

        # create html for thumbnail-list

###############################################################################
"use strict"

$ = jQuery
class @DrmLightbox
    constructor: (@images = $('ul.drm-lightbox-thumbnails'), @speed = 300) ->
        self = @
