jQuery(document).ready(function($){
    $('#checkout-button2').click(function(){
        var output = '';
        if( $('input[name="products[data][anon]"]').is(":checked") ){
            output = output + 'I would Like my donation to be Anonymous | ';
        }else{
            if( $('input[name="products[data][honorof]"]').val().length > 1 ){
                output = output + 'This donation is in memory / honor of: ' + $('input[name="products[data][honorof]"]').val() + ' | ';
            }
        }
        switch( $('input[name="products[data][gotowards]"]:checked').val() ){
            case "K-unrestricted":
                output = output + 'I would Like my Gift to go towards The Kenney Unrestricted Plan | ';
                break;
            case "R-lifecare":
                output = output + 'I would Like my Gift to go towards The Residential Life Care Fund | ';
                break;
        }
        output = output + 'Contact me about: | ';
        output = ( $('input[name="products[data][contact][match]"]').is(":checked")  ) ?  output + '<span>My employer participates in a Matching Gifts Program</span>: Yes | ' : output ;
        output = ( $('input[name="products[data][contact][planned-giving]"]').is(":checked")  ) ?  output + '<span>Interested in Planned Giving</span>: Yes | '  : output ;
        output = ( $('input[name="products[data][contact][volunteer]"]').is(":checked")  ) ?  output + '<span>Interested in volunteering at The Kenney</span>: Yes | ' : output ;   
        $( '#order-data-donation-data' ).val( output );
        
    });
});

