Organised JS code

Organised the JavaScript code of the drawer, dropdown and slider. Added
additional options in the plugins.js configuration file.