Card Replacement JS Handling