function ShowSpinner(n,t){var u,f,i,r,e;n===undefined&&t===undefined?(u=jQuery(window).height(),f=u/2,t=f.toString()+"px"):t===undefined&&(t="50%");i={lines:12,length:15,width:5,radius:40,scale:1,corners:1,color:"#fff",opacity:1/4,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:t,left:"50%",shadow:!0,hwaccel:!1,position:"fixed"};n==undefined?n="div#Loading":(jQuery(n).children("div.LoadingOverlay").length<=0&&jQuery(n).append('<div class="LoadingOverlay"><\/div>'),i.position="absolute",n=jQuery(n).find("div.LoadingOverlay"));r=jQuery(n);e=new Spinner(i).spin();r.append(e.el);r.show()}function HideSpinner(n){n=n==undefined?"div#Loading":jQuery(n).find("div.LoadingOverlay");jQuery(n).hide();jQuery(n).find("div.LoadingOverlay").remove();jQuery(n).find("div.spinner").remove()}(function(n,t){typeof module=="object"&&module.exports?module.exports=t():typeof define=="function"&&define.amd?define(t):n.Spinner=t()})(this,function(){"use strict";function i(n,t){var i=document.createElement(n||"div");for(var r in t)i[r]=t[r];return i}function t(n){for(var t=1,i=arguments.length;t<i;t++)n.appendChild(arguments[t]);return n}function a(n,t,i,r){var e=["opacity",t,~~(n*100),i,r].join("-"),o=.01+i/r*100,s=Math.max(1-(1-n)/t*(100-o),n),c=u.substring(0,u.indexOf("Animation")).toLowerCase(),l=c&&"-"+c+"-"||"";return h[e]||(f.insertRule("@"+l+"keyframes "+e+"{0%{opacity:"+s+"}"+o+"%{opacity:"+n+"}"+(o+.01)+"%{opacity:1}"+(o+t)%100+"%{opacity:"+n+"}100%{opacity:"+s+"}}",f.cssRules.length),h[e]=1),e}function o(n,t){var u=n.style,r,i;if(t=t.charAt(0).toUpperCase()+t.slice(1),u[t]!==undefined)return t;for(i=0;i<s.length;i++)if(r=s[i]+t,u[r]!==undefined)return r}function n(n,t){for(var i in t)n.style[o(n,i)||i]=t[i];return n}function c(n){for(var r,i,t=1;t<arguments.length;t++){r=arguments[t];for(i in r)n[i]===undefined&&(n[i]=r[i])}return n}function l(n,t){return typeof n=="string"?n:n[t%n.length]}function r(n){this.opts=c(n||{},r.defaults,v)}function y(){function u(n,t){return i("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',t)}f.addRule(".spin-vml","behavior:url(#default#VML)");r.prototype.lines=function(i,r){function s(){return n(u("group",{coordsize:o+" "+o,coordorigin:-e+" "+-e}),{width:o,height:o})}function a(i,f,o){t(c,t(n(s(),{rotation:360/r.lines*i+"deg",left:~~f}),t(n(u("roundrect",{arcsize:r.corners}),{width:e,height:r.scale*r.width,left:r.scale*r.radius,top:-r.scale*r.width>>1,filter:o}),u("fill",{color:l(r.color,i),opacity:r.opacity}),u("stroke",{opacity:0}))))}var e=r.scale*(r.length+r.width),o=r.scale*2*e,h=-(r.width+r.length)*r.scale*2+"px",c=n(s(),{position:"absolute",top:h,left:h}),f;if(r.shadow)for(f=1;f<=r.lines;f++)a(f,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(f=1;f<=r.lines;f++)a(f);return t(i,c)};r.prototype.opacity=function(n,t,i,r){var u=n.firstChild;r=r.shadow&&r.lines||0;u&&t+r<u.childNodes.length&&(u=u.childNodes[t+r],u=u&&u.firstChild,u=u&&u.firstChild,u&&(u.opacity=i))}}var s=["webkit","Moz","ms","O"],h={},u,f,v={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:1/4,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"fixed"},e;return r.defaults={},c(r.prototype,{spin:function(t){this.stop();var f=this,r=f.opts,e=f.el=i(null,{className:r.className});if(n(e,{position:r.position,width:0,zIndex:r.zIndex,left:r.left,top:r.top}),t&&t.insertBefore(e,t.firstChild||null),e.setAttribute("role","progressbar"),f.lines(e,f.opts),!u){var s=0,l=(r.lines-1)*(1-r.direction)/2,h,c=r.fps,o=c/r.speed,a=(1-r.opacity)/(o*r.trail/100),v=o/r.lines;(function y(){s++;for(var n=0;n<r.lines;n++)h=Math.max(1-(s+(r.lines-n)*v)%o*a,r.opacity),f.opacity(e,n*r.direction+l,h,r);f.timeout=f.el&&setTimeout(y,~~(1e3/c))})()}return f},stop:function(){var n=this.el;return n&&(clearTimeout(this.timeout),n.parentNode&&n.parentNode.removeChild(n),this.el=undefined),this},lines:function(r,f){function s(t,r){return n(i(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:t,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*e+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var e=0,h=(f.lines-1)*(1-f.direction)/2,o;e<f.lines;e++)o=n(i(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:u&&a(f.opacity,f.trail,h+e*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&t(o,n(s("#000","0 0 4px #000"),{top:"2px"})),t(r,t(o,s(l(f.color,e),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(n,t,i){t<n.childNodes.length&&(n.childNodes[t].style.opacity=i)}}),typeof document!="undefined"&&(f=function(){var n=i("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),e=n(i("group"),{behavior:"url(#default#VML)"}),!o(e,"transform")&&e.adj?y():u=o(e,"animation")),r})