title: Change the images shown when selecting different configurable products (ex. different color)
body: <p>I'm currently working on getting images for product options showing up on my first magento build. I have <a href="https://stackoverflow.com/q/11318915/653929">this</a> figured out for bundled product, like so:</p>
  <p><img src="https://i.stack.imgur.com/sI57c.jpg" alt="screenshot" /></p>
  <p>I'm obtaining urls of related images (swatches, for example) when the options for the select gets built. Now I'm trying to do the same with configurable products, but it does not seem to be as straightforward.</p>
  <p>Configurable products are built from simple products which represent each iteration of available options. Great. I can obviously upload images for each simple product, and that would be a good start to a solution to this.</p>
  <p>For example:
  Chair has 3 upholstery and 2 armrest choices (6 simple products).
  For chair 2/b I upload upholstery swatch 2 and armrest swatch b, and label them accordingly. When the options get built, I grab image urls associated with each simple product by their label (maybe grabbing all images for that label and removing duplicates or something?)...</p>
  <p>In Magento, I see:</p>
  <p>In theme/catalog/product/view/type/option/configurable.phtml</p>
  <pre><code>&lt;?php foreach($_attributes as $_attribute): ?&gt;
      ..// 
      &lt;select name=&quot;super_attribute[&lt;?php echo $_attribute-&gt;getAttributeId() ?&gt;]&quot; id=&quot;attribute&lt;?php echo $_attribute-&gt;getAttributeId() ?&gt;&quot; class=&quot;required-entry super-attribute-select&quot;&gt;
          &lt;option&gt;&lt;?php echo $this-&gt;__('Choose an Option...') ?&gt;&lt;/option&gt;
      &lt;/select&gt;
      ..//
  &lt;/div&gt;
  &lt;?php endforeach; ?&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
      var spConfig = new Product.Config(&lt;?php echo $this-&gt;getJsonConfig() ?&gt;);
  &lt;/script&gt;
  </code></pre>
  <p>Unlike the bundle, the configurable product select/options are injected onto the page via javascript (in js/varien/configurable.js). This class is then reliant on getJsonConfig() to supply all information after that.</p>
  <p>At this point, it seems I should be able to obtain a simple product's image url information from that object. Tho I see no logic dealing with images at all in configurable.js.  How would I go about obtaining those urls and associating them with the related option selects?</p>