ufaclub,
а почему не на сервере?
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.price{
display: block;
}
span {
cursor: pointer;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function(){
$('span.price').filter(function(index){
return this.firstChild.data == '0 ';
}).html('По<span class="currency"> согласованию</span>')
});
</script>
</head>
<body>
<span class="price">101 200 <span class="currency">руб</span></span>
<span class="price">0 <span class="currency">руб</span></span>
<span class="price">500 100 <span class="currency">руб</span></span>
<span class="price">10 899 <span class="currency">руб</span></span>
<span class="price">23 200 <span class="currency">руб</span></span>
<span class="price">13 213 <span class="currency">руб</span></span>
</body>
</html>