(function ($, window, undefined){ '$:nomunge'; var str_hashchange = 'hashchange', doc = document, fake_onhashchange, special = $.event.special, doc_mode = doc.documentMode, supports_onhashchange = 'on' + str_hashchange in window && (doc_mode === undefined || doc_mode > 7); function get_fragment(url){ url = url || _AN_Read_href('href', _AN_Read_location('location', window)); return '#' + _AN_Call_replace('replace', url, /^[^#]*#?(.*)$/, '$1'); } ; $.fn[str_hashchange] = function (fn){ return fn? this.bind(str_hashchange, fn): this.trigger(str_hashchange); } ; $.fn[str_hashchange].delay = 50; special[str_hashchange] = $.extend(special[str_hashchange], { setup: function (){ if (supports_onhashchange) { return false ; } $(fake_onhashchange.start); } , teardown: function (){ if (supports_onhashchange) { return false ; } $(fake_onhashchange.stop); } } ); fake_onhashchange = (function (){ var self = { } , timeout_id, last_hash = get_fragment(), fn_retval = function (val){ return val; } , history_set = fn_retval, history_get = fn_retval; self.start = function (){ timeout_id || poll(); } ; self.stop = function (){ timeout_id && clearTimeout(timeout_id); timeout_id = undefined; } ; function poll(){ var hash = get_fragment(), history_hash = history_get(last_hash); if (hash !== last_hash) { history_set(last_hash = hash, history_hash); $(window).trigger(str_hashchange); } else if (history_hash !== last_hash) { _AN_Write_href('href', _AN_Read_location('location', window), false , _AN_Call_replace('replace', _AN_Read_href('href', _AN_Read_location('location', window)), /#.*/, '') + history_hash); } timeout_id = _AN_Call_settimeout('setTimeout', window, poll, $.fn[str_hashchange].delay); } ; $.browser.msie && !supports_onhashchange && (function (){ var iframe, iframe_src; self.start = function (){ if (!iframe) { iframe_src = _AN_Read_src('src', $.fn[str_hashchange]); iframe_src = iframe_src && iframe_src + get_fragment(); iframe = $('