jQuery filter SELECT options based on Radio PRE - selected on load
<p>So I posted the question yesterday (<a href="http://stackoverflow.com/questions/877328/jquery-disable-select-options-based-on-radio-selected-need-support-for-all-brows">Link</a>) and got the answer I needed but for the life of me I can't get this to happen if the value is selected on the body load. it only works if the user clicks the radio then it filters the options.  HELP Please!!!</p>

<p>the Function</p>

<pre><code>jQuery.fn.filterOn = function(radio, values) {
    return this.each(function() {
        var select = this;
        var options = [];
        $(select).find('option').each(function() {
            options.push({value: $(this).val(), text: $(this).text()});
        });
        $(select).data('options', options);
        $(radio).click(function() {
            var options = $(select).empty().data('options');
            var haystack = values[$(this).attr('id')];
            $.each(options, function(i) {
                var option = options[i];
                if($.inArray(option.value, haystack) !== -1) {
                    $(select).append(
                    $('&lt;option&gt;').text(option.text).val(option.value)
                    );
                }
            });
        });            
    });
};
</code></pre>

<p>How to call</p>

<pre><code>$(function() {
    $('#theOptions').filterOn('input:radio[name=abc123]', {
        'abc': ['a','b','c'],
        '123': ['1','2','3']        
    });
});
</code></pre>

<p>Thanks in advance</p>

<p>BTW Here is a <a href="http://jsbin.com/anoci" rel="nofollow">DEMO</a> of it in action</p>
