Yea, my answer was really not a helping answer(sorry) just showing exactly why this will not work with w.unbind(). Why do you need two separate functions to bind the same event?? You cannot combine the two??