This needs a license comment at the top, as well as a function for avoiding polluting the global namespace, and should wait until the document is finished loading before binding the events.

Also, instead of an ID to select this, you should probably use a class, in case we need to use the slider elsewhere.