title: jQuery: Find & replace string in html; avoid src and href values
body: <p>Say I have this:</p>
  
  <pre><code>&lt;div&gt;
      People say &lt;a href="apples.html"&gt;apples&lt;/a&gt; are nice. 
      It's true, apples are nice. You go, &lt;b&gt;apples&lt;/b&gt;!
      &lt;img src="apples.jpg" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How would I go about replacing every occurrence of "apples" (with "oranges", for example) within that div (including any tag's element content and plain text) <strong>WHILE</strong> avoiding replacing such occurrences in the href and src attributes, or any attribute for that matter.</p>
  
  <p>So the end result would be:</p>
  
  <pre><code>&lt;div&gt;
      People say &lt;a href="apples.html"&gt;oranges&lt;/a&gt; are nice.
      It's true, oranges are nice. You go, &lt;b&gt;oranges&lt;/b&gt;!
      &lt;img src="apples.jpg" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Should note, while text() would do me a good job in this example, I will be replacing with html elements so it's not particularly helpful in the actual case.</p>
  
  <p>Thanks!</p>