title: javascript: add span around last two characters
body: <p>I need to put a span around the last two characters within a div.</p>
  
  <p>The current structure looks like this:</p>
  
  <pre><code>&lt;div id="price"&gt;3199&lt;/div&gt;
  </code></pre>
  
  <p>I need to output something like this:</p>
  
  <pre><code>&lt;div id="price"&gt;31&lt;span id="smaller"&gt;99&lt;/span&gt;&lt;/div&gt;
  </code></pre>
  
  <p>It's for a price in a dynamic HTML5 banner ad. I need the ability to format the final two characters smaller than the first two, but the integer from the dynamic feed is simply 3199 or 2099 etc. etc.</p>
  
  <p>I've found some jQuery solutions but I need this to be plain JavaScript.</p>
  
  <p><strong><a href="http://jsfiddle.net/arunpjohny/kF7LK/" rel="nofollow">This fiddle</a></strong>  solves it well with jQuery, and I'm sure it doesn't need much tweaking to work without jQuery but my javascript skills can't quite crack it.</p>