A modified version of this trick to get badges to run after the page loads. A bit hacky, but it works wonders.

We need to specify a place for the code to be injected. This div is what twitpic’s java looks for, and will be where your badge is written.