       <div class="crop">
         <img class="crop-image" src="#{imagePath}">
         <div class="crop-actions">
-          <button class="btn blue-btn">Crop</button>
-          <button class="btn red-btn">Discard</button>
+          <button class="btn blue-btn" data-crop>Crop</button>
+          <button class="btn red-btn" data-close>Discard</button>
         </div>
         <input type="hidden" data-crop-attribute="x"/>
         <input type="hidden" data-crop-attribute="y"/>


  events :
    'click' : 'check'
    'click .crop-button' : 'crop'

  setOriginalDimensions : (originalDimensions) ->
    @originalDimensions = originalDimensions

        onSelect : @_updateCropAttributes

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

  crop : (e) ->
    e.preventDefault()
    @closePopup()
    @trigger 'crop-image', @_getCropData()
    false

  close : (e) ->
    e.preventDefault()
    @closePopup()

  closePopup : () ->
    @$el.hide()

  _getCropData : () ->
