=0;i–){var n=o[i];if(p===n.name){return n}}return undefined}function g(){if(k){if(k.getEntriesByType){return k.getEntriesByType(“mark”)}else{if(k.webkitGetEntriesByType){return k.webkitGetEntriesByType(“mark”)}}}return a}return{mark:b,measure:m,gaMarks:a,gaMeasures:d}})();LUX.ns=(Date.now?Date.now():+(new Date()));LUX.ac=[];LUX.cmd=function(a){LUX.ac.push(a)};LUX.init=function(){LUX.cmd([“init”])};LUX.send=function(){LUX.cmd([“send”])};LUX.addData=function(a,b){LUX.cmd([“addData”,a,b])};LUX_ae=[];window.addEventListener(“error”,function(a){LUX_ae.push(a)});LUX_al=[];if(“function”===typeof(PerformanceObserver)&&”function”===typeof(PerformanceLongTaskTiming)){var LongTaskObserver=new PerformanceObserver(function(c){var b=c.getEntries();for(var a=0;aTop Caribbean Musicians for Hire in Baltimore, MD (100% Guaranteed) | GigSalad = 10) { this.colorIncrementer = 0; this.colorIndex++; if (this.colorIndex >= this.colorOptions.length) { this.colorIndex = 0; } } this.colorIncrementer++; return this.colorOptions[this.colorIndex]; } }; function confettiParticle(color) { this.x = Math.random() * W; // x-coordinate this.y = (Math.random() * H) – H; //y-coordinate this.r = RandomFromTo(10, 30); //radius; this.d = (Math.random() * mp) + 10; //density; this.color = color; this.tilt = Math.floor(Math.random() * 10) – 10; this.tiltAngleIncremental = (Math.random() * 0.07) + .05; this.tiltAngle = 0; this.draw = function () { ctx.beginPath(); ctx.lineWidth = this.r / 2; ctx.strokeStyle = this.color; ctx.moveTo(this.x + this.tilt + (this.r / 4), this.y); ctx.lineTo(this.x + this.tilt, this.y + this.tilt + (this.r / 4)); return ctx.stroke(); } } gsConfetti.ThrowThePaper = function() { if (GetCanvas()){ SetGlobals(); InitializeConfetti(); $(window).resize(function () { W = window.innerWidth; H = window.innerHeight; canvas[0].width = W; canvas[0].height = H; }); shouldTimeout && setTimeout(function() { DeactivateConfetti(); }, timeTillStop); } } function GetCanvas() { canvas = $(‘canvas[data-confetti-canvas]’); return canvas && canvas.length > 0; } function SetGlobals() { ctx = canvas[0].getContext(“2d”); W = window.innerWidth; H = window.innerHeight; canvas[0].width = W; canvas[0].height = H; var timeAttribute = canvas[0].getAttribute(‘data-confetti-runtime’); var elementName = canvas[0].getAttribute(‘data-confetti-stop-element’); var eventToStopOn = canvas[0].getAttribute(‘data-confetti-stop-event’); var particleCount = parseInt(canvas[0].getAttribute(‘data-confetti-particle-count’)); if (timeAttribute !== null && typeof timeAttribute !== ‘undefined’) { timeTillStop = timeAttribute; shouldTimeout = true; } if (elementName !== null && typeof elementName !== ‘undefined’) { $(‘body’).on(‘click.confettiStop’, elementName, function() { DeactivateConfetti(); }); } if (eventToStopOn !== null && typeof eventToStopOn !== ‘undefined’) { $(‘body’).on(eventToStopOn, function() { DeactivateConfetti(); }); } if (particleCount !== null && typeof particleCount !== ‘undefined’ && !Number.isNaN(particleCount)) { mp = particleCount; } } function InitializeConfetti() { particles = []; animationComplete = false; for (var i = 0; i < mp; i++) { var particleColor = particleColors.getColor(); particles.push(new confettiParticle(particleColor)); } StartConfetti(); } function Draw() { ctx.clearRect(0, 0, W, H); var results = []; for (var i = 0; i < mp; i++) { (function (j) { results.push(particles[j].draw()); })(i); } Update(); return results; } function RandomFromTo(from, to) { return Math.floor(Math.random() * (to - from + 1) + from); } function Update() { var remainingFlakes = 0; var particle; angle += 0.01; tiltAngle += 0.1; for (var i = 0; i < mp; i++) { particle = particles[i]; if (animationComplete) return; if (!confettiActive && particle.y < -15) { particle.y = H + 100; continue; } stepParticle(particle, i); if (particle.y W + 20 || particle.x H) && confettiActive) { if (index % 5 > 0 || index % 2 == 0) //66.67% of the flakes { repositionParticle(particle, Math.random() * W, -10, Math.floor(Math.random() * 10) – 10); } else { if (Math.sin(angle) > 0) { //Enter from the left repositionParticle(particle, -5, Math.random() * H, Math.floor(Math.random() * 10) – 10); } else { //Enter from the right repositionParticle(particle, W + 5, Math.random() * H, Math.floor(Math.random() * 10) – 10); } } } } function stepParticle(particle, particleIndex) { particle.tiltAngle += particle.tiltAngleIncremental; particle.y += (Math.cos(angle + particle.d) + 3 + particle.r / 2) / 2; particle.x += Math.sin(angle); particle.tilt = (Math.sin(particle.tiltAngle – (particleIndex / 3))) * 15; } function repositionParticle(particle, xCoordinate, yCoordinate, tilt) { particle.x = xCoordinate; particle.y = yCoordinate; particle.tilt = tilt; } function StartConfetti() { W = window.innerWidth; H = window.innerHeight; canvas[0].width = W; canvas[0].height = H; (function animloop() { if (animationComplete) return null; animationHandler = requestAnimFrame(animloop); return Draw(); })(); } function ClearTimers() { clearTimeout(reactivationTimerHandler); clearTimeout(animationHandler); } function DeactivateConfetti() { confettiActive = false; ClearTimers(); } function StopConfetti() { animationComplete = true; if (ctx == undefined) return; ctx.clearRect(0, 0, W, H); if (shouldRemoveSelfAfterStopping) { $(canvas).remove(); } } function RestartConfetti() { ClearTimers(); StopConfetti(); reactivationTimerHandler = setTimeout(function () { confettiActive = true; animationComplete = false; InitializeConfetti(); }, 100); } $(document).ready(function () { gsConfetti.ThrowThePaper(); }); window.requestAnimFrame = (function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) { return window.setTimeout(callback, 1000 / 60); }; })(); window.gsConfetti = gsConfetti; })(window.gsConfetti || {}); ]]> num_results) { $(‘#js-show-more-results’).addClass(‘hide’); } }); return false; }; var bind_mouse_over = function() { // Profile Image Hover $(‘.profile_image_wrapper’).bind(‘mouseover’, function(){ $(this).find(‘.feature_hover’).show(); }); $(‘.profile_image_wrapper’).bind(‘mouseleave’, function(){ $(this).find(‘.feature_hover’).hide(); }); $(‘.view_full_profile’).bind(‘click’, function(){ var link_id = $(this).attr(“id”); var id_info = link_id.split(“__”); var quick_link = id_info[1]; if (id_info.length > 2) { id_info.shift(); quick_link = id_info.join(“__”); } var overlay_url = ‘/’ + quick_link; window.location = overlay_url; return false; }); } bind_mouse_over(); ]]>
Source