Also you have a bit of code to recreate some jquery functionality. Maybe for your purpose it's unnecessary to load all of jquery, but consider that if you use Google's CDN, there's a strong chance the user already has jquery cached. Look at the HTML5 Boilerplate for a snippet on how to use Google CDN and fallback to the hosted version. Again, might not be necessary for your limited use case.