Add percentages to sort page
Move js to separate file