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

function spinUp(id) {
    div_id = "rightBox_" + id.toString();
    $(div_id).update("<img src=\"/images/loading.gif\" alt=\"Loading\" title=\"Loading\" />");
}

function disappear(id, votes) {
    div_id = "rightBox_" + id.toString();
    new Effect.Fade(div_id);
    $("votes_" + id.toString()).update("(" + votes.toString() + ")");
}

function selectLoveOrHate(lORh) {
    // Remove other classes...
    $('love').removeClassName('either');
    $('hate').removeClassName('either');
    $('love').removeClassName('love');
    $('hate').removeClassName('hate');

    $(lORh).addClassName('either');
    $(lORh).addClassName(lORh);

    $('item_is_love').value = (lORh == 'love' ? 1 : 0);
}