Added jQuery functions for creating the buttons.