Refactoring js into jQuery functions