/**************************************************
*Cash Script by TheLegend1987                     *
*Date:2/13/07                                     *
**************************************************/

cM={  
  MID:[],
  perPost:"",
  monName:"",
  injectCash:function(){
    m=this.MID;
    mN=this.monName;
    p=this.perPost;
    sM=this.sMoney;
    $(".c_user").each(function(){
    postCash = parseInt(p)*parseInt($(this).children(".user_info").children(":contains('Post')").next().text())
    if(!location.href.match('/profile'))
    {
       if($(this).parent().prev().children().children("a.member").text()=="")
       {                                                                                
          uName=$(this).parent().prev().children().children().children("strong").text();
       }
       else
       {
          uName=$(this).parent().prev().children().children("a.member").text();
       }
    }
    else
    {
       uName = $(this).parent().parent().parent().prev().prev().children().children(":first").children(":last").text();
    }
    if(sM){
       if(m[uName]){
          currPoints = sM+postCash+m[uName];
       }else{
          currPoints = sM+postCash;
       }
       $(this).children(".user_info").children(".spacer").before("<dt>" +mN+ "</dt><dd>"+currPoints+"</dd>");
    }else{
       if(m[uName]){
          currPoints = postCash+m[uName];
       }else{
          currPoints = postCash;
       }
       $(this).children(".user_info").children(".spacer").before("<dt>" +mN+ "</dt><dd>"+currPoints+"</dd>");
    }
    });
  }
}
