/*
 * jQuery history plugin
 * 
 * sample page: http://www.mikage.to/jquery/jquery_history.html
 *
 * Copyright (c) 2006-2009 Taku Sano (Mikage Sawatari)
 * Copyright (c) 2010 Takayuki Miwa
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Modified by Lincoln Cooper to add Safari support and only call the callback once during initialization
 * for msie when no initial hash supplied.
 */
(function(c){var d={put:function(a,e){(e||window).location.hash=encodeURIComponent(a)},get:function(a){a=(a||window).location.hash.replace(/^#/,"");return c.browser.fx?a:decodeURIComponent(a)}},f={id:"__jQuery_history",init:function(){var a='<iframe id="'+this.id+'" style="display:none" src="javascript:false;" />';c("body").prepend(a);return this},_document:function(){return c("#"+this.id)[0].contentWindow.document},put:function(a){var e=this._document();e.open();e.close();d.put(a,e)},get:function(){return d.get(this._document())}},
b={appState:undefined,callback:undefined,init:function(){},check:function(){},load:function(){}};c.history=b;var g={init:function(a){b.callback=a;a=d.get();(b.appState=a)&&b.callback(a);setInterval(b.check,100)},check:function(){var a=d.get();if(a!=b.appState){b.appState=a;b.callback(a)}},load:function(a){if(a!=b.appState){d.put(a);b.appState=a;b.callback(a)}}},h={init:function(a){b.callback=a;a=d.get();b.appState=a;f.init().put(a);a&&b.callback(a);setInterval(b.check,100)},check:function(){var a=
f.get();if(a!=b.appState){d.put(a);b.appState=a;b.callback(a)}},load:function(a){if(a!=b.appState){d.put(a);f.put(a);b.appState=a;b.callback(a)}}};c.browser.msie&&(c.browser.version<8||document.documentMode<8)?c.extend(b,h):c.extend(b,g)})(jQuery);
