title: jQuery UI tabs show/hide images based on active tab
body: <p>I'm using the jQuery UI tabs widget and I am trying to show/hide images based on the active widget. </p>
  
  <p>I have a two column layout; left column has the tabs widget with three tabs, right column has the image(s); the image in the right column should swap depending on the active tab. Looking at the api and other posts why wouldn't my code work? How would I do it?</p>
  
  <pre><code>jQuery(function($) {
      //turn content into tabs
      $( "#tabs" ).tabs();
  
      var active2 = $( "#tabs-2" ).tabs( "option", "active" );
  
      if (active2) {
          $(".gala-img1").show();
          $(".gala-img2").hide();
          $(".gala-img3").hide();
      }
  });
  </code></pre>