(function(n){n.fn.dropzone=function(t){function e(t,i){t.addEventListener("dragenter",r,!1);t.addEventListener("dragover",function(i){r(i);n(t).addClass("drop")},!1);t.addEventListener("dragleave",function(){n(t).removeClass("drop")},!1);t.addEventListener("drop",f,!1);i.addEventListener("change",f,!1)}function f(n){var o=document.getElementById("loadingBar"),f,u,e;if(o.classList.remove("display-none"),r(n),f=n.target.files||n.dataTransfer.files,t.complete){for(u=0;e=f[u];u++)t.complete(e);return}i.submit()}function r(n){n.stopPropagation();n.preventDefault()}var u,i;return this.length<=0?this:(u={complete:!1},t=n.extend(u,t),i=this,n(document).ready(function(){window.File&&window.FileReader&&window.FileList&&window.Blob?e(i[0],i.find('input[type="file"]')[0]):i.addClass("no-filesupport");var n=i.find(".browse-files"),t=function(){i.find('input[type="file"]').click()};n.click(t);n.on("keypress",function(n){n.which==13&&t()})}),this)}})(jQuery);$(document).ready(function(){$(".dropzone").dropzone({complete:function(n){var t=new FormData;t.append("file",n);$.ajax({type:"POST",url:"/Register/UploadCv",data:t,dataType:"json",contentType:!1,processData:!1}).always(function(){var n=$(".dropzone").prop("action");n=n.replace("/Cv","").replace("?job=","/");window.location.replace(n)})}})})