Revert of scripts clean up

- Reverted 2d36bf3, because "each" function protects the code from
crashing then jQuery UI or Datalist scritps are not includes in the
page. For example login pages.