!function($){function e(r,s,n){if(++s>r.number_requests-1)return r.onFinished(),!0;var u=$.extend({current_index:s},r.data);$.ajax({url:r.url,type:r.type,async:!0,cache:r.cache,dataType:r.dataType,data:u,success:function(u){n.progressbar("value",Number((s+1)/r.number_requests*100)),r.onRequestSuccess(u,s)&&e(r,s,n)},error:function(u,t,a){n.progressbar("value",Number((s+1)/r.number_requests*100)),r.onRequestError(u,t,a,s)&&e(r,s,n)}})}$.fn.synchronous_request=function(r){var s=$.extend({url:"",number_requests:0,offset:0,data:{},progress_bar:".progress-bar",type:"post",cache:!1,dataType:"json",onRequestSuccess:function(e){},onRequestError:function(e,r,s){},onFinished:function(){}},r);progressbar=$(this).progressbar({value:0}),e(s,-1+s.offset,progressbar)}}(jQuery);