title: DOM manipulation: Replacing href value with src value of child image
body: <p>I have the following html markup:</p>
  
  <pre><code>&lt;div class='photoset'&gt;  
  &lt;a href="foo-01.html"&gt;&lt;img src="foo-01.jpg" /&gt;&lt;/a&gt;  
  &lt;a href="foo-02.html"&gt;&lt;img src="foo-02.jpg" /&gt;&lt;/a&gt;  
  &lt;a href="foo-03.html"&gt;&lt;img src="foo-03.jpg" /&gt;&lt;/a&gt;  
  &lt;a href="foo-04.html"&gt;&lt;img src="foo-04.jpg" /&gt;&lt;/a&gt;  
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to manuipulate the DOM so that the src value of each image replaces the href value of the parent link element, so that the markup becomes:</p>
  
  <pre><code>&lt;div class='photoset'&gt;  
  &lt;a href="foo-01.jpg"&gt;&lt;img src="foo-01.jpg" /&gt;&lt;/a&gt;  
  &lt;a href="foo-02.jpg"&gt;&lt;img src="foo-02.jpg" /&gt;&lt;/a&gt;  
  &lt;a href="foo-03.jpg"&gt;&lt;img src="foo-03.jpg" /&gt;&lt;/a&gt;  
  &lt;a href="foo-04.jpg"&gt;&lt;img src="foo-04.jpg" /&gt;&lt;/a&gt;  
  etc...
  &lt;/div&gt;
  </code></pre>
  
  <p>Why ever would I want to do this, you ask? I'm pulling images into a page using the Flickr API, but then wish to use the jQuery ColorBox plugin for a gallery effect...and for that I believe I need to render the Flickr-generated markup as above.</p>
  
  <p>Thanks in advance</p>
  
  <p>Andrew</p>