I've been using this code for a few years now and it seems that it just recently broke on [my site][1]. I didn't initially notice the carousel had broken, but that my top navigation links had disappeared, a bug that I've encountered before with bad code injection.
I haven't been able to figure out how to fix the carousel but by changing the first line from