move js from footer to common.js