js for replaceprices and test