Image src replace not working
<p>I have an accordion menu that the active link drops down the menu, loads an external page into a <code>div</code>, then changes the banner on the same click. I have everything working except for the banner image changing out. I thought I had the code right, but something seems to be missing, and I can't figure it out.</p>

<p>Here is my html:</p>

<pre><code>&lt;section id="commercialBanner"&gt;
    &lt;img src="images/catalog/indoorBanner.jpg"/&gt;
&lt;/section&gt;  

&lt;section id="accordionNav"&gt;
    &lt;ul id="nav"&gt;
        &lt;li id="indoorEntrance" class="category"&gt;&lt;a class="ext" id="indoor" href="montage.html"&gt;Indoor Entrance&lt;/a&gt;
            &lt;ul id="indoorEntranceSubmenu" class="sideSub"&gt;
                &lt;li&gt;&lt;a href="montage.html" class="ext"&gt;Ecomat Squares&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="gatekeeper.html" class="ext"&gt;Gatekeeper&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="absorba.html" class="ext"&gt;Absorba&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li id="outdoorEntrance" class="category"&gt;&lt;a id="outdoor" class="ext" href="aquaFlow.html"&gt;Outdoor Mats&lt;/a&gt;
            &lt;ul id="outdoorEntranceSubmenu" class="sideSub"&gt;
                &lt;li&gt;&lt;a href="aquaFlow.html" class="ext" id="aquaflow"&gt;AquaFlow&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    &lt;section id="catalog"&gt;&lt;/section&gt;
</code></pre>

<p>Here is my Script:</p>

<pre><code>$('a.ext').click(function (event){
        event.preventDefault(); 
        $('#catalog').load(this.href);
});

$('.category &gt; a').click(function(evt) {                 
    if ($(this).attr('class') != 'active'){
        $('#nav li ul').hide();
        $(this).next().show()
        // $(this).next('li &gt; a').trigger('click')
        $('#nav li a').removeClass('active');
        $(this).addClass('active');
    };
    if ($('#indoor').attr('class') == 'active'){
        $("#commercialBanner img").attr("src", "images/catalog/indoorBanner.jpg");
    };  
    if ($('#outdoor').attr('class') == 'active'){
        $("#commercialBanner img").attr("src", "images/catalog/outdoorBanner.jpg");
    };  
});
</code></pre>
