<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(function () {
var jid = $('.fjp_id').attr('id').replace('price-', '');
$('.fjp_id').children('[id]').attr('id', function (i,val) {
return val.replace('jp_id', jid);
})
})
</script>
<i class="fjp_id" id="price-42">
<span id="price-jp_id" class="price_qe" title="Click to edit ..." style="text-decoration:line-through">1200.0000</span>
<br>
<span id="specials-jp_id" class="special_qe" title="Click to edit ...">1.0000</span>
</i>
<hr />
<i id="price-56">
<span id="price-56" class="price_qe" title="Click to edit ..." style="text-decoration:line-through">1200.0000</span>
<br>
<span id="specials-56" class="special_qe" title="Click to edit ...">1.0000</span>
</i>