/*
 * Copyright (c) 2009 Andreas Blixt <andreas@blixt.org>
 * Contributors: Aaron Ogle <aogle@avencia.com>
 * This and more JavaScript libraries: http://blixt.org/js
 * MIT License: http://www.opensource.org/licenses/mit-license.php
 * 
 * Hash handler
 * Keeps track of the history of changes to the hash part in the address bar.
 */
var Hash=(function(){var g=this,e=document.documentMode,f=g.history,j=g.location,k,c,b,d=function(){var l=j.href.indexOf("#");return(l==-1?"":j.href.substr(l+1))},h=function(){var l=d();if(l!=c){oldHash=c;c=l;k(l,oldHash)}},a=function(l){try{var n=b.contentWindow.document;n.open();n.write("<html><body>"+l+"</body></html>");n.close();c=l}catch(m){setTimeout(function(){a(l)},10)}},i=function(){try{b.contentWindow.document}catch(m){setTimeout(i,10);return}a(c);var l=c,n=null;setInterval(function(){var o,p;try{o=b.contentWindow.document.body.innerText;if(o!=l){n=l;l=o;j.hash=c=o;k(o,n)}else{p=d();if(p!=c){a(p)}}}catch(q){}},50)};return{init:function(l,m){if(k){return}k=l;c=d();l(c);if(g.ActiveXObject){if(!e||e<8){b=m;i()}else{g.attachEvent("onhashchange",h)}}else{if(f.navigationMode){f.navigationMode="compatible"}setInterval(h,50)}},go:function(l){if(l==c){return}if(b){a(l)}else{var m=d();j.hash=c=l;k(l,m)}},getHash:d}})();
/*
 * Copyright (c) 2009 Andreas Blixt <andreas@blixt.org>
 * This and more JavaScript libraries: http://blixt.org/js
 * MIT License: http://www.opensource.org/licenses/mit-license.php
 * 
 * jQuery hash plugin (Depends on jQuery, Hash)
 * Plugin for detecting changes to the hash and for adding history support for
 * hashes to certain browsers.
 */
(function(i,e){var d="jquery-history",f="/js/blank.html",a="hashchange",j="hash.fn",h,c=this,b=document.documentMode,g=function(k,l){i.event.trigger(a,[k,l])};i.hash={init:function(l){if(h){return}h=1;var k;if(c.ActiveXObject&&(!b||b<8)){i("body").prepend('<iframe id="'+d+'" style="display:none;" src="'+(l||f)+'"></iframe>');k=i("#"+d)[0]}e.init(g,k)},go:e.go};i.fn.hash=function(l,m){var k=this.data(j);if(k){this.unbind("click",k)}if(typeof l=="string"){k=function(){e.go(l);return false};this.data(j,k);this.click(k);if(m||m===undefined){this.attr("href","#"+l)}}return this};i.fn[a]=function(k){return this.bind(a,k)}})(jQuery,Hash);