title: jQuery convert all images to anchor
body: <p>I want to convert all images like this:</p>
  
  <pre><code>&lt;img src='example.com/img1.jpg' /&gt;
  &lt;img src='example.com/img2.jpg' /&gt;
  &lt;img src='example.com/img3.jpg' /&gt;
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>&lt;a href='example.com/img1.jpg' rel='shadowbox[Mixed]'&gt;&lt;img src='example.com/img1.jpg' /&gt;&lt;/a&gt;
  &lt;a href='example.com/img2.jpg' rel='shadowbox[Mixed]'&gt;&lt;img src='example.com/img1.jpg' /&gt;&lt;/a&gt;
  &lt;a href='example.com/img3.jpg' rel='shadowbox[Mixed]'&gt;&lt;img src='example.com/img1.jpg' /&gt;&lt;/a&gt;
  </code></pre>
  
  <p>with jQuery, I tried this:</p>
  
  <pre><code>$("img").replaceWith( "&lt;a rel='shadowbox[Mixed]' href='"+$(this).attr("src")+"'&gt;&lt;img src='" + $(this).attr("src") + "'/&gt;&lt;/a&gt;" );
  </code></pre>
  
  <p>but not worked :(</p>