
$(function(){
    $('.artfav').live('click', function(){
        var $this = $(this);
        var aid = $this.attr('aid');
        var mode;
        if ($this.hasClass('notfan')) {
            mode = 'add'
        } else {
            mode = 'del'
        }
        parent.player.loadJSON({what:'artfav', aid: aid, mode: mode}, function(data){
            $this.replaceWith(data.response)
        })
        return false;
    });
})