Updating to Bill's latest code with fix for Timeglider JS error by me