Added some functionality for when you don't have javascript.