Jquery add space btw capitalized nonstop words
<pre><code>&lt;script type="text/javascript"&gt;
var CountryVal;
var StateVal;
$(document).ready(function(){
    $('#ItemCountry').change(function(){
        CountryVal = this.value; // value of the select element
        $("#StateFeeder").html('&lt;img src="/images/mapCountry/AU/ajax-loader.gif" class="IMG-Loading" /&gt;');
        $('#StateFeeder').load('/StateFeeder/StateFeeder-Buy.html #StateFeeder-'+CountryVal, function(){
            $('#ItemState').change(function(){
                StateVal = this.value; // value of the select element
                $("#CityFeeder").html('&lt;img src="/images/mapCountry/AU/ajax-loader.gif" class="IMG-Loading" /&gt;');
                $('#CityFeeder').load('/Country/'+CountryVal+'/_'+CountryVal+'_suburbs.html #Suburbs-'+StateVal, function(){
                    $('#CityFeeder select').attr('size', '5');
                    $('#CityFeeder select').change(function(){  
                        this.form['CAT_Custom_221342'].value=$(this).val();
                    }); 
                });        
            })
        });
    });
});           
&lt;/script&gt;
</code></pre>

<p>The Jquery above will load dropdown menu from other page into current page and pass value into another input field when user makes selection. The problem is, the option value taken from the #StateFeeder in remote page contains the below format:</p>

<pre><code>&lt;option value="Kabardino-BalkarRepublic"&gt;Kabardino-Balkar Republic&lt;/option&gt;
&lt;option value="Karachay-CherkessRepublic"&gt;Karachay-Cherkess Republic&lt;/option&gt;
&lt;option value="KareliaRepublic"&gt;Karelia Republic&lt;/option&gt;
&lt;option value="KomiRepublic"&gt;Komi Republic&lt;/option&gt;
&lt;option value="MariElRepublic"&gt;Mari El Republic&lt;/option&gt;
&lt;option value="MordoviaRepublic"&gt;Mordovia Republic&lt;/option&gt;
</code></pre>

<p><strong>the values above are nonstop capitalized words and I want them to be formated with spaces in between capital words like below (plz keep the "-" btw words)when they are loaded into the current page, when they are loaded, the values without space are used as id for the user to make the onchange action and then format it later. thank you very much:</strong></p>

<pre><code>&lt;option value="Kabardino-Balkar Republic"&gt;Kabardino-Balkar Republic&lt;/option&gt;
&lt;option value="Karachay-Cherkess Republic"&gt;Karachay-Cherkess Republic&lt;/option&gt;
&lt;option value="Karelia Republic"&gt;Karelia Republic&lt;/option&gt;
&lt;option value="Komi Republic"&gt;Komi Republic&lt;/option&gt;
&lt;option value="Mari El Republic"&gt;Mari El Republic&lt;/option&gt;
&lt;option value="Mordovia Republic"&gt;Mordovia Republic&lt;/option&gt;
</code></pre>
