bug fix and refactor jQuery on clips index page