replace pure javascript calls with jQuery calls for status