Encapsulate the Modal JS in a jQuery plugin to keep it off the global namespace.