     constructor: (@q, @lightboxService, @loading) ->
         _.bindAll(@)
 
-    hide: ->
-        if @.el
-            @lightboxService.close(@.el)
-
-            @.el.off(".confirm-dialog")
-            delete @.el
+    hide: (el)->
+        if el
+            @lightboxService.close(el)
+
+            el.off(".confirm-dialog")
 
     ask: (title, subtitle, lightboxSelector=".lightbox_confirm-delete") ->
-        @.el = angular.element(lightboxSelector)
-
-        # Render content
-        @.el.find("h2.title").html(title)
-        @.el.find("span.subtitle").html(subtitle)
-        defered = @q.defer()
-
-        # Assign event handlers
-        @.el.on "click.confirm-dialog", "a.button-green", debounce 2000, (event) =>
+        el = angular.element(lightboxSelector)
+
+        # Render content
+        el.find("h2.title").html(title)
+        el.find("span.subtitle").html(subtitle)
+        defered = @q.defer()
+
+        # Assign event handlers
+        el.on "click.confirm-dialog", "a.button-green", debounce 2000, (event) =>
             event.preventDefault()
             target = angular.element(event.currentTarget)
             @loading.start(target)
             defered.resolve =>
                 @loading.finish(target)
-                @.hide()
-
-        @.el.on "click.confirm-dialog", "a.button-red", (event) =>
+                @.hide(el)
+
+        el.on "click.confirm-dialog", "a.button-red", (event) =>
             event.preventDefault()
             defered.reject()
-            @.hide()
-
-        @lightboxService.open(@.el)
+            @.hide(el)
+
+        @lightboxService.open(el)
 
         return defered.promise
 
     askChoice: (title, subtitle, choices, lightboxSelector=".lightbox-ask-choice") ->
-        @.el = angular.element(lightboxSelector)
-
-        # Render content
-        @.el.find("h2.title").html(title)
-        @.el.find("span.subtitle").html(subtitle)
-        choicesField = @.el.find("select.choices")
+        el = angular.element(lightboxSelector)
+
+        # Render content
+        el.find("h2.title").html(title)
+        el.find("span.subtitle").html(subtitle)
+        choicesField = el.find("select.choices")
         choicesField.html('')
         _.each choices, (value, key) ->
             choicesField.append(angular.element("<option value='#{key}'>#{value}</option>"))
         defered = @q.defer()
 
         # Assign event handlers
-        @.el.on "click.confirm-dialog", "a.button-green", debounce 2000, (event) =>
+        el.on "click.confirm-dialog", "a.button-green", debounce 2000, (event) =>
             event.preventDefault()
             target = angular.element(event.currentTarget)
             @loading.start(target)


            delete @.tsem

        @.el.on "click", ".icon-delete", (event) =>
            body.find(selector)
                .removeClass('active')
                .addClass('inactive')

        #       Add default texts to NOTIFICATION_MSG for new notification types

        selector = ".notification-message-#{type}"
        el = angular.element(selector)

        if title
           el.find("h4").html(title)
        else
           el.find("h4").html(NOTIFICATION_MSG[type].title)

        if message
            el.find("p").html(message)
        else
            el.find("p").html(NOTIFICATION_MSG[type].message)

        body = angular.element("body")
        body.find(".notification-message .notification-light")
