You do not have a doctype on your page, so IE9 renders it in quirks mode, which does not support the hashchange event. Adding a proper doctype will allow IE9 to render your page in the proper mode, enabling the hashchange event.
Also see this similar question: onhashchange with IE 9