!function(h){"use strict";h.fn.filetrip=function(i){var o,g=this,d=0,m={init:function(){m.config=h.extend({allowedFileSize:10485760,delay:5e3,multi:!0,request:[],url:"processMultipleUploads.php",dataType:"json",limitNumberofFiles:10,required:"false",formRequired:"false",enforceInfo:!1,enterTitleLbl:"Enter Upload Title",enterDescLbl:"Enter Upload Description",enterEmailLbl:"Enter your email",enterName:"Enter your name",label:"Allowed file types are gif, jpg, and png.",dropBox:{title:"Drop files here",height:100,fontSize:26},stableUploadLbl:"Everything going well so far!",uploadBtnLbl:"Upload",previewBtnLbl:"Preview",deleteBtnLbl:"Delete",deleteConfirmLbl:"Are you sure you want to delete the file?",backgroundIcon:"",chunkSize:5242880,maxUploadSize:8388608,chunkUpload:"true",debug:!1,dragDrop:!0,circularDropbox:!1,theme:"simplex",targetOutput:".output",type:"post",devDebug:!1,nonce:"",disablePreview:!1,disablePostProgressAnimation:!0,disableRemovingItems:!0,backgroundColor:"",logoColor:"rgb(150, 155, 255)",textColor:"#DADADA",borderColor:"#DADADA",labelColor:"rgb(90, 90, 90)",progressBarColor:"orange",action:"filetrip_submission",beforeSubmit:m.beforeSubmit,successfulUpload:m.successfulUpload,failedUpload:m.failedUpload,fileDeleted:m.fileDeleted},i),m.Setup(),h(m.config.targetOutput).hide()},Setup:function(){var i="",e="",t="",a="",s="",l="",n="";""!=m.config.backgroundIcon?(s="; background-image: url("+m.config.backgroundIcon+"); background-size: auto; background-position: 50% 20%; background-repeat: no-repeat;",n=";padding-top:"+m.config.dropBox.height+"px;"):l='',m.config.multi&&(i="multiple"),"false"!=m.config.dragDrop&&(e="opacity:0;pointer-events: none;"),"true"==m.config.circularDropbox&&(t="filetrip-circular-dropbox"),"true"==m.config.formRequired&&(a="required");var r='
'+m.config.label+"
",a='",n='
'+l+'
'+m.config.dropBox.title+"
"+a+"
"+r+"
",r='';g.addClass("filetrip-multiple-upload"),"false"!=m.config.dragDrop?g.html(n+r):g.html(a+r)},bytesToSize:function(i){if(0==i)return"0 Bytes";var e=parseInt(Math.floor(Math.log(i)/Math.log(1024)));return Math.round(i/Math.pow(1024,e),2)+" "+["Bytes","KB","MB","GB","TB"][e]},bytesToSizeClass:function(i){if(0==i)return"0 Bytes";var e=parseInt(Math.floor(Math.log(i)/Math.log(1024)));return{size:Math.round(i/Math.pow(1024,e),2),type:["Bytes","KB","MB","GB","TB"][e]}},successfulUpload:function(i){},failedUpload:function(i){},fileDeleted:function(i){i.fileIdx;h.ajax({url:m.config.url,type:"POST",data:i,success:function(i){f(i)}})},beforeSubmit:function(i,e){var t=[],a=-1m.config.allowedFileSize?(t.status=!1,t.responseText=m.bytesToSize(s)+": The file size has exceeded the limit ("+m.config.allowedFileSize/1024/1024+"MB) !",t):(t.status=!0,t)}return t.status=!1,t.responseText="Please upgrade your browser, because your current browser lacks some new features we need!",t},deleteItem:function(e){var i={"filetrip-id":g.attr("id"),command:"delete",filetripfn:window.btoa(g.find("#"+e+"-fileName").text()),fileIndx:e,action:m.config.action,nonce:m.config.nonce,raqmkh:window.btoa(g.find("#file-"+e+"-"+g.attr("id")).val())};m.config.fileDeleted(i),h("#uploadItem-"+g.attr("id")+"-"+e).addClass("filetrip-animated bounceOutRight"),setTimeout(function(i){h("#uploadItem-"+g.attr("id")+"-"+e).remove()},600)},addFileItem:function(i,e){var t="",a="",s="";m.config.disablePreview||(a='',s=''+m.config.previewBtnLbl+""),"true"==m.config.required&&(t="required");var l='',n='