       props.translateY = "#{distance}px"
     else if direction == 'bottom'
       props.translateY = "-#{distance}px"
+    if isiPad()
+      delete props.translateY
+      delete props.translateX
     props.opacity = 0
     props.scale = 0.5
     item.gfx(props, {duration: 1})


SERVER = 'http://147.232.55.155:5000'

# TODO:
# - Deselecting phrase by tapping somewhere else

class App extends Spine.Controller
  events:
    'click .phrase': 'select'
    'touchend .phrase': 'select'
    'click .image': 'open'
    'touchend .image': 'open'
  
  constructor: ->
    super

    $("body").addClass("selected")
    
  _deselect: =>
    @_closeCurrent()
    $("body").removeClass("selected")
    phrases = @$(".phrase")
    # $(".hilight").detach()
    for phrase in phrases
      phrase = $(phrase)
      phrase.html(phrase.text())
