-# Place all the behaviors and hooks related to the matching controller here.
-# All this logic will automatically be available in application.js.
-# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
-
 DAY = 1000 * 60 * 60 * 24
 
 $ ->

  else 
    $(".date-description").text("")


remove_date_error = ->
  $(".validate-motion-close-date").parent().removeClass("error")
  $(".date-error-message").hide()

  if (days_passed == 1)
    return days_passed + " day from now"
  return days_passed + " days from now"

# adds bootstrap popovers to vote buttons
$ ->
