Refactor Enquire.js script.