function changePrices()
{
   $('p.price').each
   (
      function(i) 
      {
   		var prefix='g-';
         if($(this).hasClass('type1'))
         {
            prefix='o-';
         }
         var thePriceStr=$(this).text();         
         var thePrice=thePriceStr.split("");         
         var priceLen=thePrice.length;
         var priceOutput='';         
         for(var j=0; j<priceLen; j++)
         {
            //alert(thePrice[j]);
            var insert='';
            if(thePrice[j]=='.')
            {
               insert='dot';
            }
            
            if(thePrice[j]=='$')
            {
               insert='dollar';
            }
            
            if(thePrice[j]=='0' || thePrice[j]=='1' || thePrice[j]=='2' || thePrice[j]=='3' || thePrice[j]=='4' || thePrice[j]=='5' || thePrice[j]=='6' || thePrice[j]=='7' || thePrice[j]=='8' || thePrice[j]=='9')
            {
               insert=thePrice[j];
            }
            
            if(insert!='')
            {
               priceOutput+='<img src="/images/prices/'+prefix+insert+'.gif" alt=""/>';
            }                 
         }
         
         if($(this).hasClass('type1'))
         {
            $(this).html('<ins>'+thePriceStr+'</ins>'+priceOutput);  
         }
         else
         {
            $(this).html('<del>'+thePriceStr+'</del>'+priceOutput);  
         }
                 
      }
   );
}

$(document).ready(function(){
   
   changePrices();
   
});