- else
- // Continually check to see if the document is ready
- (function timer() {
- try {
- // If IE is used, use the excellent hack by Hedger Wang and Andrea Giammarchi
- // http://www.3site.eu/jstests/onContent/DOMReadyAnddoScroll.php
- if ( jQuery.browser.msie || document.readyState != "loaded" && document.readyState != "complete" )
- document.firstChild.doScroll("left");
-
- // and execute any waiting functions
- jQuery.ready();
- } catch( error ) {
- setTimeout( timer, 0 );
- }
- })();
+ // 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();
+ })();