I think your issue is timing and in general, the Content Editor Web Part.
The problem is that the part gets rendered last and with the overloaded DOM in SharePoint, that means it sometimes won't load fast enough (I've had this problem a lot in Chrome using jQuery). Experiencing it in the morning more often is due to SharePoint's cache.
There are a few ways to fix it and you can work through them each until solved:
To start with: for the slowness, be sure to use SPWakeUp3 on Codeplex - this will 'wake up' (i.e. cache) your sites and scripts; SP dumps the cache every 24 hours - this will fix that.
For the script itself:
Try this: take the code out of the part, put into a text file and upload to a document library - point the CEWP to that file instead.
If no change, try using the HTML/JS Render Web Part from CodePlex - this avoids the general problems with the CEWP: http://davidmsterling.blogspot.com/2012/12/htmljavascript-rendering-web-part.html
If still not working you can try to -
Embed the script into the Page Layout and use the CEWP or HTML/JS Render (again using a File to hold the script call) OR
Embed the script into the Master Page (but this is overhead you probably don't need)
I'm pretty sure one of the above should resolve the issue.
David M. Sterling
http://davidmsterling.blogspot.com