title: change selected value in dropdown based on url using jquery
body: <p>Here is what i am trying to do:</p>
  
  <pre><code>&lt;select id="dynamic_select"&gt;
  &lt;option value="http://blog.mysite.com/"&gt;United Kingdom&lt;/option&gt;
  &lt;option value="http://fr.blog.mysite.com/"&gt;France&lt;/option&gt;
  &lt;option value="http://de.blog.mysite.com/"&gt;Deutschland&lt;/option&gt;
  &lt;option value="http://it.blog.mysite.com/"&gt;Italia&lt;/option&gt;
  &lt;option value="http://jp.blog.mysite.com/"&gt;日本&lt;/option&gt;
  &lt;option value="http://es.blog.mysite.com/"&gt;España&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>First Script</p>
  
  <pre><code>jQuery(function(){
    // bind change event to select
    jQuery('#dynamic_select').bind('change', function () {
        var url = jQuery(this).val(); // get selected value
        if (url) { // require a URL
            window.location = url; // redirect
        }
        return false;
    });
  });
  </code></pre>
  
  <p>Another Script</p>
  
  <pre><code>jQuery(document).ready(function() {
   if(window.location.href.indexOf("fr") != -1) {
  jQuery("#dynamic_select option[value='2']").attr('selected', 'selected');
  }
  });
  </code></pre>
  
  <p>This is a language selector which will be displayed on iphone (using WPtouchPro), the first part i.e. change of url based on selection is working perfect.. but i want to change the option selected in the drop down list with the value equal to the url of the page..
  Also how to write those Japanese letter so that they display properly on all browsers..
  Thanks :)</p>