title: jQuery set image size after Popup
body: <p>I have an Image which opens in a Popup.</p>
  
  <pre><code>&lt;a href="/images/image1.jpg" class="modal_link cboxElement" data-modal-title="Image1"&gt;&lt;img src="/images/image1_small.jpg" alt=""&gt;&lt;/a&gt;
  </code></pre>
  
  <p>The Popup looks like this then:</p>
  
  <pre><code>&lt;div id="cboxLoadedContent" style="width: 1223px; overflow: auto; height: 843px;"&gt;&lt;img class="cboxPhoto" src="/images/image1.jpg" height="843" width="1223" style="width: 1223px; height: 843px; float: none;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Its an extension in Joomla which opens the Image in this kind of code.</p>
  
  <p>I want to change the size of the loaded Image</p>
  
  <pre><code>jQuery('a.modal_link.cboxElement').click(function() {
      jQuery('img.cboxPhoto').css({'width':'auto','height':'auto'});
  });
  </code></pre>
  
  <p>This is in a function which I call when the window is loaded.
  Doesnt seem to work (I think because it fires the css styles instantly when the Link is clicked and doesnt wait for the Popup to load?)</p>
  
  <p>How can I change that?</p>
  
  <p>thanks</p>