                 return unless e.target is @
                 vex.close $(@).data().vex.id
 
+        options.$vex.append options.$vexOverlay
+
         # Content
 
         options.$vexContent = $('<div>')
             .addClass(vex.baseClassNames.content)
-            .addClass(options.className)
-            .css(options.css)
+            .addClass(options.contentClassName)
+            .css(options.contentCSS)
             .append(options.content)
             .data(vex: options)
 
-        options.$vexOverlay.append options.$vexContent
+        options.$vex.append options.$vexContent
 
         # Close button
 


        options.id = vex.globalID
        vex.globalID += 1

        # Overlay



        close = ->
            $vexContent.trigger 'vexClose', options
            $vex.remove()
            options.afterClose $vexContent, options if options.afterClose

        if animationEndSupport
            beforeClose()
            $vex
                .unbind(vex.animationEndEvent).bind(vex.animationEndEvent, -> close())
                .addClass(vex.baseClassNames.closing)

