Add jquery ui to base template, move js to footer.