Optimized jQuery for performance