     @$el.find('button').click (e) =>
       @renderFromUrl $(e.currentTarget).data('new')
 
+  _updatePosition : () ->
+    @$el.css top : "#{window.pageYOffset}px"
+
 
 @FormPopup.View.init = (popupModel, url) ->
   popupView = new FormPopup.View

  onClick : (e) ->
    @closePopup() if $(e.target).closest('.simple_form').length is 0

  closePopup : () ->
    @model.destroy()
    @undelegateEvents()

  renderFromUrl : (url) ->
    $.get url, (html) =>
      @$el.html html
      @_updatePosition()
      @delegateEvents()
      @_init()

