Changing jQuery script for remote script