var ajaxCall,jqxhr={ajaxRequest:function(a,l,e="",t="html",o="POST",j=$("#before")){j.show(),ajaxCall&&ajaxCall.abort(),ajaxCall=$.ajax({type:o,timeout:1e4,url:a,data:l,dataType:t,cache:!1}).fail(function(a,l,e){console.log(a)}).always(function(a,l,e){j.hide()})}};