title: Add Link around every picture
body: <p>i've got the following problem. I've been moving a large amount of content by hand and while inserting images, i put the lightbox class on the  tag - unfortunately for the images to properly work, they would need an anchor around them specifying the url to the full image size - for example</p>
  
  <pre><code>&lt;a href="images/myimage.jpg" class="lightbox"&gt;&lt;img src="images/myimage.jpg"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>All I've got now is :</p>
  
  <pre><code>&lt;img src="images/myimage.jpg" class="lightbox"&gt;
  </code></pre>
  
  <p>Is it possible to automatically set an anchar around every image found inside a specific <code>&lt;div&gt;</code> element and also properly close it? I would need something like</p>
  
  <p>foreach image in <code>&lt;div&gt;</code> prepend <code>&lt;a href="this.image.src"&gt;</code> and append <code>&lt;/a&gt;</code></p>
  
  <p>Any solution in PHP or jQuery would greatly be appreciated!</p>