Better way to optimise IF statements
<p>Is there a better way for me to optimise the following IF statements in jQuery?</p>

<p>I've had to edit the following code a couple of times and it would be nice if I could just plug in the necessary values in a nice array or something...</p>

<pre><code> $("#pmselect").change(function () {
        if ($("#pmselect option:selected").attr("class") == "null") {
            $('.avatar').hide();
            $('.pmpass').hide();
            $('.pmlogin').hide();
            $('#nullavatar').show();
        }
        if ($("#pmselect option:selected").attr("id") == "pm") {
            $('.avatar').hide();
            $('.pmpass').show();
            $('.pmlogin').show();
            $('#pmavatar').show();
        }
        if ($("#pmselect option:selected").attr("id") == "as") {
            $('.avatar').hide();
            $('.pmpass').show();
            $('.pmlogin').show();
            $('#asavatar').show();
        }
        if ($("#pmselect option:selected").attr("id") == "pn") {
            $('.avatar').hide();
            $('.pmpass').show();
            $('.pmlogin').show();
            $('#pnavatar').show();
        }
        if ($("#pmselect option:selected").attr("id") == "jm") {
            $('.avatar').hide();
            $('.pmpass').show();
            $('.pmlogin').show();
            $('#jmavatar').show();
        }
        if ($("#pmselect option:selected").attr("id") == "mh") {
            $('.avatar').hide();
            $('.pmpass').show();
            $('.pmlogin').show();
            $('#mhavatar').show();
        }
        if ($("#pmselect option:selected").attr("id") == "rh") {
            $('.avatar').hide();
            $('.pmpass').show();
            $('.pmlogin').show();
            $('#rhavatar').show();
        }
        if ($("#rmselect option:selected").attr("id") == "rm") {
            $('.avatar').hide();
            $('.pmpass').show();
            $('.pmlogin').show();
            $('#rmavatar').show();
        }
    });
</code></pre>
