/*
 * jQuery method to check/uncheck/inverse checkboxes.
 *
 * Revision: $Id$
 */
$(document).ready( function() {
			   
    // Select all
    $("A[href='#select_all']").live( "click", function() {
        $("#" + $(this).attr('rel') + " INPUT[type='checkbox']").not("[class=ignore]").attr('checked', true);
        return false;
    });
   
    // Select none
    $("A[href='#select_none']").live( "click", function() {
        $("#" + $(this).attr('rel') + " INPUT[type='checkbox']").not("[class=ignore]").attr('checked', false);
        return false;
    });
   
    // Invert selection
    $("A[href='#invert_selection']").live( "click", function() {
        $("#" + $(this).attr('rel') + " INPUT[type='checkbox']").not("[class=ignore]").each( function() {
            $(this).attr('checked', !$(this).attr('checked'));
        });
        return false;
    }); 
   
});
