bindSwipe = ($target, callback)->
x = 0
direction = ""
getX = (e)->
return e.originalEvent.touches[0].pageX;
$target
.on "touchstart", (e)->
x = getX e
.on "touchmove", (e)->
direction = if (x > getX(e)) then "left" else "right"
.on "touchend", ->
callback direction