$().ready(function(){
    // public
    $("#releases dd").hide();
    $('.button-toggle').click(function(){
        if($(this).text() == 'Afficher') $(this).text('Masquer');
        else if($(this).text() == 'Masquer') $(this).text('Afficher');
        $(this).parent('dt').next("dd").slideToggle("slow");
        return false;
    });

   $(".button-load a").click(function(){
        //admin
        if($(this).parent().get(0).nodeName == 'TD') {
            $(this).parent('td').parent('tr').parent('tbody').children('tr').removeClass('selected');
            $(this).parent('td').parent('tr').addClass('selected');
        }
        // public
        else {
            $('.track-list li').removeClass('selected');
            $(this).parent('span').parent('li').addClass('selected');
        }
        filename = $(this).attr('href');
        $("#player-cont").load('/index.php?module=public&action=player:swf_object', {'filename':filename});
        return false;   
    });
});