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


    changeImage: (e) ->
        img = $(@).attr 'href'
        oldImg = $ 'div.drm-blackout img.img-visible'
        oldImgSrc = oldImg.attr 'src'
        speed = @speed

        e.preventDefault()

        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
