Object.extend(Event,{observe:function(d,c,b,a){d=$(d);a=a||false;if((c=="keypress")&&(Prototype.Browser.WebKit||d.attachEvent)){c="keydown"}if((c=="load")&&d.screen){this._observeLoad(d,c,b,a)}else{this._observeAndCache(d,c,b,a)}},_observeLoad:function(f,e,d,b){if(this._ready){this._ready.push(d);return}this._ready=[];var a=this._onloadWindow.bind(this);if($("__ie_onload")){a()}else{if(Prototype.Browser.WebKit){this._observeAndCache(f,e,a,b)}else{if(document.addEventListener){this._useaEL=true;this._observeAndCache(document,"DOMContentLoaded",a,false)}else{if(Prototype.Browser.IE){document.write('<script id="__ie_onload" defer="true" src="//:"><\/script>');var c=$("__ie_onload");this._observeAndCache(c,"readystatechange",function(){if(this.readyState=="complete"){Element.remove("__ie_onload");a()}}.bind(c),false)}else{this._observeAndCache(f,e,a,b)}}}}},_onloadWindow:function(){if(arguments.callee.done){return}arguments.callee.done=true;this._ready.each(function(a){try{a()}catch(b){}});this._ready=null;if(this._useaEL){document.removeEventListener("DOMContentLoaded",Event._onloadWindow,false)}}});