Refactor. No jQuery, less variables; scope; etc.