(function(r){r.fn.spin=function(g,l){var n={tiny:{lines:8,length:2,width:2,radius:3,color:"#000"},small:{lines:8,length:4,width:3,radius:5,color:"#000"},large:{lines:10,length:8,width:4,radius:8,color:"#000"},hbogot:{lines:17,length:8,width:3,radius:12,corners:0.5,speed:1,trail:50,color:"#000"},"hbogot-lt":{lines:17,length:8,width:3,radius:12,corners:0.5,speed:1,trail:50,color:"#FFF"}};if(Spinner)return this.each(function(){var h=r(this),q=h.data();q.spinner&&(q.spinner.stop(),delete q.spinner);!1!==
g&&("string"===typeof g&&(g=g in n?n[g]:{},l&&(g.color=l)),q.spinner=(new Spinner(r.extend({color:h.css("color")},g))).spin(this))});throw"Spinner class not available.";}})(jQuery);
!function(r,g,l){function n(b,a){var c=g.createElement(b||"div"),d;for(d in a)c[d]=a[d];return c}function h(b){for(var a=1,c=arguments.length;a<c;a++)b.appendChild(arguments[a]);return b}function q(b,a,c,d){var f=["opacity",a,~~(100*b),c,d].join("-");c=0.01+100*(c/d);d=Math.max(1-(1-b)/a*(100-c),b);var p=s.substring(0,s.indexOf("Animation")).toLowerCase();v[f]||(t.insertRule("@"+(p&&"-"+p+"-"||"")+"keyframes "+f+"{0%{opacity:"+d+"}"+c+"%{opacity:"+b+"}"+(c+0.01)+"%{opacity:1}"+(c+a)%100+"%{opacity:"+
b+"}100%{opacity:"+d+"}}",t.cssRules.length),v[f]=1);return f}function u(b,a){var c=b.style,d,f;if(c[a]!==l)return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(f=0;f<w.length;f++)if(d=w[f]+a,c[d]!==l)return d}function m(b,a){for(var c in a)b.style[u(b,c)||c]=a[c];return b}function x(b){for(var a=1;a<arguments.length;a++){var c=arguments[a],d;for(d in c)b[d]===l&&(b[d]=c[d])}return b}function y(b){for(var a={x:b.offsetLeft,y:b.offsetTop};b=b.offsetParent;)a.x+=b.offsetLeft,a.y+=b.offsetTop;return a}
function e(b){if(!this.spin)return new e(b);this.opts=x(b||{},e.defaults,z)}var w=["webkit","Moz","ms","O"],v={},s,t=function(){var b=n("style",{type:"text/css"});h(g.getElementsByTagName("head")[0],b);return b.sheet||b.styleSheet}(),z={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",speed:1,trail:100,opacity:0.25,fps:20,zIndex:2E9,className:"spinner",top:"auto",left:"auto",position:"relative"};e.defaults={};x(e.prototype,{spin:function(b){this.stop();var a=this,c=a.opts,d=a.el=
m(n(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex}),f=c.radius+c.length+c.width,p,h;b&&(b.insertBefore(d,b.firstChild||null),h=y(b),p=y(d),m(d,{left:("auto"==c.left?h.x-p.x+(b.offsetWidth>>1):parseInt(c.left,10)+f)+"px",top:("auto"==c.top?h.y-p.y+(b.offsetHeight>>1):parseInt(c.top,10)+f)+"px"}));d.setAttribute("aria-role","progressbar");a.lines(d,a.opts);if(!s){var g=0,k=c.fps,e=k/c.speed,l=(1-c.opacity)/(e*c.trail/100),q=e/c.lines;(function A(){g++;for(var b=c.lines;b;b--){var f=
Math.max(1-(g+b*q)%e*l,c.opacity);a.opacity(d,c.lines-b,f,c)}a.timeout=a.el&&setTimeout(A,~~(1E3/k))})()}return a},stop:function(){var b=this.el;b&&(clearTimeout(this.timeout),b.parentNode&&b.parentNode.removeChild(b),this.el=l);return this},lines:function(b,a){function c(c,b){return m(n(),{position:"absolute",width:a.length+a.width+"px",height:a.width+"px",background:c,boxShadow:b,transformOrigin:"left",transform:"rotate("+~~(360/a.lines*d+a.rotate)+"deg) translate("+a.radius+"px,0)",borderRadius:(a.corners*
a.width>>1)+"px"})}for(var d=0,f;d<a.lines;d++)f=m(n(),{position:"absolute",top:1+~(a.width/2)+"px",transform:a.hwaccel?"translate3d(0,0,0)":"",opacity:a.opacity,animation:s&&q(a.opacity,a.trail,d,a.lines)+" "+1/a.speed+"s linear infinite"}),a.shadow&&h(f,m(c("#000","0 0 4px #000"),{top:"2px"})),h(b,h(f,c(a.color,"0 0 1px rgba(0,0,0,.1)")));return b},opacity:function(b,a,c){a<b.childNodes.length&&(b.childNodes[a].style.opacity=c)}});(function(){function b(a,b){return n("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',
b)}var a=m(n("group"),{behavior:"url(#default#VML)"});!u(a,"transform")&&a.adj?(t.addRule(".spin-vml","behavior:url(#default#VML)"),e.prototype.lines=function(a,d){function f(){return m(b("group",{coordsize:e+" "+e,coordorigin:-g+" "+-g}),{width:e,height:e})}function p(a,c,e){h(l,h(m(f(),{rotation:360/d.lines*a+"deg",left:~~c}),h(m(b("roundrect",{arcsize:d.corners}),{width:g,height:d.width,left:d.radius,top:-d.width>>1,filter:e}),b("fill",{color:d.color,opacity:d.opacity}),b("stroke",{opacity:0}))))}
var g=d.length+d.width,e=2*g,k=2*-(d.width+d.length)+"px",l=m(f(),{position:"absolute",top:k,left:k});if(d.shadow)for(k=1;k<=d.lines;k++)p(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(k=1;k<=d.lines;k++)p(k);return h(a,l)},e.prototype.opacity=function(a,b,f,e){a=a.firstChild;e=e.shadow&&e.lines||0;if(a&&b+e<a.childNodes.length&&(a=(a=(a=a.childNodes[b+e])&&a.firstChild)&&a.firstChild))a.opacity=f}):s=u(a,"animation")})();"function"==typeof define&&
define.amd?define(function(){return e}):r.Spinner=e}(window,document);
