
var newsRateInp = false;

function newsRate(id, side)
{
    if (!newsRateInp)
    {  
        newsRateInp = true;
        $("#newsRate" + id + ' div.val').html('<div id="loaderMini"></div>');
        $.ajax({
            type: "POST",
            url: 'http://' + location.host + '/ajax/news/rate/',
            data: ({'id': id, 'side': side}),
            success: function(msg)
            {
                $("#newsRate" + id).html(msg);
                newsRateInp = false;
            }
        });
    }
}


function showRateVoices(id)
{
    $.ajax({
        type: "POST",
        url: 'http://' + location.host + '/ajax/news/rateVoices/',
        data: ({'id': id}),
        success: function(msg){
            $('#rateVoices' + id + ' #box').html(msg);
            showBox('rateVoices' + id);
        }
    });
}
