		$(document).ready(function(){
		    
			$(".ratelink").click(function () {
        var r = $(this).attr("rel");
        
        var spitted = r.split(";");
        

       $.ajax({
             type: "POST",
             url: "../scripts/addrating.php",
             data: "artId="+spitted[1]+"&rating="+spitted[0],
             cache: false,
             success: function(msg){
                $(".ratelink").remove();
                $(".rate").width(parseFloat(msg));
             },
          error: function(xhr, ajaxOptions, thrownError){
           alert(xhr.status);
           alert(thrownError);

          }
      });
      
      
      return false;
    }).change();  
		    
		    
		});

