Refactored jQuery