var MB;!function(a){function b(){return(new Date).getTime()}function c(a,b,c){var d=document.createElement(a);b&&(d.className=b);var e=d.style;for(var f in c)e[f]=c[f];return d}function d(a,b,c){var d=a.style,e=b.charAt(0).toUpperCase()+b.slice(1);d[l+e]=c,d[b]=c}function e(a){for(var b=[],c=0;cc){var f=(a-c)%(2*e);f=f>e?b+(f-e):b+(e-f)}else if(b>a){var f=(b-a)%(2*e);f=f>e?b+(e-f):b+f}else f=a;return f/d}function g(a,b,c){return"undefined"==typeof a&&(a=1),"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=5),parseFloat((Math.random()*(a-b)+b).toFixed(c))}function h(a,b,c){return a>=90*(b-1)&&90*b>a||a>=90*(c-1)&&90*c>a?!0:!1}function i(a,b,c,d){return d=Math.pow(.7,d),a=~~(d*a),b=~~(d*b),c=~~(d*c),e("rgb(%r,%g,%b)",a,b,c)}function j(){return Math.random()>.5?-1:1}var k=function(){function a(a,c){this.callback=a,this.context=c,this.destroyed=!1;var d=b();this.start=d,this.next(d)}return a.prototype.next=function(c){var d=this;if(!this.destroyed){var e=b(),f=e;f-this.start>=a.delay&&500>f-c&&(this.start=e,this.callback.call(this.context,f,c)),a.raf.call(window,function(){d.next(e)})}},a.prototype.destroy=function(){this.destroyed=!0,this.callback=null,this.context=null},a.delay=0,a.raf=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,1e3/60)},a}();a.Animate=k;var l=function(){var a=window.getComputedStyle(document.documentElement,""),b=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1],c="WebKit|Moz|MS|O".match(new RegExp("("+b+")","i"))[1];return c.toLowerCase()}(),m=function(){function a(a){var b=this;this.update=!0,this._direction="left",this._speed=100,this.imgWidth=0,this.imgHeight=0,this.width=0,this.height=0;var c=document.createElement("div");if(c.className="movingbackground",this.mb=c,window.addEventListener("resize",function(){b.update=!0},!1),a)for(var d in a)this[d]=a[d];this.tx=0,this.ty=0}return a.prototype.onload=function(){this.startMoving()},a.prototype.startMoving=function(){this.animation=new k(function(a,b){var c=this.data;if(c){var f=this._direction,g="left"===f||"top"==f,h=c.delta,i=c.size;h+=(g?-1:1)*(a-b)/1e3*this._speed;var j=c.name,k=(c.start+(h%i-(g?0:i)))%i;this[j]=k,c.delta=h,d(this.mb,"transform",e("translate(%xpx, %ypx)",this.tx,this.ty))}},this)},Object.defineProperty(a.prototype,"data",{get:function(){return this.update===!0&&this.updateData(),this._data},enumerable:!0,configurable:!0}),a.prototype.updateData=function(){var a=this._container;if(a){var b=a.offsetWidth,c=a.offsetHeight,d=this.imgWidth,e=this.imgHeight;if(d&&e&&c&&b){var f=this._direction,g=this.getLength,h=this.mb,i="top"===f||"bottom"===f,j=i?"ty":"tx";h.style[i?"height":"width"]=(i?g(e,c):g(d,b))+"px",this._data={name:j,size:i?e:d,delta:0,start:this[j]},this.update=!1}}},a.prototype.getLength=function(a,b){return a>=b?2*a:Math.ceil(b/a)*a+a},Object.defineProperty(a.prototype,"direction",{set:function(a){a&&this._direction!==a&&(this._direction=a,this.update=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"speed",{set:function(a){this._speed=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"src",{set:function(a){var b=new Image,c=this.mb,d=this;b.onload=function(){this.onload=null,d.imgWidth=this.width,d.imgHeight=this.height,c.style.backgroundImage="url("+a+")",this.update=!0,d.onload()},b.src=a,b=null},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"container",{set:function(a){this._container!==a&&(a.appendChild(this.mb),this._container=a,this.update=!0)},enumerable:!0,configurable:!0}),a.prototype.destroy=function(){this.animation&&this.animation.destroy(),this.mb.parentNode.removeChild(this.mb),this.mb=null},a}(),n=function(){function a(a){this.x=0,this.y=0,this.direction=0,this.speed=50,this.update=this.normal,this.zoomfrom=1,this.rotatefrom=0;for(var b in a)"direction"===b?this.direction=this.parseDirection(a[b]):"node"===b?(this.node=a.node,this.container=this.node.parentNode,this.rect=this.node.getBoundingClientRect(),this.outRect=this.container.getBoundingClientRect()):"mode"===b?this.update=this[a.mode]:this[b]=a[b];var c=this;window.addEventListener("resize",function(){c.resize()},!1),this.move()}return a.prototype.resize=function(){this.rect=this.node.getBoundingClientRect(),this.outRect=this.container.getBoundingClientRect()},a.prototype.parseDirection=function(a){if("string"==typeof a)switch(a){case"left":a=180;break;case"right":a=0;break;case"top":a=90;break;case"bottom":a=270}return a},a.prototype.move=function(){this.start=b(),this.animation=new k(function(a,b){var c=(a-b)/1e3,f=(a-this.start,e("scale(%s)rotate(%rdeg)",this.zoomfrom,this.rotatefrom)),g=2,h=this.x+c*this.speed*Math.cos(this.direction/180*Math.PI),i=this.y-c*this.speed*Math.sin(this.direction/180*Math.PI);this.update(h,i),d(this.node,"transform",e("translate(%spx, %spx)",this.x.toFixed(g),this.y.toFixed(g))+f)},this)},a.prototype.absDeg=function(a){return 0>a&&(a+=360),a%360},a.prototype.collision=function(a,b){var c=this.rect,d=this.outRect,e=this.direction,f=d.width-c.width/2,g=c.width/2,i=d.height-c.height/2,j=c.height/2,k=(this.isQuadrant,e);(a>f&&h(e,1,4)||g>a&&h(e,2,3))&&(k=this.absDeg(180-e)),(b>i&&h(e,3,4)||j>b&&h(e,1,2))&&(k=this.absDeg(360-e)),a>f&&h(e,1,4)&&(a=f),g>a&&h(e,2,3)&&(a=g),b>i&&h(e,3,4)&&(b=i),j>b&&h(e,1,2)&&(b=j),this.x=a,this.y=b,this.direction=k},a.prototype.alternate=function(a,b){var c=this.rect,d=this.outRect,e=this.direction,f=d.width-c.width-c.left,g=-c.left,h=d.height-c.height-c.top,i=-c.top,j=this.isQuadrant;(a>f&&j(e,1,4)||g>a&&j(e,2,3)||b>h&&j(e,3,4)||i>b&&j(e,1,2))&&(e=180+e),a>f&&j(e,1,4)&&(a=f-(a-f),b=-this.getY(a)),g>a&&j(e,2,3)&&(a=g-a,b=-this.getY(a)),b>h&&j(e,3,4)&&(b=2*h-b,a=this.getX(-b)),i>b&&j(e,1,2)&&(b=i-b,a=this.getX(-b)),this.x=a,this.y=b,this.direction=e},a.prototype.getNormalArray=function(a,b,c){var d=this.rect,e=this.outRect,f=50,g=-d.width,h=e.width,i=-d.height,j=e.height;if(0===c||180===c)return i>=b||b>=j?null:[{x:-d.width-f,y:b},{x:e.width+f,y:b}];if(90===c||270===c){if(g>=a||a>=h)return;return[{x:a,y:-d.height-f},{x:a,y:e.height+f}]}var k=[],l={x:this.getX(d.height),y:-d.height};l.x>g&&l.xg&&m.xi&&n.yi&&o.yi.y?(a=h.x,c=h.y,g=!0):f(e,2,3)&&ai.x&&(a=h.x,c=h.y,g=!0),this.x=a,this.y=c,g&&(this.start=b(),this.onIteration&&this.onIteration())}},a.prototype.getX=function(a){return(a- -this.y)/Math.tan(this.direction/180*Math.PI)+this.x},a.prototype.getY=function(a){return(a-this.x)*Math.tan(this.direction/180*Math.PI)+-this.y},a.prototype.isQuadrant=function(a,b,c){return a>=90*(b-1)&&90*b>a||a>=90*(c-1)&&90*c>a?!0:!1},a.prototype.destroy=function(){this.animation&&(this.animation.destroy(),this.animation=null)},a}(),o=function(){function a(){}return a.random=function(a,b,c){return b=b||0,parseFloat((Math.random()*((a||1)-b)+b).toFixed(void 0===c?2:c))},a.randomPlusMinus=function(){return Math.random()>.5?-1:1},a.mixin=function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(a[d]=c[d]||b[d]);return a},a.parseColor=function(b){if("string"==typeof b){b=b.trim().toLowerCase();var c;if(c=a.COLOR_TABLE[b])return"rgba("+c[0]+","+c[1]+","+c[2]+",";var d,e,f;if("#"===b[0])return 4===b.length?(d=parseInt(b[1]+b[1],16),e=parseInt(b[2]+b[2],16),f=parseInt(b[3]+b[3],16)):(d=parseInt(b.substr(1,2),16),e=parseInt(b.substr(3,2),16),f=parseInt(b.substr(5,2),16)),"rgba("+d+","+e+","+f+",";var g;if(g=b.match(/([\d\-\.e]+)/gi))return"rgba("+ +g[0]+","+ +g[1]+","+ +g[2]+","}return"rgba(255,255,255,"},a.createElement=function(a,b,c){var d=document.createElement(a);b&&(d.className="mb--"+b);var e=d.style;for(var f in c)e[f]=c[f];return d},a.COLOR_TABLE={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],grey:[128,128,128],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[0,0,0,0]},a}(),p=function(){function a(a,b,c){"undefined"==typeof b&&(b={}),"undefined"==typeof c&&(c={});var d=this;this.container=a,this.options=o.mixin({},c,b),window.addEventListener("resize",this.eventListener=function(){d.resize()})}return a.prototype.destroy=function(){var a=this.container;if(window.removeEventListener("resize",this.eventListener),this.dataSelector)for(var b=a.querySelectorAll(this.dataSelector),c=0;cg;g++)b.appendChild(this.style(f.cloneNode(!0),g,e))}return q(b,a),b.prototype.style=function(a){return a},b.prototype.template=function(){return document.createElement("div")},b}(p),s=function(a){function b(b,c){a.call(this,b,c,{num:b.offsetWidth*b.offsetHeight/2e4}),this.dataSelector=".mb--air-bubble"}return q(b,a),b.prototype.style=function(a){a.className="mb--air-bubble";var b=a.style,c=g(28,7,0);b.left=g(100)+"%",b.height=b.width=c+"px";var f=g(10),h=g(10,3);return d(a,"animation",e("mbBubbleRise %ts ease-in %ds infinite",h,f)),a.addEventListener("mouseover",function(){d(a,"animation","bubbleExpolre .1s ease-in-out"),setTimeout(function(){d(a,"animation",e("mbBubbleRise %ts ease-in infinite",h))},1e3)},!1),a},b}(r);a.AirBubble=s;var t=function(a){function b(b,c){a.call(this,b,c),this.dataSelector=".mb--an-bubble";for(var d,e=0;10>e;e++)d=document.createElement("div"),d.className="mb--an-bubble",d.id="mb--an-bubble-"+(e+1),d.style.webkitAnimation=d.style.animation="mbAnBubbleMove "+(o.random(20)+10)+"s infinite "+o.random()+"s alternate linear",b.appendChild(d)}return q(b,a),b}(p);a.AnBubble=t;var u=function(){function a(a){this.container=a;var b=a.offsetWidth,c=a.offsetHeight;this.width=b,this.height=c;for(var d,e=b*c/1e4,f=0;e>f;f++)d=this.createStar(),a.appendChild(d)}return a.prototype.createStar=function(){var b=c("div");b.className=e("mb--blinkStar %c-star",a.colors[~~g(a.colors.length)]);var f=c("div");f.className="star--child",b.appendChild(f);var h=b.style;h.top=g(100)+"%",h.left=g(100)+"%";var i=~~g(10,6)+"px";return h.width=h.height=i,h.opacity=g(1,.5),d(b,"animation-delay",g(10)+"s"),b},a.colors=["navy","blue","aqua","teal","olive","green","lime","yellow","orange","red","maroon","fuchsia","purple"],a}();a.BlinkStar=u;var v=function(){function a(a,b){if(this.container=a,this.options={direction:"right"},b)for(var c in b)this.options[c]=b[c];this.init()}return a.prototype.init=function(){for(var a,b=this.container,c=this.options.direction,d=b.offsetWidth,e=b.offsetHeight,f=d*e/2e5,h=0;f>h;h++)a=this.getCloud(),b.appendChild(a),new n({node:a,mode:"normal",direction:c,speed:g(80,30),x:this.getInitX(c,d,a.offsetWidth),y:this.getInitY(c,e,a.offsetHeight),zoomfrom:g(.6,.3)})},a.prototype.getInitX=function(a,b,c){var d=0,e=b-c;return"left"===a?g(e+1e3,d):"right"===a?g(e,-1e3):g(e,d)},a.prototype.getInitY=function(a,b,c){var d=0,e=b-c;return"top"===a?g(e+1e3,d):"bottom"===a?g(e,-1e3):g(e,d)},a.prototype.getCloud=function(){var a=c("div");a.className="mb--cloud01";var b=c("div");return b.className="mb--cloud01-container",b.appendChild(a),b},a.prototype.destroy=function(){},a}();a.Cloud01=v,a.CloudsRight01=v;var w=function(){function a(a){new v(a,{direction:"left"})}return a}();a.CloudsLeft01=w;var x=function(){function a(a){new v(a,{direction:"top"})}return a}();a.CloudsTop01=x;var y=function(){function a(a){new v(a,{direction:"bottom"})}return a}();a.CloudsBottom01=y;var z=function(a){function b(b,c){a.call(this,b,c)}return q(b,a),b.prototype.init=function(){for(var a,b=this.container,c=this.options.direction,d=b.offsetWidth,e=b.offsetHeight,f=d*e/2e5,h=0;f>h;h++)a=this.getCloud(),b.appendChild(a),new n({node:a,mode:"normal",direction:c,speed:g(80,30),x:this.getInitX(c,d,a.offsetWidth),y:this.getInitY(c,e,a.offsetWidth),zoomform:.5})},b.prototype.getCloud=function(){var a=(this.container,c("div"));return a.className=e("mb--cloud mb--cloud-%s",~~(3*Math.random())+1),a},b}(v);a.Cloud02=z,a.CloudsRight02=z;var A=function(){function a(a){new z(a,{direction:"left"})}return a}();a.CloudsLeft02=A;var B=function(){function a(a){new z(a,{direction:"top"})}return a}();a.CloudsTop02=B;var C=function(){function a(a){new z(a,{direction:"bottom"})}return a}();a.CloudsBottom02=C;var D="./style/mb_icon/",E=function(){function a(a,b){if(this.options={speed:30},b)for(var d in b)this.options[d]=b[d];var e=c("div");e.className="mb-cloud3-wrapper",a.appendChild(e);var f=new m({src:D+"bg-clouds.png",speed:this.options.speed,direction:"left"});f.onload=function(){e.style.height=this.imgHeight+"px",this.container=e,this.startMoving()};var g=c("div");g.className="air-balloon";var h=g.cloneNode();g.style.left="10%",g.className+=" air-balloon1",h.style.right="10%",h.className+=" air-balloon2",a.appendChild(g),a.appendChild(h)}return a}();a.Cloud3=E;var F=(function(){function a(){}return a}(),function(a){function b(b,c,d){a.call(this,b,c,d),this.dataSelector=".mb--canvas"}return q(b,a),b.prototype.resize=function(){var a=this.canvas,b=this.container;this.width=a.width=b.offsetWidth,this.height=a.height=b.offsetHeight},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.canvas=null},b}(p)),G=function(a){function b(c,d){a.call(this,c,d,b.options),this.particles=[],this.updateParticles=function(){for(var a=this.particles.length;a--;){var b=this.particles[a],c=b.angle*Math.PI/180,d=Math.cos(c)*b.speed,e=Math.sin(c)*b.speed;b.speed*=b.friction,b.coordLast[2].x=b.coordLast[1].x,b.coordLast[2].y=b.coordLast[1].y,b.coordLast[1].x=b.coordLast[0].x,b.coordLast[1].y=b.coordLast[0].y,b.coordLast[0].x=b.x,b.coordLast[0].y=b.y,b.x+=d,b.y+=e,b.y+=b.gravity,b.angle+=b.wind,b.alpha-=b.decay,(!this.removable(0,0,this.width,this.height,b.x-b.radius,b.y-b.radius,2*b.radius,2*b.radius)||b.alpha<.05)&&this.particles.splice(a,1)}},this.fireworks=[];var e=this.canvas=document.createElement("canvas");e.width=this.width=c.offsetWidth,e.height=this.height=c.offsetHeight,c.appendChild(e),this.context=e.getContext("2d"),this.refreshCanvas()}return q(b,a),b.prototype.removable=function(a,b,c,d,e,f,g,h){return!(e>a+c||a>e+g||f>b+d||b>f+h)},b.prototype.createParticles=function(a,b,c){for(var d=this.options,e=o.random,f=d.num,g=d.speed,h=d.speedVariance,i=d.gravity,j=d.hueVariance,k=d.friction,l=d.wind,m=d.lineWidth;f--;)this.particles.push({x:a,y:b,coordLast:[{x:a,y:b},{x:a,y:b},{x:a,y:b}],angle:e(0,360),speed:e(0>=g-h?1:-h,g+h),friction:1-k/100,gravity:i/2,hue:e(c-j,c+j),brightness:e(50,80),alpha:e(40,100)/100,decay:e(10,50)/1e3,wind:(e(0,l)-l/2)/25,lineWidth:m})},b.prototype.drawParticles=function(){for(var a,b,a,c=this.particles,d=o.random,e=this.context,f=this.options,g=c.length,h=f.flickerDensity,i=50-h,j=d(50,100)/100;g--;)a=c[g],e.beginPath(),b=~~(d(1,3)-1),e.moveTo(Math.round(a.coordLast[b].x),Math.round(a.coordLast[b].y)),e.lineTo(Math.round(a.x),Math.round(a.y)),e.closePath(),e.strokeStyle="hsla("+a.hue+", 100%, "+a.brightness+"%, "+a.alpha+")",e.stroke(),h>0&&d(0,i)===i&&(e.beginPath(),e.arc(Math.round(a.x),Math.round(a.y),d(a.lineWidth,a.lineWidth+3)/2,0,2*Math.PI,!1),e.closePath(),e.fillStyle="hsla("+a.hue+", 100%, "+a.brightness+"%, "+j+")",e.fill())},b.prototype.createFireworks=function(a,b,c,d){var e=this.fireworks;if(!(e.length>8)){var f=this.options,g=o.random;e.push({x:a,y:b,startX:a,startY:b,hitX:!1,hitY:!1,coordLast:[{x:a,y:b},{x:a,y:b},{x:a,y:b}],targetX:c,targetY:d,speed:f.fworkSpeed,angle:Math.atan2(d-b,c-a),shockwaveAngle:Math.atan2(d-b,c-a)+90*(Math.PI/180),acceleration:f.fworkAccel/100,hue:f.currentHue,brightness:g(50,80),alpha:g(50,100)/100,lineWidth:f.lineWidth})}},b.prototype.updateFireworks=function(){for(var a=this.fireworks,b=a.length,c=this.context;b--;){var d=a[b];c.lineWidth=d.lineWidth;var e=Math.cos(d.angle)*d.speed,f=Math.sin(d.angle)*d.speed;d.speed*=1+d.acceleration,d.coordLast[2].x=d.coordLast[1].x,d.coordLast[2].y=d.coordLast[1].y,d.coordLast[1].x=d.coordLast[0].x,d.coordLast[1].y=d.coordLast[0].y,d.coordLast[0].x=d.x,d.coordLast[0].y=d.y,d.startX>=d.targetX?d.x+e<=d.targetX?(d.x=d.targetX,d.hitX=!0):d.x+=e:d.x+e>=d.targetX?(d.x=d.targetX,d.hitX=!0):d.x+=e,d.startY>=d.targetY?d.y+f<=d.targetY?(d.y=d.targetY,d.hitY=!0):d.y+=f:d.y+f>=d.targetY?(d.y=d.targetY,d.hitY=!0):d.y+=f,d.hitX&&d.hitY&&(this.createParticles(d.targetX,d.targetY,d.hue),this.fireworks.splice(b,1))}},b.prototype.drawFireworks=function(){var a,b,c=this.fireworks,d=this.context,e=o.random,f=c.length;for(d.globalCompositeOperation="lighter";f--;)b=c[f],d.lineWidth=b.lineWidth,a=~~(e(1,3)-1),d.beginPath(),d.moveTo(Math.round(b.coordLast[a].x),Math.round(b.coordLast[a].y)),d.lineTo(Math.round(b.x),Math.round(b.y)),d.closePath(),d.strokeStyle="hsla("+b.hue+", 100%, "+b.brightness+"%, "+b.alpha+")",d.stroke()},b.prototype.refreshCanvas=function(){var a=this;this.animate=new k(function(){var b=Math.random();if(b>.5&&.54>b){var c=o.random,d=c(a.width),e=a.options;e.currentHue=~~c(e.hueMin,e.hueMax),a.createFireworks(d,a.height,c(d,d+100*o.randomPlusMinus()),150+100*Math.random())}var f=a.context;f.globalCompositeOperation="destination-out",f.fillStyle="rgba(0,0,0,0.25)",f.fillRect(0,0,a.width,a.height),a.updateFireworks(),a.updateParticles(),a.drawFireworks(),a.drawParticles()},this)},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animate.destroy(),this.animate=null,this.context=null},b.options={currentHue:30,flickerDensity:25,friction:5,fworkAccel:10,fworkSpeed:4,gravity:1,hueMax:360,hueMin:0,hueVariance:30,lineWidth:1,num:150,speed:5,speedVariance:10,wind:50},b}(F);a.Firework1=G;var H=function(a){function b(b,c){var d=this;a.call(this,b,c),this.imgLoaded=!1,this.particles=[];var e=this.canvas=document.createElement("canvas");this.context=e.getContext("2d"),e.width=this.width=b.offsetWidth,e.height=this.height=b.offsetHeight,b.appendChild(e);var f=this.bigImg=new Image;f.onload=function(){f=f.onload=null,d.imgLoaded=!0,d.createFireworkPalette(12)},f.src=D+"bigFirework.png",this.render()}return q(b,a),b.prototype.createFireworkPalette=function(a){var b=10*a,c=this.fireworkCanvas=document.createElement("canvas"),d=c.getContext("2d");c.width=c.height=b;var e=document.createElement("canvas");e.width=e.height=a;for(var f=e.getContext("2d"),g=0;100>g;g++){f.clearRect(0,0,a,a),f.globalCompositeOperation="source-over",f.drawImage(this.bigImg,0,0),f.globalCompositeOperation="source-out",f.fillStyle="hsl("+Math.round(3.6*g)+",100%,60%)",f.fillRect(0,0,a,a);var h=g*a;d.drawImage(f.canvas,h%b,Math.floor(h/b)*a)}},b.prototype.render=function(){var a=this;this.animate=new k(function(){if(a.imgLoaded){var b=Math.random();b>.5&&.55>b&&a.createParticle(),a.draw()}},this)},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animate.destroy(),this.bigImg.onload=null,this.bigImg=null,this.context=null,this.fireworkCanvas=null,this.particles=null},b.prototype.draw=function(){var a=this.context,b=this.particles;a.globalCompositeOperation="destination-out",a.fillStyle="rgba(0,0,0,.2)",a.fillRect(0,0,this.width,this.height);for(var c=b.length;c--;){var d=b[c];d.update()?(b.splice(c,1),d.usePhysics||(Math.random()<.8?this.star(d):this.circle(d))):d.render(a,this.fireworkCanvas)}},b.prototype.createParticle=function(a,b,c,d,e){a=a||{},b=b||{},c=c||{};var f=150+100*Math.random(),g=3*Math.random()-1.5,h=12*Math.floor(100*Math.random()),i=o.random;this.particles.push(new Z({x:a.x||i(this.width),y:(a.y||this.height+10)-2},{y:b.y||f},{x:c.x||g,y:c.y||0},d||h,e))},b.prototype.circle=function(a){for(var b=100,c=2*Math.PI/b;b--;){var d=4+4*Math.random(),e=b*c;this.createParticle(a.pos,null,{x:Math.cos(e)*d,y:Math.sin(e)*d},a.color,!0)}},b.prototype.star=function(a){var b=6+Math.round(15*Math.random()),c=3+Math.round(7*Math.random()),d=10,e=80,f=-(3*Math.random()-6),g=0,h=0,i=2*Math.PI,j=Math.random()*i;do{g=h,h=(h+c)%b;for(var k=g/b*i-j,l=(g+c)/b*i-j,m={x:a.pos.x+Math.cos(k)*e,y:a.pos.y+Math.sin(k)*e},n={x:a.pos.x+Math.cos(l)*e,y:a.pos.y+Math.sin(l)*e},o={x:n.x-m.x,y:n.y-m.y,a:l-k},p=0;d>p;p++){var q=p/d,r=k+q*o.a;this.createParticle({x:m.x+q*o.x,y:m.y+q*o.y},null,{x:Math.cos(r)*f,y:Math.sin(r)*f},a.color,!0)}}while(0!==h)},b}(F);a.Firework2=H;var I=function(a){function b(b,c){var d=this;a.call(this,b,c),this.imgLoaded=!1,this.canvasWidth=512,this.canvasHeight=256,this.dataArray=[],this.count=0,this.lastTime=0,this.duration=4e3,this.variance={speed:3,ls:0,x:0,lx:0,y:0,ly:0,rotate:0,lr:0};var e=(this.width=b.offsetWidth,this.height=b.offsetHeight,this.canvas=document.createElement("canvas")),f=e.width=this.canvasWidth,g=e.height=this.canvasHeight;e.style.width=f+"px",e.style.height=g+"px",e.style.webkitTransformOrigin=e.style.transformOrigin="0 0",e.className="mb--canvas",this.resize(),b.appendChild(e),this.context=e.getContext("2d");var h=this.img=new Image;h.onload=function(){h=h.onload=null,d.imgLoaded=!0,d.createData()},h.src=D+"fog.png";var i=e.cloneNode(!1);this.fogContext=i.getContext("2d"),this.animate=new k(this.render,this)}return q(b,a),b.prototype.resize=function(){var a,b=this.width=this.container.offsetWidth,c=this.height=this.container.offsetHeight,d=this.canvasWidth,e=this.canvasHeight,f=0,g=0,h=b/d,i=c/e;h>i?(a=h,g=(c-a*e)/2):(a=i,f=(b-a*d)/2),this.canvas.style.webkitTransform=this.canvas.style.transform="translate("+f+"px, "+g+"px)scale("+a+")"},b.prototype.drawFog=function(a,b,c){if(this.imgLoaded){var d=this.fogContext,e=this.canvasWidth,f=this.canvasHeight;d.clearRect(0,0,e,f);for(var g,h=e>>1,i=f>>1,j=this.dataArray,k=0;k=l?l:1.2-l/2;if(0>m){if(++this.count<1e11){g=j[k]=this.newData();var l=(500+g.z)/500,m=1>=l?l:1.2-l/2}}else{d.globalAlpha=g.a*m/2;var n=~~(this.img.width*l),o=~~(this.img.height*l);if(g.z+=g.v*a,g.x+=b,g.y+=c,!(2>n||2>o)){var p=-1500/(-1500+g.z),q=n>>1,r=o>>1,s=p*g.x+h-q,t=p*g.y+i-r;s>=e-q||-q>s||t>=f-r||-r>t||d.drawImage(this.imgCanvas,0,0,this.img.width,this.img.height,s,t,n,o)}}}}},b.prototype.newData=function(){var a=20,b=this.canvasWidth;return{x:Math.round(Math.random()*b)-(b>>1),y:Math.round(Math.random()*a)-(a>>1),z:-500,v:5*Math.random()+5,a:.2*Math.random()+.8}},b.prototype.createData=function(){var a=this.img,b=this.imgCanvas=document.createElement("canvas");b.getContext("2d").drawImage(a,0,0);for(var c=0;40>c;c++)this.dataArray.push(this.newData());for(c=0;100>c;c++)this.drawFog(3,0,0)},b.prototype.quad=function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},b.prototype.render=function(){var a=this.context,b=this.canvasWidth,c=this.canvasHeight;a.save(),a.globalCompositeOperation="source-over",a.globalAlpha=.5,a.fillStyle="rgba(0,0,0,.05)",a.fillRect(0,0,b,c);var d=(new Date).getTime(),e=d-this.lastTime,f=this.duration,g=this.variance;e>f&&(this.lastTime=d,g.ls=g.speed,g.speed=3*Math.random()+2,g.lx=g.x,g.x=4*Math.random()-2,g.ly=g.y,g.y=.625*Math.random()-.25,g.lr=g.rotate,g.rotate=.4*Math.random()-.2,e=0);var h=this.quad;this.drawFog(h(0,e,g.ls,g.speed-g.ls,f),h(0,e,g.lx,g.x-g.lx,f),h(0,e,g.ly,g.y-g.ly,f));var i=h(0,e,g.lr,g.rotate-g.lr,f),j=1+Math.abs(i)/.2*.3,k=b>>1,l=c>>1;a.translate(k,l),a.scale(j,j),a.rotate(i),a.translate(-k,-l),a.drawImage(this.fogContext.canvas,0,0),a.restore()},b}(F);a.Fog=I;var J=function(a){function b(b,d){var e=this;a.call(this,b,d,{}),this.colorSpeed=50,this.gradients=[],this.circles=[];var f=c("canvas");f.className="mb--canvas",f.width=this.width=b.offsetWidth,f.height=this.height=b.offsetHeight,b.appendChild(f),this.canvas=f,this.randomColor(),this.init(),window.addEventListener("resize",function(){e.init()},!1),new k(this.start,this)}return q(b,a),b.prototype.start=function(a,b){this.update(a,b),this.draw()},b.prototype.init=function(){this.createCircles()},b.prototype.randomColor=function(){this.color=[g(255),g(255),g(255)];for(var a=0;1>a;a++)this.gradients.push({stop:g(),opacity:g(),r:g(255),g:g(255),b:g(255)})},b.prototype.createCircles=function(){var a=this.circles,b=a.length,c=~~(this.width*this.height/2e4);if(c>b)for(var d=b;c>d;d++)a.push(this.newCircle(!0));b>c&&a.splice(c)},b.prototype.newCircle=function(a){return{x:g(this.width),y:a?g(this.height):this.height+20,radius:g(20,1),opacity:g(.7,.1),speed:g(30,1)}},b.prototype.draw=function(){var a=this.canvas.getContext("2d");a.clearRect(0,0,this.width,this.height),this.drawCircles(a),this.drawGrandient(a)},b.prototype.drawCircles=function(a){for(var b,c=this.circles,d=c.length,e=0;d>e;e++)b=c[e],a.beginPath(),a.arc(b.x,b.y,b.radius,0,2*Math.PI,!1),a.closePath(),a.fillStyle="rgba(255,255,255,"+b.opacity+")",a.fill()},b.prototype.drawGrandient=function(a){var b=a.createLinearGradient(0,0,0,this.height),c=~~f(this.color[0],0,255),d=~~f(this.color[1],0,255),h=~~f(this.color[2],0,255);b.addColorStop(0,e("rgba(%r,%g,%b,0)",c,d,h)),b.addColorStop(1,e("rgba(%r,%g,%b,1)",c,d,h));for(var i=0;ih;h++){c=e[h];var i=c.y-d*c.speed;i<=-c.radius?(e.splice(h,1),f--):c.y=i}this.color[0]+=g(2),this.color[1]+=g(2),this.color[2]+=g(2),g()>.99&&this.circles.push(this.newCircle())},b}(F);a.Gradient=J;var K=function(){function a(a,b){if(this.container=a,this.options={type:1},b)for(var d in b)this.options[d]=b[d];for(var e,f=this.width=a.offsetWidth,g=this.height=a.offsetHeight,h=this.num=this.options.num||f*g/1e5,i=0;h>i;i++)e=c("div"),this.style(e),a.appendChild(e)}return a.prototype.style=function(a){var b=this.width;a.className=e("mb--leave mb--leave-%t mb--leave-falling%i",this.options.type,~~g(10)+1);var f=a.style;f.left=g(-50,b+25)+"px",d(a,"animation-delay",g(10)+"s"),d(a,"transform",e("scale(%s)rotate(%rdeg)",g(.8,.5),g(360))),a.addEventListener("animationiteration",function(){f.left=g(-50,b+25)+"px",d(a,"transform",e("scale(%s)rotate(%rdeg)",g(.8,.5),g(360)))},!1);var h=c("div");return h.className=e("mb--leave-bg-%i mb--leave-%t%i",~~g(3)+1,g()>.5?"sway":"flip",~~g(10)+1),h.addEventListener("animationiteration",function(a){return a.stopPropagation(),!1},!1),a.appendChild(h),a},a}(),L=function(a){function b(b){a.call(this,b,{type:1})}return q(b,a),b}(K);a.Leaves01=L;var M=function(a){function b(b){a.call(this,b,{type:2})}return q(b,a),b}(K);a.Leaves02=M;var N=function(a){function b(b){a.call(this,b,{type:3})}return q(b,a),b}(K);a.Leaves03=N;var O=function(a){function b(b){a.call(this,b,{type:4})}return q(b,a),b}(K);a.Leaves04=O;var P=function(a){function b(b){a.call(this,b,{type:5})}return q(b,a),b}(K);a.Leaves05=P;var Q=function(){function a(a,b){var d=this;this.container=a,this.color=[130,22,33],this.colorRange=[-.8,.8],this.speed=2e-4,this.xRange=.8,this.yRange=.1,this.colorSpeed=1e-4,this.shift=0,this.cshift=0;var e=c("canvas");e.className="mb--meshes mb--canvas",a.appendChild(e),this.canvas=e;for(var f in b)this[f]=b[f];this.resize(),this.init(),this.start(),window.addEventListener("resize",function(){d.resize(),d.init()},!1)}return a.prototype.resize=function(){var a=this.canvas,b=this.container,c=b.offsetWidth,d=b.offsetHeight;a.width=c,a.height=d,this.width=c,this.height=d},a.prototype.init=function(){for(var a=Math.max(this.width,1244),b=Math.max(this.height,800),c=-.25*a,d=-.25*b,e=12,f=6,h=1.5*a/e,i=1.5*b/f,j=[],k=[],l=[],m=0;e>=m;m++){k.push([]);for(var n=0;f>=n;n++){var o=c+m*h,p=d+n*i;k[m].push({anchor:[o,p],position:[o,p],step:[g(.2,1),g(.2,1)],time:g(.2,2*Math.PI)}),l.push(k[m][n])}}for(var q,r,s,t,j=[],u=this.colorRange,v=0;e>v;v++)for(var w=0;f>w;w++)q=k[v+0][w+0],r=k[v+0][w+1],s=k[v+1][w+0],t=k[v+1][w+1],j.push([q,r,s,g(u[0],u[1])]),j.push([r,s,t,g(u[0],u[1])]);this.vectors=l,this.triangles=j,this.xRange=this.xRange*h,this.yRange=this.yRange*i},a.prototype.start=function(){new k(this.render,this)},a.prototype.render=function(a,b){for(var c=a-b,d=this.shift+=this.speed*c,e=this.xRange,g=this.yRange,h=this.vectors,j=h.length-1;j>=0;j--){var k=h[j],l=Math.sin(k.time+k.step[0]*d),m=Math.cos(k.time+k.step[1]*d);k.position=[e*l+k.anchor[0],g*m+k.anchor[1]]}var n,o,p,q=this.triangles,r=this.context,s=this.cshift+=this.colorSpeed*c,t=this.colorRange,u=t[0],v=t[1],p=this.color,w=p[0],x=p[1],y=p[2];r||(r=this.canvas.getContext("2d"),this.context=r),r.clearRect(0,0,this.width,this.height);for(var j=q.length-1;j>=0;j--)n=q[j],r.lineWidth=1,r.lineJoin="round",o=f(n[3]+s,u,v),p=i(w,x,y,o),r.fillStyle=r.strokeStyle=p,r.beginPath(),r.moveTo(n[0].position[0],n[0].position[1]),r.lineTo(n[1].position[0],n[1].position[1]),r.lineTo(n[2].position[0],n[2].position[1]),r.closePath(),r.fill(),r.stroke()},a}();a.Meshes=Q;var R=function(){function a(a){this.container=a;var b=a.offsetWidth,c=a.offsetHeight;this.width=b,this.height=c,this.init()}return a.prototype.init=function(){var a=60,b=270-a;new k(function(){if(g()<.02){var c=this.container,d=this.createMeteor();c.appendChild(d);var e=new n({node:d,mode:"normal",direction:b,speed:g(2e3,100),x:g(1.5*this.width,0),y:.2*-this.height,rotatefrom:a});e.onIteration=function(){e.destroy(),c.removeChild(d)}}},this)},a.prototype.createMeteor=function(){var a=c("div");return a.className="mb--meteor",a.style.height=~~g(350,150)+"px",a.style.width=~~g(4,2)+"px",a},a}();a.Meteor=R;var S=function(){function a(a){this.container=a;var b=c("div");b.className="mb--moon";var d=c("div");d.className="moon--picture",b.appendChild(d),a.appendChild(b);new m({src:D+"moon_cloud_three.png",speed:60,direction:"left",container:b}),new m({src:D+"moon_cloud_two.png",speed:40,direction:"left",container:b}),new m({src:D+"moon_cloud_one.png",speed:20,direction:"left",container:b})}return a}();a.Moon=S;var T=function(a){function b(d,e){var f=this;a.call(this,d,e,b.options),this.container=d,this.options=e,this.particle="#ccc",this.line="#ccc",this.lines=[];var g=c("canvas");g.className="mb--canvas",g.width=this.width=d.offsetWidth,g.height=this.height=d.offsetHeight,this.canvas=g,d.appendChild(g),this.init(),window.addEventListener("resize",function(){f.init()},!1),new k(this.start,this)}return q(b,a),b.prototype.init=function(){var a=this.canvas.getContext("2d");a.lineWidth=.2,a.fillStyle=this.particle,a.strokeStyle=this.line;for(var b=this.particles=[],c=this.width,d=this.height,e=0;c*d/12e3>e;e++)b.push({direction:g(360,0,0),x:g(c,0,0),y:g(d,0,0),speedX:g(20,2),speedY:g(20,2)})},b.prototype.update=function(a){for(var b,c=this.particles,d=c.length,e=0;d>e;e++)b=c[e],this.updatePosition(a,b)},b.prototype.absDeg=function(a){return 0>a&&(a+=360),a%360},b.prototype.updatePosition=function(a,b){var c=b.x+a/1e3*b.speedX*Math.cos(b.direction/180*Math.PI),d=b.y-a/1e3*b.speedY*Math.sin(b.direction/180*Math.PI),e={width:7,height:7,left:b.x,top:b.y},f={width:this.width,height:this.height},g=b.direction,i=f.width-e.width/2,j=e.width/2,k=f.height-e.height/2,l=e.height/2,m=g;(c>i&&h(g,1,4)||j>c&&h(g,2,3))&&(m=this.absDeg(180-g)),(d>k&&h(g,3,4)||l>d&&h(g,1,2))&&(m=this.absDeg(360-g)),c>i&&h(g,1,4)&&(c=i),j>c&&h(g,2,3)&&(c=j),d>k&&h(g,3,4)&&(d=k),l>d&&h(g,1,2)&&(d=l),b.x=c,b.y=d,b.direction=m },b.prototype.draw=function(){function a(a){g.arc(a.x,a.y,3.5,0,2*Math.PI,!1),g.fill()}function b(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}function c(a,c){for(var d,h=c;f>h;h++)d=e[h],g.beginPath(),b(a,d)<100&&(g.moveTo(a.x,a.y),g.lineTo(d.x,d.y)),g.closePath(),g.stroke()}var d,e=this.particles,f=e.length,g=this.canvas.getContext("2d");g.clearRect(0,0,this.width,this.height);for(var h=0;f>h;h++)d=e[h],a(d),c(d,h)},b.prototype.start=function(a,b){var c=a-b;this.update(c),this.draw()},b.options={particle:"#ccc",line:"#ccc"},b}(F);a.Particules=T;var U=function(){function a(a,b){var d=this;if(this.container=a,this.clouds=[],this.thunderCouter=0,this.changed=!0,this.topArray=[],this.top_amount=0,this._rain="heavy",b)for(var e in b)this[e]=b[e];var f=c("canvas");f.className="mb--canvas",this.canvas=f,a.appendChild(f),this.resize(),this.initIMGData();for(var g=0;20>g;g++)this.clouds.push(this.newCloud());var h=new Image;h.onload=function(){h.onload=null;var a=h.width,b=h.height,e=c("canvas");e.width=a,e.height=b,e.getContext("2d").drawImage(h,0,0),d.cloudData={canvas:e,width:a,height:b}},h.src=D+"c2.png";var i=new Image;i.onload=function(){i.onload=null;var a=i.width,b=i.height,e=c("canvas");e.width=a,e.height=b,e.getContext("2d").drawImage(i,0,0),d.thunder={canvas:e,width:a,height:b}},i.src=D+"thunder.png",window.addEventListener("resize",function(){d.resize()},!1),new k(this.rainning,this)}return a.prototype.newCloud=function(){return{x:g(1.5,-.5)*this.width,y:g(0,-this.height),s:g(3,1),o:.5,dx:j()*g(.1),dy:j()*g(.1),ds:g(.1),"do":g(.01)}},a.prototype.resize=function(){var a=this.container,b=a.offsetWidth,c=a.offsetHeight;this.height=c,this.width=b,this.canvas.width=b,this.canvas.height=c},a.prototype.initIMGData=function(){var a=this,b=new Image;b.onload=function(){b.onerror=b.onload=null;var d=b.width,e=b.height,f=c("canvas");f.width=d,f.height=e;var g=f.getContext("2d");g.drawImage(b,0,0),a.imgData={canvas:f,width:d,height:e}},b.onerror=function(){b.onerror=b.onload=null,console.warn("MB:error:raindrop img error")},b.src=D+"raindrop.png"},a.prototype.rainning=function(a,b){var c=this,d=this.width,e=this.height,f=this.context;f||(f=this.canvas.getContext("2d")),f.clearRect(0,0,d,e);var h=this.cloudData;if(h){for(var i,j,k,l,m,n,o,p=this.clouds,q=h.canvas,r=h.width,s=h.height,t=0;t=l?(p[t]=this.newCloud(),g()>.9&&(this.thunderCouter=1,setTimeout(function(){c.thunderCouter=0},300))):(m=r*k,n=s*k,f.globalAlpha=.05*l,f.drawImage(q,0,0,r,s,i-m/2,j,m,n));if(f.globalAlpha=1,this.thunderCouter&&this.thunder){var u=this.thunder,v=u.width,w=u.height,x=1.5;f.rect(0,0,d,e),f.fillStyle="rgba(255,255,255,.2)",f.fill(),f.drawImage(u.canvas,0,0,v,w,d-v*x,0,v*x,w*x)}}if(this.imgData){this.checkdate();for(var y,j,z=this.imgData,A=z.width,B=z.height,C=(a-b)/1e3,D=this.topArray,E=D.length,F=this.top_amount,t=0;E>t;){if(y=D[t],j=y.y+=y.ys*C,j>e){if(E>F){E--,D.splice(t,1);continue}this.resetData(y)}else j>-B&&f.drawImage(z.canvas,0,0,A,B,y.x,j,A*y.size,B*y.size);t++}}},a.prototype.checkdate=function(){if(this.changed){this.changed=!1;var a,b=this.rain;a="dogs and cats"===b?1e3:"light"===b?5e3:2e3;for(var c=this.width*this.height/a,d=this.topArray,e=d.length;c>e;e++)d.push(this.resetData({}));this.top_amount=c}},a.prototype.resetData=function(a){var b=this.width,c=this.height,d=this.imgData.height;a.x=g(b),a.y=-d-g(c);var e;return a.ys=e=g(500,300),a.size=g(1,.5),a},Object.defineProperty(a.prototype,"rain",{get:function(){return this._rain},set:function(a){var b=["light","heavy","dogs and cats"];b.indexOf(a)>=0&&this._rain!==a&&(this._rain=a,this.changed=!0)},enumerable:!0,configurable:!0}),a}();a.RainDrop=U;var V=function(a){function b(c,d){var e=this;a.call(this,c,d,b.options),this.imgLoaded=!1,this.dataSelector=".mb--canvas";var f=this.canvas=document.createElement("canvas");if(f.className="mb--snow mb--canvas",f.width=this.width=c.offsetWidth,f.height=this.height=c.offsetHeight,c.appendChild(f),this.context=f.getContext("2d"),this.context){var g=this.img=new Image;g.onload=function(){e.imgLoaded=!0,e.createSnowDate()},g.src=D+"snow.png",this.render()}}return q(b,a),b.prototype.getScale=function(a){var b,c=Math.random(),d=Math.random();return b=d>.92?5*c+1:d>.9?3*c+.8:d>.7?c+.6:c/2+.3,a||(d>.99?b=15*c+5:d>.97&&(b=8*c+3)),b},b.prototype.createSnowDate=function(){for(var a,b=this.snows=[],c=this.options.num,d=this.img,e=this.img.width,f=this.img.height,g=0;c>g;g++)a=this.getScale(!0),b.push({x:Math.random()*this.width,xi:o.randomPlusMinus()*a*.2,y:Math.random()*this.height,yi:.5*a,w:e*a,h:f*a});var h=this.snowCanvas=document.createElement("canvas");h.width=e,h.height=f,h.getContext("2d").drawImage(d,0,0)},b.prototype.render=function(){var a=this;this.animate=new k(function(){if(a.imgLoaded){var b,c,d=a.context,e=a.snows,f=a.options.num,g=a.width,h=a.height,i=a.img,j=i.width,k=i.height;d.clearRect(0,0,g,h);for(var l=0;f>l;l++)b=e[l],d.drawImage(a.snowCanvas,b.x,b.y,b.w,b.h),b.x+=b.xi,b.y+=b.yi,b.y>h+b.h&&(b.y=-b.h,c=a.getScale(),b.w=j*c,b.h=k*c,b.xi=o.randomPlusMinus()*c*.2,b.yi=.5*c),b.x>g+b.w?b.x=-b.w:b.x<-b.w&&(b.x=g+b.w)}},this)},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animate.destroy(),this.img.onload=null,this.img=null,this.context=null},b.options={num:500},b}(F);a.Snow=V;var W=function(a){function b(c,d){a.call(this,c,d,b.options),this.draw(c)}return q(b,a),b.prototype.draw=function(a){var b=200,c=a.offsetWidth,d=a.offsetHeight,e=this.options,f=e.x,g=e.y,h=this.parseParam(f,c),i=this.parseParam(g,d),j=this.canvas;j||(j=this.canvas=document.createElement("canvas")),j.className=".mb--canvas";var k=this.maxRadius(c,d,h,i);j.width=j.height=k;var l=j.style;l.position="absolute",l.left=h-k/2+"px",l.top=i-k/2+"px",l.webkitAnimation=l.animation="mbSunshine 200s linear infinite";var m=j.getContext("2d"),n=k/2,p=n;m.clearRect(0,0,k,k);var q=Math.min,r=e.size,s=o.parseColor(e.color),t=m.createRadialGradient(n,p,0,n,p,p);t.addColorStop(0,s+"1)"),t.addColorStop(q(.03*r,1),s+"1)"),t.addColorStop(q(.05*r,1),s+"0.8)"),t.addColorStop(q(.1*r+.2,1),s+"0)"),m.fillStyle=t,m.fillRect(0,0,k,k);var u=this.canvas1;u&&a.removeChild(u),u=this.canvas1=j.cloneNode(!1),u.style.webkitAnimation=u.style.animation="mbSunshine 200s linear infinite reverse",a.appendChild(u),a.appendChild(j);var v=u.getContext("2d");v.clearRect(0,0,k,k);for(var w,x,y,z=[m,v],A=0;A=x;)y=~~(2*Math.random()),w.beginPath(),w.moveTo(n,p),w.arc(n,p,Math.sqrt(Math.pow(n,2)+Math.pow(p,2)),2/b*Math.PI*(x-1),2/b*Math.PI*(x+y),!1),w.lineTo(n,p),w.fillStyle=s+(.04*Math.random()+.01)+")",w.fill(),w.closePath(),x+=~~(10*Math.random())+y+2},b.prototype.resize=function(){this.draw(this.container)},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.canvas1=null},b.prototype.parseParam=function(a,b){var c;return c="string"==typeof a&&a.indexOf("~")>=0?b-+a.split("~")[1]:+a},b.prototype.maxRadius=function(a,b,c,d){var e=Math.pow,f=Math.sqrt,g=e(a-c,2),h=e(b-d,2);return 2*Math.max(f(g+e(d,2)),f(e(c,2)+h),f(g+h))},b.options={x:"150",y:"50",size:2,color:"rgb(250,250,250)"},b}(F);a.Sunshine=W;var X=function(){function a(a,b){this.sun=new W(a,b),this.cloud=new z(a,b)}return a.prototype.destroy=function(){this.sun.destroy(),this.cloud.destroy()},a}();a.SunCloud=X;var Y=function(){function a(a,b){this.sun=new W(a,b),this.cloud=new v(a,b)}return a.prototype.destroy=function(){this.sun.destroy(),this.cloud.destroy()},a}();a.SunCloud01=Y;var Z=function(){function a(a,b,c,d,e){var f=this;this.imgLoaded=!1,this.GRAVITY=.06,this.alpha=1,this.easing=.02*Math.random(),this.fade=.1*Math.random(),this.gridX=d%120,this.gridY=12*Math.floor(d/120),this.color=d,this.pos={x:a.x||0,y:a.y||0},this.vel={x:c.x||0,y:c.y||0},this.lastPos={x:this.pos.x,y:this.pos.y},this.target={y:b.y||0},this.usePhysics=e||!1;var g=this.img=new Image;g.onload=function(){g=g.onload=null,f.imgLoaded=!0},g.src=D+"smallFirework.png"}return a.prototype.update=function(){if(this.lastPos.x=this.pos.x,this.lastPos.y=this.pos.y,this.usePhysics)this.vel.y+=this.GRAVITY,this.pos.y+=this.vel.y,this.alpha-=this.fade;else{var a=this.target.y-this.pos.y;this.pos.y+=a*(.03+this.easing),this.alpha=Math.min(a*a*5e-5,1)}return this.pos.x+=this.vel.x,this.alpha<.005},a.prototype.render=function(a,b){if(this.imgLoaded){var c=Math.round(this.pos.x),d=Math.round(this.pos.y);a.save(),a.globalCompositeOperation="lighter",a.globalAlpha=Math.random()*this.alpha,a.drawImage(b,this.gridX,this.gridY,12,12,c-6,d-6,12,12),a.drawImage(this.img,c-3,d-3),a.restore()}},a}()}(MB||(MB={}));