var tagger = {
   cache: {},
   exprs: [
     {re: /^(faq|meta|retag|site-information|australia|australian-dollar|british-pound|canada|canadian-dollar|euro|ireland|united-kingdom|united-states|us-dollar)$/,
      replace: function(img) { return "http://assets.basicallymoney.com/images/tagicons/"+img+".png"; } }
   ],
   paint: function() {
     $(".post-tag").each(function() {
       var $tag = $(this), totest = $tag.text().replace(/^\s+|\s+$/g,'');
       $tag.find("img").remove();
       if (!tagger.cache.hasOwnProperty(totest))
       {
         tagger.cache[totest] = [];
         $.each(tagger.exprs,function(i, tester) {
           if (totest.match(tester.re)) { tagger.cache[totest].push("<img class=\"tagimg\" src=\"" +
             totest.replace(tester.re, tester.replace) + "\" width=\"16\" height=\"11\" />&nbsp;");
           }
         });
       }
       $.each(tagger.cache[totest],function(i,img) {
         $tag.prepend(img);
       });

     });
   },
   register: function() {
     $(tagger.paint);
   }
 };

 tagger.register();
