!function(n){var t,e,i,a,o,d,r,h=!0;n("#demo-canvas").length&&(c(),l());function c(){t=window.innerWidth,e=window.innerHeight,r={x:0,y:e},i=document.getElementById("large-header"),i.style.height=e+"px",a=document.getElementById("demo-canvas"),a.width=t,a.height=e,o=a.getContext("2d"),d=[];for(var n=0;n<.5*t;n++){var h=new f;d.push(h)}u()}function l(){window.addEventListener("scroll",s),window.addEventListener("resize",w)}function s(){h=!(document.body.scrollTop>e)}function w(){t=window.innerWidth,e=window.innerHeight,i.style.height=e+"px",a.width=t,a.height=e}function u(){if(h){o.clearRect(0,0,t,e);for(var n in d)d[n].draw()}requestAnimationFrame(u)}function f(){var n=this;!function(){n.pos={},i()}();function i(){n.pos.x=Math.random()*t,n.pos.y=e+100*Math.random(),n.alpha=.1+.3*Math.random(),n.scale=.1+.3*Math.random(),n.velocity=Math.random()}this.draw=function(){n.alpha<=0&&i(),n.pos.y-=n.velocity,n.alpha-=5e-4,o.beginPath(),o.arc(n.pos.x,n.pos.y,10*n.scale,0,2*Math.PI,!1),o.fillStyle="rgba(255,255,255,"+n.alpha+")",o.fill()}}}(jQuery);