-jQuery.each( ("blur,focus,load,ready,resize,scroll,unload,click,dblclick," +
+var readyBound = false;
+
+function bindReady(){
+ if ( readyBound ) return;
+ readyBound = true;
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener )
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
+
+ // If Safari or IE is used
+ // Continually check to see if the document is ready
+ if (jQuery.browser.msie || jQuery.browser.safari ) (function(){
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ if ( jQuery.browser.msie || document.readyState != "loaded" && document.readyState != "complete" )
+ document.documentElement.doScroll("left");
+ } catch( error ) {
+ return setTimeout( arguments.callee, 0 );
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+ })();
+
+ // A fallback to window.onload, that will always work
+ jQuery.event.add( window, "load", jQuery.ready );
+}
+
+jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +