It works perfectly with Firefox and IE, it was on 3, i voted 5 and it was on 4, after 4/5 times i voted 5, it was 5, than i voted 2 times 1 and it's 3 again, where is the problem?
More people vote on it and more difficulty will change the value, the algorytm apply the weight dependant-medium calculation, this means that the first time you vote, it will change easily, but if 10 people vote 5, and you vote 1, of course it won't go to 1
Vote 1: 5 -> 5
Vote 2: 1 = 5+1/2 = 6/2 = 3
Vote 3: 5 = 5+1+3/3 = 9/3 = 3
Vote 4: 5 = 5+1+3+5/4 = 14/4 = 3.4 -> 4
Vote 5: 5 = 5+1+3+5+4/5 = 19/5 = 3.8 -> 4
Vote 6: 1 = 5+1+3+5+4+1/6 = 20/6 = 3.3 -> 3
Vote 7: 1 = 5+1+3+5+4+1+1/7 = 21/7 = 3 -> 3
end so on
Test few times scripts before ask

It's easy