//FW : checkboxes can be toggled as well with Plones select_all.js, 
//however to insert the extra buttons we need to use jQuery. So we use jQ to do both.

jq(document).ready(function(){

    jq("<input type='button' id='CheckAll' name='CheckAll' value='Check All' /><input type='button' id='UnCheckAll' name='UnCheckAll' value='Uncheck All' /><br /><br />").insertBefore("#form-buttons-finish");
    jq("#CheckAll").click(function(){
        jq("#subscription-subscribeform").find("input[@type$='checkbox']").each(function(){
                this.checked = true;
            });
    });
    jq("#UnCheckAll").click(function(){
        jq("#subscription-subscribeform").find("input[@type$='checkbox']").each(function(){
                this.checked = false;
            });
    });
});

