HTML5 Yay!

Added HTML5’s onpopstate event to change tabs based on history. Not
sure if code is less efficient, but it works better. It’s May 2013. I
don’t care about IE8.