$(document).ready(function(){$(function(){function k(){var b='<div class="espcms_floating_form"><div class="float_header_title">上传状态：<span id="espcms_header_filecount">0</span>个文件，<span id="espcms_header_fileok">0</span>个成功，<span id="espcms_header_fileno">0</span>个失败！</div></div>';parent.$("body").append(b),parent.$(".espcms_floating_form").animate({right:"20px",bottom:"0px"},800)}function l(){0==i?(window.clearInterval(h),parent.$(".espcms_floating_form").animate({right:"20px",bottom:"-45px"},200).remove()):i--}var c,d,f,g,h,i,j;$(".espcms_uploadPicList"),c=0,d=0,window.devicePixelRatio||1,f=0,g=0,i=4,j=WebUploader.create({swf:uploadSWF,server:$("#picker").attr("uploadurl"),fileVal:"upfilename",pick:"#picker",compress:!1,chunked:!0,chunkSize:chunksize,accept:{title:"Images",extensions:upfile_ext,mimeTypes:"*"},threads:1,fileNumLimit:100,fileSizeLimit:104857600,fileSingleSizeLimit:upload_max_filesize_byte}),j.on("uploadBeforeSend",function(a,b){a.file,b.upFileType="file",b.isWater=0,b.isZoom=0,b.filedir_id=$("#filedir_id").val()}),j.on("fileQueued",function(a){f++,g+=a.size,j.upload(),parent.$("#espcms_header_filecount").empty().append(f)}),j.on("uploadProgress",function(){}),j.on("startUpload",function(){k()}),j.onError=function(){},j.on("uploadSuccess",function(a,b){$("#"+a.id).find("p.uploadloading").hide(),"1"==b.returnVal?(c++,parent.$("#espcms_header_fileok").empty().append(c)):(d++,parent.$("#espcms_header_fileno").empty().append(d))}),j.on("uploadError",function(){}),j.on("uploadFinished",function(){h=window.setInterval(l,1e3);var a=$("#filedir_id").val();dialog_diropen(a)})})});