       options = $.extend({}, methods.defaults, options) # TODO: This is not extending!
       modal_content = $(this).find(".d_content").children()
       parent = $(this).parents(".modal_wrapper")
+      m  = $(".modal")
       remove_and_clean = ->
         unless options.removeContent
           modal_content.appendTo(options.appendTo).css "display", "none"

        else
          modal_content.remove()

        unless $(".modal")[1]
          $(options.appendTo).removeClass "modal_close"
          $(window).unbind "resize.modal"
        parent.remove()

        options.afterClose()

      options.beforeClose()

      # Checking for multiple open
      if m[1]
        $(m[m.length - 1]).fadeOut "fast", =>
          remove_and_clean()
      else
        $(this).bind 'oanimationend animationend webkitAnimationEnd',  =>
          remove_and_clean()
