implementing onProgress function with jQuery UI progressBar