(function(){"use strict";function n(n){function s(s,h){var rt,ut,p=s==window,l=h&&h.message!==undefined?h.message:undefined,g,k,d,tt,nt,w,b,it,ft,et,at;if(h=n.extend({},n.blockUI.defaults,h||{}),!h.ignoreIfBlocked||!n(s).data("blockUI.isBlocked")){if(h.overlayCSS=n.extend({},n.blockUI.defaults.overlayCSS,h.overlayCSS||{}),rt=n.extend({},n.blockUI.defaults.css,h.css||{}),h.onOverlayClick&&(h.overlayCSS.cursor="pointer"),ut=n.extend({},n.blockUI.defaults.themedCSS,h.themedCSS||{}),l=l===undefined?h.message:l,p&&t&&e(window,{fadeOut:0}),l&&typeof l!="string"&&(l.parentNode||l.jquery)&&(g=l.jquery?l[0]:l,k={},n(s).data("blockUI.history",k),k.el=g,k.parent=g.parentNode,k.display=g.style.display,k.position=g.style.position,k.parent&&k.parent.removeChild(g)),n(s).data("blockUI.onUnblock",h.onUnblock),d=h.baseZ,tt=f||h.forceIframe?n('<iframe class="blockUI" style="z-index:'+d+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+h.iframeSrc+'"><\/iframe>'):n('<div class="blockUI" style="display:none"><\/div>'),nt=h.theme?n('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+d+++';display:none"><\/div>'):n('<div class="blockUI blockOverlay" style="z-index:'+d+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"><\/div>'),h.theme&&p?(b='<div class="blockUI '+h.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(d+10)+';display:none;position:fixed">',h.title&&(b+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"<\/div>"),b+='<div class="ui-widget-content ui-dialog-content"><\/div>',b+="<\/div>"):h.theme?(b='<div class="blockUI '+h.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(d+10)+';display:none;position:absolute">',h.title&&(b+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"<\/div>"),b+='<div class="ui-widget-content ui-dialog-content"><\/div>',b+="<\/div>"):b=p?'<div class="blockUI '+h.blockMsgClass+' blockPage" style="z-index:'+(d+10)+';display:none;position:fixed"><\/div>':'<div class="blockUI '+h.blockMsgClass+' blockElement" style="z-index:'+(d+10)+';display:none;position:absolute"><\/div>',w=n(b),l&&(h.theme?(w.css(ut),w.addClass("ui-widget-content")):w.css(rt)),h.theme||nt.css(h.overlayCSS),nt.css("position",p?"fixed":"absolute"),(f||h.forceIframe)&&tt.css("opacity",0),it=[tt,nt,w],ft=p?n("body"):n(s),n.each(it,function(){this.appendTo(ft)}),h.theme&&h.draggable&&n.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),et=v&&(!n.support.boxModel||n("object,embed",p?null:s).length>0),o||et){if(p&&h.allowBodyStretch&&n.support.boxModel&&n("html,body").css("height","100%"),(o||!n.support.boxModel)&&!p)var ot=r(s,"borderTopWidth"),st=r(s,"borderLeftWidth"),ht=ot?"(0 - "+ot+")":0,ct=st?"(0 - "+st+")":0;n.each(it,function(n,t){var i=t[0].style,r,u;i.position="absolute";n<2?(p?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+h.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),p?i.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),ct&&i.setExpression("left",ct),ht&&i.setExpression("top",ht)):h.centerY?(p&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0):!h.centerY&&p&&(r=h.css&&h.css.top?parseInt(h.css.top,10):0,u="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"',i.setExpression("top",u))})}if(l&&(h.theme?w.find(".ui-widget-content").append(l):w.append(l),(l.jquery||l.nodeType)&&n(l).show()),(f||h.forceIframe)&&h.showOverlay&&tt.show(),h.fadeIn){var lt=h.onBlock?h.onBlock:u,vt=h.showOverlay&&!l?lt:u,yt=l?lt:u;h.showOverlay&&nt._fadeIn(h.fadeIn,vt);l&&w._fadeIn(h.fadeIn,yt)}else h.showOverlay&&nt.show(),l&&w.show(),h.onBlock&&h.onBlock();c(1,s,h);p?(t=w[0],i=n(h.focusableElements,t),h.focusInput&&setTimeout(a,20)):y(w[0],h.centerX,h.centerY);h.timeout&&(at=setTimeout(function(){p?n.unblockUI(h):n(s).unblock(h)},h.timeout),n(s).data("blockUI.timeout",at))}}function e(r,u){var o,s=r==window,e=n(r),l=e.data("blockUI.history"),a=e.data("blockUI.timeout"),f;a&&(clearTimeout(a),e.removeData("blockUI.timeout"));u=n.extend({},n.blockUI.defaults,u||{});c(0,r,u);u.onUnblock===null&&(u.onUnblock=e.data("blockUI.onUnblock"),e.removeData("blockUI.onUnblock"));f=s?n("body").children().filter(".blockUI").add("body > .blockUI"):e.find(">.blockUI");u.cursorReset&&(f.length>1&&(f[1].style.cursor=u.cursorReset),f.length>2&&(f[2].style.cursor=u.cursorReset));s&&(t=i=null);u.fadeOut?(o=f.length,f.stop().fadeOut(u.fadeOut,function(){--o==0&&h(f,l,u,r)})):h(f,l,u,r)}function h(t,i,r,u){var f=n(u);if(!f.data("blockUI.isBlocked")){if(t.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.parent&&i.parent.appendChild(i.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),typeof r.onUnblock=="function")r.onUnblock(u,r);var e=n(document.body),o=e.width(),s=e[0].style.width;e.width(o-1).width(o);e[0].style.width=s}}function c(i,r,u){var f=r==window,o=n(r),e;(i||(!f||t)&&(f||o.data("blockUI.isBlocked")))&&(o.data("blockUI.isBlocked",i),f&&u.bindEvents&&(!i||u.showOverlay))&&(e="mousedown mouseup keydown keypress keyup touchstart touchend touchmove",i?n(document).bind(e,u,l):n(document).unbind(e,l))}function l(r){var u,f;if(r.type==="keydown"&&r.keyCode&&r.keyCode==9&&t&&r.data.constrainTabKey){var e=i,s=!r.shiftKey&&r.target===e[e.length-1],o=r.shiftKey&&r.target===e[0];if(s||o)return setTimeout(function(){a(o)},10),!1}return(u=r.data,f=n(r.target),f.hasClass("blockOverlay")&&u.onOverlayClick&&u.onOverlayClick(),f.parents("div."+u.blockMsgClass).length>0)?!0:f.parents().children().filter("div.blockUI").length===0}function a(n){if(i){var t=i[n===!0?i.length-1:0];t&&t.focus()}}function y(n,t,i){var u=n.parentNode,f=n.style,e=(u.offsetWidth-n.offsetWidth)/2-r(u,"borderLeftWidth"),o=(u.offsetHeight-n.offsetHeight)/2-r(u,"borderTopWidth");t&&(f.left=e>0?e+"px":"0");i&&(f.top=o>0?o+"px":"0")}function r(t,i){return parseInt(n.css(t,i),10)||0}var t,i;n.fn._fadeIn=n.fn.fadeIn;var u=n.noop||function(){},f=/MSIE/.test(navigator.userAgent),o=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),p=document.documentMode||0,v=n.isFunction(document.createElement("div").style.setExpression);n.blockUI=function(n){s(window,n)};n.unblockUI=function(n){e(window,n)};n.growlUI=function(t,i,r,u){var f=n('<div class="growlUI"><\/div>'),e,o;t&&f.append("<h1>"+t+"<\/h1>");i&&f.append("<h2>"+i+"<\/h2>");r===undefined&&(r=3e3);e=function(t){t=t||{};n.blockUI({message:f,fadeIn:typeof t.fadeIn!="undefined"?t.fadeIn:700,fadeOut:typeof t.fadeOut!="undefined"?t.fadeOut:1e3,timeout:typeof t.timeout!="undefined"?t.timeout:r,centerY:!1,showOverlay:!1,onUnblock:u,css:n.blockUI.defaults.growlCSS})};e();o=f.css("opacity");f.mouseover(function(){e({fadeIn:0,timeout:3e4});var t=n(".blockMsg");t.stop();t.fadeTo(300,1)}).mouseout(function(){n(".blockMsg").fadeOut(1e3)})};n.fn.block=function(t){if(this[0]===window)return n.blockUI(t),this;var i=n.extend({},n.blockUI.defaults,t||{});return this.each(function(){var t=n(this);i.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){n.css(this,"position")=="static"&&(this.style.position="relative",n(this).data("blockUI.static",!0));this.style.zoom=1;s(this,t)})};n.fn.unblock=function(t){return this[0]===window?(n.unblockUI(t),this):this.each(function(){e(this,t)})};n.blockUI.version=2.65;n.blockUI.defaults={message:"<h1>Please wait...<\/h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"0px",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1051,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:25e3,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};t=null;i=[]}typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],n):n(jQuery)})(),function(n){n.scrollFollow=function(t,i){function u(){t.queue([]);var o=parseInt(n(window).height()),u=parseInt(n(document).scrollTop()),h=parseInt(t.cont.offset().top),s=parseInt(t.cont.attr("offsetHeight")),f=parseInt(t.attr("offsetHeight")+(parseInt(t.css("marginTop"))||0)+(parseInt(t.css("marginBottom"))||0)),e;r&&(i.relativeTo=="top"?e=t.initialOffsetTop>=u+i.offset?t.initialTop:Math.min(Math.max(-h,u-t.initialOffsetTop+t.initialTop)+i.offset,s-f-t.paddingAdjustment):i.relativeTo=="bottom"&&(e=t.initialOffsetTop+f>=u+i.offset+o?t.initialTop:Math.min(u+o-f-i.offset,s-f)),(new Date).getTime()-t.lastScroll>=i.delay-20&&t.animate({top:e},i.speed,i.easing))}var f,r;t=n(t);f=t.css("position");r=!0;n.cookie!=undefined&&(n.cookie("scrollFollowSetting"+t.attr("id"))=="false"?(r=!1,n("#"+i.killSwitch).text(i.offText).toggle(function(){r=!0;n(this).text(i.onText);n.cookie("scrollFollowSetting"+t.attr("id"),!0,{expires:365,path:"/"});u()},function(){r=!1;n(this).text(i.offText);t.animate({top:t.initialTop},i.speed,i.easing);n.cookie("scrollFollowSetting"+t.attr("id"),!1,{expires:365,path:"/"})})):n("#"+i.killSwitch).text(i.onText).toggle(function(){r=!1;n(this).text(i.offText);t.animate({top:t.initialTop},0);n.cookie("scrollFollowSetting"+t.attr("id"),!1,{expires:365,path:"/"})},function(){r=!0;n(this).text(i.onText);n.cookie("scrollFollowSetting"+t.attr("id"),!0,{expires:365,path:"/"});u()}));t.cont=i.container==""?t.parent():n("#"+i.container);t.initialOffsetTop=parseInt(t.offset().top);t.initialTop=parseInt(t.css("top"))||0;t.paddingAdjustment=t.css("position")=="relative"?parseInt(t.cont.css("paddingTop"))+parseInt(t.cont.css("paddingBottom")):0;n(window).scroll(function(){n.fn.scrollFollow.interval=setTimeout(function(){u()},i.delay);t.lastScroll=(new Date).getTime()});n(window).resize(function(){n.fn.scrollFollow.interval=setTimeout(function(){u()},i.delay);t.lastScroll=(new Date).getTime()});t.lastScroll=0;u()};n.fn.scrollFollow=function(t){return t=t||{},t.relativeTo=t.relativeTo||"top",t.speed=t.speed||500,t.offset=t.offset||0,t.easing=t.easing||"swing",t.container=t.container||this.parent().attr("id"),t.killSwitch=t.killSwitch||"killSwitch",t.onText=t.onText||"Turn Slide Off",t.offText=t.offText||"Turn Slide On",t.delay=t.delay||0,this.each(function(){new n.scrollFollow(this,t)}),this}}(jQuery),function(n){var t={init:function(r){return this.each(function(){var e=n(this),f,u,s,o;if(e.data("uploadifive",{inputs:{},inputCount:0,fileID:0,queue:{count:0,selected:0,replaced:0,errors:0,queued:0,cancelled:0},uploads:{current:0,attempts:0,successful:0,errors:0,count:0}}),f=e.data("uploadifive"),u=f.settings=n.extend({auto:!0,buttonClass:!1,buttonText:"Select Files",checkScript:!1,dnd:!0,dropTarget:!1,fileObjName:"Filedata",fileSizeLimit:0,fileType:!1,formData:{},height:30,itemTemplate:!1,method:"post",multi:!0,overrideEvents:[],queueID:!1,queueSizeLimit:0,removeCompleted:!1,simUploadLimit:0,truncateLength:0,uploadLimit:0,uploadScript:"uploadifive.php",width:100},r),isNaN(u.fileSizeLimit)?(s=parseInt(u.fileSizeLimit)*1.024,u.fileSizeLimit.indexOf("KB")>-1?u.fileSizeLimit=s*1e3:u.fileSizeLimit.indexOf("MB")>-1?u.fileSizeLimit=s*1e6:u.fileSizeLimit.indexOf("GB")>-1&&(u.fileSizeLimit=s*1e9)):u.fileSizeLimit=u.fileSizeLimit*1024,f.inputTemplate=n('<input type="file">').css({"font-size":u.height+"px",opacity:0,position:"absolute",right:"-3px",top:"-3px","z-index":999}),f.createInput=function(){var i=f.inputTemplate.clone(),r=i.name="input"+f.inputCount++;u.multi&&i.attr("multiple",!0);u.fileType&&i.attr("accept",u.fileType);i.bind("change",function(){var i,o;if(f.queue.selected=0,f.queue.replaced=0,f.queue.errors=0,f.queue.queued=0,i=this.files.length,f.queue.selected=i,f.queue.count+i>u.queueSizeLimit&&u.queueSizeLimit!==0)n.inArray("onError",u.overrideEvents)<0&&alert("The maximum number of queue items has been reached ("+u.queueSizeLimit+").  Please select fewer files."),typeof u.onError=="function"&&u.onError.call(e,"QUEUE_LIMIT_EXCEEDED");else{for(o=0;o<i;o++)file=this.files[o],f.addQueueItem(file);f.inputs[r]=this;f.createInput()}u.auto&&t.upload.call(e);typeof u.onSelect=="function"&&u.onSelect.call(e,f.queue)});f.currentInput&&f.currentInput.hide();f.button.append(i);f.currentInput=i},f.destroyInput=function(t){n(f.inputs[t]).remove();delete f.inputs[t];f.inputCount--},f.drop=function(i){var o;f.queue.selected=0;f.queue.replaced=0;f.queue.errors=0;f.queue.queued=0;var r=i.dataTransfer,h=r.name="input"+f.inputCount++,s=r.files.length;if(f.queue.selected=s,f.queue.count+s>u.queueSizeLimit&&u.queueSizeLimit!==0)n.inArray("onError",u.overrideEvents)<0&&alert("The maximum number of queue items has been reached ("+u.queueSizeLimit+").  Please select fewer files."),typeof u.onError=="function"&&u.onError.call(e,"QUEUE_LIMIT_EXCEEDED");else{for(o=0;o<s;o++)file=r.files[o],f.addQueueItem(file);f.inputs[h]=r}u.auto&&t.upload.call(e);typeof u.onDrop=="function"&&u.onDrop.call(e,r.files,r.files.length);i.preventDefault();i.stopPropagation()},f.fileExistsInQueue=function(n){var i,t;for(i in f.inputs)for(input=f.inputs[i],limit=input.files.length,t=0;t<limit;t++)if(existingFile=input.files[t],existingFile.name==n.name&&!existingFile.complete)return!0;return!1},f.removeExistingFile=function(n){var r,i;for(r in f.inputs)for(input=f.inputs[r],limit=input.files.length,i=0;i<limit;i++)existingFile=input.files[i],existingFile.name!=n.name||existingFile.complete||(f.queue.replaced++,t.cancel.call(e,existingFile,!0))},f.queueItem=u.itemTemplate==!1?n('<div class="uploadifive-queue-item">                        <a class="close" href="#">X<\/a>                        <div><span class="filename"><\/span><span class="fileinfo"><\/span><\/div>                        <div class="progress">                            <div class="progress-bar"><\/div>                        <\/div>                    <\/div>'):n(u.itemTemplate),f.addQueueItem=function(i){if(n.inArray("onAddQueueItem",u.overrideEvents)<0){f.removeExistingFile(i);i.queueItem=f.queueItem.clone();i.queueItem.attr("id",u.id+"-file-"+f.fileID++);i.queueItem.find(".close").bind("click",function(){return t.cancel.call(e,i),!1});var r=i.name;r.length>u.truncateLength&&u.truncateLength!=0&&(r=r.substring(0,u.truncateLength)+"...");i.queueItem.find(".filename").html(r);i.queueItem.data("file",i);f.queueEl.append(i.queueItem)}typeof u.onAddQueueItem=="function"&&u.onAddQueueItem.call(e,i);i.size>u.fileSizeLimit&&u.fileSizeLimit!=0?f.error("FILE_SIZE_LIMIT_EXCEEDED",i):(f.queue.queued++,f.queue.count++)},f.removeQueueItem=function(t,i,r){r||(r=0);var u=i?0:500;t.queueItem&&(t.queueItem.find(".fileinfo").html()!=" - Completed"&&t.queueItem.find(".fileinfo").html(" - Cancelled"),t.queueItem.find(".progress-bar").width(0),t.queueItem.delay(r).fadeOut(u,function(){n(this).remove()}),delete t.queueItem,f.queue.count--)},f.filesToUpload=function(){var t=0,i,n;for(i in f.inputs)for(input=f.inputs[i],limit=input.files.length,n=0;n<limit;n++)file=input.files[n],file.skip||file.complete||t++;return t},f.checkExists=function(i){if(n.inArray("onCheck",u.overrideEvents)<0){n.ajaxSetup({async:!1});var r=n.extend(u.formData,{filename:i.name});if(n.post(u.checkScript,r,function(n){i.exists=parseInt(n)}),i.exists&&!confirm("A file named "+i.name+" already exists in the upload folder.\nWould you like to replace it?"))return t.cancel.call(e,i),!0}return typeof u.onCheck=="function"&&u.onCheck.call(e,i,i.exists),!1},f.uploadFile=function(t,r){var o,s;if(!t.skip&&!t.complete&&!t.uploading)if(t.uploading=!0,f.uploads.current++,f.uploads.attempted++,xhr=t.xhr=new XMLHttpRequest,typeof FormData=="function"||typeof FormData=="object"){o=new FormData;o.append(u.fileObjName,t);for(i in u.formData)o.append(i,u.formData[i]);xhr.open(u.method,u.uploadScript,!0);xhr.upload.addEventListener("progress",function(n){n.lengthComputable&&f.progress(n,t)},!1);xhr.addEventListener("load",function(n){this.readyState==4&&(t.uploading=!1,this.status==200?t.xhr.responseText!=="Invalid file type."?f.uploadComplete(n,t,r):f.error(t.xhr.responseText,t,r):this.status==404?f.error("404_FILE_NOT_FOUND",t,r):this.status==403?f.error("403_FORBIDDEN",t,r):f.error("Unknown Error",t,r))});xhr.send(o)}else s=new FileReader,s.onload=function(i){var h="-------------------------"+(new Date).getTime(),c="--",s="\r\n",o="",l,a;o+=c+h+s;o+='Content-Disposition: form-data; name="'+u.fileObjName+'"';t.name&&(o+='; filename="'+t.name+'"');o+=s;o+="Content-Type: application/octet-stream"+s+s;o+=i.target.result+s;for(key in u.formData)o+=c+h+s,o+='Content-Disposition: form-data; name="'+key+'"'+s+s,o+=u.formData[key]+s;o+=c+h+c+s;xhr.upload.addEventListener("progress",function(n){f.progress(n,t)},!1);xhr.addEventListener("load",function(n){t.uploading=!1;var i=this.status;i==404?f.error("404_FILE_NOT_FOUND",t,r):t.xhr.responseText!="Invalid file type."?f.uploadComplete(n,t,r):f.error(t.xhr.responseText,t,r)},!1);l=u.uploadScript;u.method=="get"&&(a=n(u.formData).param(),l+=a);xhr.open(u.method,u.uploadScript,!0);xhr.setRequestHeader("Content-Type","multipart/form-data; boundary="+h);typeof u.onUploadFile=="function"&&u.onUploadFile.call(e,t);xhr.sendAsBinary(o)},s.readAsBinaryString(t)},f.progress=function(t,i){if(n.inArray("onProgress",u.overrideEvents)<0){if(t.lengthComputable)var r=Math.round(t.loaded/t.total*100);i.queueItem.find(".fileinfo").html(" - "+r+"%");i.queueItem.find(".progress-bar").css("width",r+"%")}typeof u.onProgress=="function"&&u.onProgress.call(e,i,t)},f.error=function(i,r,o){if(n.inArray("onError",u.overrideEvents)<0){switch(i){case"404_FILE_NOT_FOUND":errorMsg="404 Error";break;case"403_FORBIDDEN":errorMsg="403 Forbidden";break;case"FORBIDDEN_FILE_TYPE":errorMsg="Forbidden File Type";break;case"FILE_SIZE_LIMIT_EXCEEDED":errorMsg="File Too Large";break;default:errorMsg="Unknown Error"}r.queueItem.addClass("error").find(".fileinfo").html(" - "+errorMsg);r.queueItem.find(".progress").remove()}typeof u.onError=="function"&&u.onError.call(e,i,r);r.skip=!0;i=="404_FILE_NOT_FOUND"?f.uploads.errors++:f.queue.errors++;o&&t.upload.call(e,null,!0)},f.uploadComplete=function(i,r,o){n.inArray("onUploadComplete",u.overrideEvents)<0&&(r.queueItem.find(".progress-bar").css("width","100%"),r.queueItem.find(".fileinfo").html(" - Completed"),r.queueItem.find(".progress").slideUp(250),r.queueItem.addClass("complete"));typeof u.onUploadComplete=="function"&&u.onUploadComplete.call(e,r,r.xhr.responseText);u.removeCompleted&&setTimeout(function(){t.cancel.call(e,r)},3e3);r.complete=!0;f.uploads.successful++;f.uploads.count++;f.uploads.current--;delete r.xhr;o&&t.upload.call(e,null,!0)},f.queueComplete=function(){typeof u.onQueueComplete=="function"&&u.onQueueComplete.call(e,f.uploads)},window.File&&window.FileList&&window.Blob&&(window.FileReader||window.FormData))u.id="uploadifive-"+e.attr("id"),f.button=n('<div id="'+u.id+'" class="uploadifive-button">'+u.buttonText+"<\/div>"),u.buttonClass&&f.button.addClass(u.buttonClass),f.button.css({height:u.height,"line-height":u.height+"px",overflow:"hidden",position:"relative","text-align":"center",width:u.width}),e.before(f.button).appendTo(f.button).hide(),f.createInput.call(e),u.queueID?f.queueEl=n("#"+u.queueID):(u.queueID=u.id+"-queue",f.queueEl=n('<div id="'+u.queueID+'" class="uploadifive-queue" />'),f.button.after(f.queueEl)),u.dnd&&(o=u.dropTarget?n(u.dropTarget):f.queueEl.get(0),o.addEventListener("dragleave",function(n){n.preventDefault();n.stopPropagation()},!1),o.addEventListener("dragenter",function(n){n.preventDefault();n.stopPropagation()},!1),o.addEventListener("dragover",function(n){n.preventDefault();n.stopPropagation()},!1),o.addEventListener("drop",f.drop,!1)),XMLHttpRequest.prototype.sendAsBinary||(XMLHttpRequest.prototype.sendAsBinary=function(n){function t(n){return n.charCodeAt(0)&255}var i=Array.prototype.map.call(n,t),r=new Uint8Array(i);this.send(r.buffer)}),typeof u.onInit=="function"&&u.onInit.call(e);else return typeof u.onFallback=="function"&&u.onFallback.call(e),!1})},debug:function(){return this.each(function(){console.log(n(this).data("uploadifive"))})},clearQueue:function(){this.each(function(){var u=n(this),r=u.data("uploadifive"),f=r.settings;for(var e in r.inputs)for(input=r.inputs[e],limit=input.files.length,i=0;i<limit;i++)file=input.files[i],t.cancel.call(u,file);typeof f.onClearQueue=="function"&&f.onClearQueue.call(u,n("#"+r.settings.queueID))})},cancel:function(i,r){this.each(function(){var f=n(this),u=f.data("uploadifive"),e=u.settings;typeof i=="string"&&(isNaN(i)||(fileID="uploadifive-"+n(this).attr("id")+"-file-"+i),i=n("#"+fileID).data("file"));i.skip=!0;u.filesCancelled++;i.uploading&&(u.uploads.current--,i.uploading=!1,i.xhr.abort(),delete i.xhr,t.upload.call(f));n.inArray("onCancel",e.overrideEvents)<0&&u.removeQueueItem(i,r);typeof e.onCancel=="function"&&e.onCancel.call(f,i)})},upload:function(t,i){this.each(function(){var f=n(this),r=f.data("uploadifive"),u=r.settings,e;t?r.uploadFile.call(f,t):r.uploads.count+r.uploads.current<u.uploadLimit||u.uploadLimit==0?(i||(r.uploads.attempted=0,r.uploads.successsful=0,r.uploads.errors=0,e=r.filesToUpload(),typeof u.onUpload=="function"&&u.onUpload.call(f,e)),n("#"+u.queueID).find(".uploadifive-queue-item").not(".error, .complete").each(function(){if(_file=n(this).data("file"),r.uploads.current>=u.simUploadLimit&&u.simUploadLimit!==0||r.uploads.current>=u.uploadLimit&&u.uploadLimit!==0||r.uploads.count>=u.uploadLimit&&u.uploadLimit!==0)return!1;u.checkScript?(_file.checking=!0,skipFile=r.checkExists(_file),_file.checking=!1,skipFile||r.uploadFile(_file,!0)):r.uploadFile(_file,!0)}),n("#"+u.queueID).find(".uploadifive-queue-item").not(".error, .complete").size()==0&&r.queueComplete()):r.uploads.current==0&&(n.inArray("onError",u.overrideEvents)<0&&r.filesToUpload()>0&&u.uploadLimit!=0&&alert("The maximum upload limit has been reached."),typeof u.onError=="function"&&u.onError.call(f,"UPLOAD_LIMIT_EXCEEDED",r.filesToUpload()))})},destroy:function(){this.each(function(){var i=n(this),u=i.data("uploadifive"),r=u.settings;t.clearQueue.call(i);r.queueID||n("#"+r.queueID).remove();i.siblings("input").remove();i.show().insertBefore(u.button);u.button.remove();typeof r.onDestroy=="function"&&r.onDestroy.call(i)})}};n.fn.uploadifive=function(i){if(t[i])return t[i].apply(this,Array.prototype.slice.call(arguments,1));if(typeof i!="object"&&i)n.error("The method "+i+" does not exist in $.uploadify");else return t.init.apply(this,arguments)}}(jQuery)