Upgrading jQuery to 1.9.1 will break Ambari since the version of Ember used by Ambari requires jQuery 1.7. But if you want to know how to upgrade any javascript library used by ambari, here is the way to do it:
Make sure you have nodejs, npm and brunch installed to build the frontend code
cd into ambari-web/vendor/scripts and replace the javascript library with the version you want
Make changes in ambari-web/config.coffee file to reflect the modified library name and version
Run "npm install" from ambari-web
Run "brunch b" from ambari-web
This should create target files in ambari-web/public. Copy the vendor.js file from ambari-web/public/javascripts to the ambari server node and replace vendor.js in path /usr/lib/ambari-server/web/javascripts/