jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyIframeSrc:undefined,historyInit:function(E,D){jQuery.historyCallback=E;if(D){jQuery.historyIframeSrc=D}var C=location.hash.replace(/\?.*$/,"");jQuery.historyCurrentHash=C;if(jQuery.browser.msie){if(jQuery.historyCurrentHash==""){jQuery.historyCurrentHash="#"}jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;"'+(jQuery.historyIframeSrc?' src="'+jQuery.historyIframeSrc+'"':"")+"></iframe>");var A=jQuery("#jQuery_history")[0];var B=A.contentWindow.document;B.open();B.close();B.location.hash=C}else{if(jQuery.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.lastHistoryLength=history.length;jQuery.isFirst=true}}if(C){jQuery.historyCallback(C.replace(/^#/,""))}setInterval(jQuery.historyCheck,100)},historyAddHistory:function(A){jQuery.historyBackStack.push(A);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if(jQuery.browser.msie){var A=jQuery("#jQuery_history")[0];var D=A.contentDocument||A.contentWindow.document;var F=D.location.hash.replace(/\?.*$/,"");if(F!=jQuery.historyCurrentHash){location.hash=F;jQuery.historyCurrentHash=F;jQuery.historyCallback(F.replace(/^#/,""))}}else{if(jQuery.browser.safari){if(jQuery.lastHistoryLength==history.length&&jQuery.historyBackStack.length>jQuery.lastHistoryLength){jQuery.historyBackStack.shift()}if(!jQuery.dontCheck){var B=history.length-jQuery.historyBackStack.length;jQuery.lastHistoryLength=history.length;if(B){jQuery.isFirst=false;if(B<0){for(var C=0;C<Math.abs(B);C++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(var C=0;C<B;C++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var E=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(E!=undefined){jQuery.historyCurrentHash=location.hash.replace(/\?.*$/,"");jQuery.historyCallback(E)}}else{if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(location.hash){var F=location.hash;jQuery.historyCallback(location.hash.replace(/^#/,""))}else{var F="";jQuery.historyCallback("")}jQuery.isFirst=true}}}}else{var F=location.hash.replace(/\?.*$/,"");if(F!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=F;jQuery.historyCallback(F.replace(/^#/,""))}}}},historyLoad:function(D){var E;D=decodeURIComponent(D.replace(/\?.*$/,""));if(jQuery.browser.safari){E=D}else{E="#"+D;location.hash=E}jQuery.historyCurrentHash=E;if(jQuery.browser.msie){var A=jQuery("#jQuery_history")[0];var C=A.contentWindow.document;C.open();C.close();C.location.hash=E;jQuery.lastHistoryLength=history.length;jQuery.historyCallback(D)}else{if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(D);var B=function(){jQuery.dontCheck=false};window.setTimeout(B,200);jQuery.historyCallback(D);location.hash=E}else{jQuery.historyCallback(D)}}}});