- // If the timer was running, stop it
- if ( $.$$timer ) {
- clearInterval( $.$$timer );
- $.$$timer = null;
- }
-
- // If the last script to fire was in the body,
- // we assume that it's trying to do a document.write
- var s = document.getElementsByTagName("script");
- s = s[s.length-1].parentNode.nodeName == "HEAD";
-
- // Only execute if we're doing a sane way, or the window
- // is loaded, or the final script is in the head
- // and there's something to execute
- if ( ( !$.badReady || isFinal || s ) && $.$$ready ) {