title: Dropdown menu (select) not highlighting selected="selected" option
body: <p>I'm building a search form but have something strange going on with the selected="selected" option not being highlighted.</p>
  
  <p>The form's pulling data from a database and duplicates are then being removed using javascript (seen below). The website is built using ExpressionEngine and the form is using Solspace Super Search.</p>
  
  <p>The strange thing is that for option's that only display one result such as 'Andover', the dropdown selects 'Andover' but if more than one result is found (such as Bournemouth) then the dropdown reverts to the first option (All locations) rather than Bournemouth, even though the Bournemouth option features selected="selected".</p>
  
  <p><strong>Here's a sample of the code that's being output, any ideas what's going on here?</strong></p>
  
  <pre><code>&lt;select name="club_feed_town" id="locationList"&gt;
      &lt;option value=""&gt;All Locations&lt;/option&gt;
      &lt;option value="Andover"&gt;Andover&lt;/option&gt;
      &lt;option value="Bishops waltham"&gt;Bishops Waltham&lt;/option&gt;
      &lt;option value="Blandford forum"&gt;Blandford Forum&lt;/option&gt;
      &lt;option value="Boscombe"&gt;Boscombe&lt;/option&gt;
      &lt;option selected="selected" value="Bournemouth"&gt;Bournemouth&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Here's the script that's removing duplicates if that helps:</p>
  
  <pre><code>$(document).ready(function() {
    var optionValues = [];
    var lastRemoved = null;
    $('#locationList option').each(function(){
       if($.inArray(this.value, optionValues) &gt;-1){
          $(this).remove();
          // remember the very last removed one
          lastRemoved = $(this);
       }else{
          optionValues.push(this.value);
       }
    });
    // after removing duplicates, add the very last removed one back to the list
    $('#locationList').append(lastRemoved);
  });
  </code></pre>
  
  <p>As always, any thoughts or suggestions are welcome.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Tom</p>