Change country name to abbreviation
<p>I'm retrieving some XML-data containing countries among many other things and I would like to link the country name to its abbreviation in order to match them with famfamfam flags.</p>

<p>See the example below:</p>

<pre><code>    $('Result',xml).each(function(i) {
        var $this = $(this),
        user = $this.attr("Username"),
        country = $this.attr("Country"),
</code></pre>

<p>So the variable country will fetch the country name, so how can I dynamically change the 247 potential countries to it's abbreviation.</p>

<p>Below is a part of the list of the abbreviations and the full country names:</p>

<pre><code>&gt;FI  FINLAND
&gt;FJ  FIJI
&gt;FK  FALKLAND ISLANDS (MALVINAS)
&gt;FM  MICRONESIA, FEDERATED STATES OF
&gt;FO  FAROE ISLANDS
&gt;FR  FRANCE
&gt;FX  FRANCE, METROPOLITAN
&gt;GA  GABON
&gt;GB  UNITED KINGDOM
&gt;GE  GEORGIA
</code></pre>
