$(window).load(function(){
    $('#similar .s_vote', $('#similar')[0]).live('click', function() {
        var sid = $(this).attr('sid');
        var dir;
        if ($(this).hasClass('s_up')) {
            dir = 'up'
        } else {
            dir = 'down'
        }
        data = {what: 'vote_sim', id: sid, dir: dir}
        var tds = $(this).parent().parent().children('td');
        parent.player.loadJSON(data,function(d){
            tds.children('.s_down, .s_up').fadeOut();
            tds.children('div').html(d.response.val)
        });
        return false;
    });
    
    $('#taglist .s_vote', $('#taglist')[0]).live('click', function() {
        var tid = $(this).attr('tid');
        var dir;
        if ($(this).hasClass('s_up')) {
            dir = 'up'
        } else {
            dir = 'down'
        }
        data = {what: 'vote_tag', id: tid, dir: dir}
        var tds = $(this).parent().parent().children('td');
        parent.player.loadJSON(data,function(d){
            tds.children('.s_down, .s_up').fadeOut();
            tds.children('div').html(d.response.val)
        });
        return false;
    });
    
});