updates for running on server
use jquery and check for cors support