title: Magento Cant select options on ajax quickview for configurable product
body: <p>I'm having a problem to select a option for a configurable product on magento showing on a quick view window:</p>
  
  <p>the errors:
  1 - this one occurs when I use the select to change the option:</p>
  
  <p><strong>Uncaught ReferenceError: optionsPrice is not defined configurable.js:286</strong></p>
  
  <pre><code>optionsPrice.changePrice('config', {'price': price, 'oldPrice': oldPrice});
  </code></pre>
  
  <p>2 - this one occurs when I click on the color swatch option: </p>
  
  <p><strong>ReferenceError {stack: (...), message: "spConfig is not defined"}  colorswatch.js:221</strong></p>
  
  <pre><code>try{
      spConfig.configureElement(document.getElementById(selectId));               
      spConfig.reloadPrice();
  }catch(e){
      console.debug(e);
  }
  </code></pre>
  
  <p>I tried defining spConfig and Option Price all way around, but it seems out of scope, I don't know, because I can console.log both variables, but even successfully logging them I get these errors.</p>
  
  <p>I loaded configurable.js and product.js on category view successfully.</p>
  
  <p>some more code:</p>
  
  <p>configurable.phtml</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  if(typeof optionsPrice === 'undefined' ){
      var optionsPrice = new Product.OptionsPrice(&lt;?php echo $this-&gt;getJsonConfig() ?&gt;);
  }
  console.log(optionsPrice); // logs the variable just fine
      var spConfig = new Product.Config(&lt;?php echo $this-&gt;getJsonConfig() ?&gt;);
      console.log(&lt;?php echo $this-&gt;getJsonConfig() ?&gt;); // logs fine
      console.log(spConfig); // here too
      $j(document).ready(function(){
          IWD.ColorSwatch.configAttributes = '&lt;?php echo $_switchHelper-&gt;getJsonConfig($_product)?&gt;';
          IWD.ColorSwatch.config = '&lt;?php echo $_switchHelper-&gt;getJsonModuleConfig()?&gt;';
          IWD.ColorSwatch.init();
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>This is the link for the site: <a href="http://bazis.com.br/store/roupas/vestidos.html" rel="nofollow">HERE</a></p>
  
  <p>If you need more code, just ask that I'll add it here!</p>
  
  <p>Thanks!!!!</p>
  
  <p><strong>EDIT</strong>
  I'm using a custom quick view module <a href="https://github.com/czettnersandor/magento-quick-view-ajax" rel="nofollow">https://github.com/czettnersandor/magento-quick-view-ajax</a></p>