// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function vote(tag, direction, auth) {
  new Ajax.Updater('message_' + tag + '_voting', '/~' + tag + '/vote', {
    method: 'post',
    parameters: {'direction': direction, 'authenticity_token': auth}
  })
}