$(document).ready(function() {

        $('.advSearchChoiceType').change( function() {
            $(this).attr('disabled','true');
            /*
            $.post('/index.php/recipes/getAvailableChoices', { id: $(this).selectedValues() }, function(data) {  
                console.log(data);

            */
            $.getJSON('/index.php/recipes/getAvailableChoices', { id: $(this).selectedValues() }, function(data) {  
                $.each(data, function(k, v_set) {
                    //console.log(k);
                    //console.log(k+":"+v_set);
                    //  * @example  $("#myselect").removeOption(["myselect_1","myselect_2"]); // values contained in passed array 
                    //console.log("$('#'+'" + k + "').removeOption([ + '" + v_set + "' + ]);");

                    $("."+k).removeOption([v_set]);
                    /*
                    var len = $("#"+ k + " option").length;
                    if( len == 0 || len ==  1 ) {
                        $("#"+k).hide('slow');
                    }
                    */
                });
            });
        });

});
                
