1// requestAnimationFrame polyfill by Erik Möller. 2// Fixes from Paul Irish, Tino Zijdel, Andrew Mao, Klemen SlaviÄ, Darius Bacon 3// MIT license 4 5if (!Date.now) 6 Date.now = function() { return new Date().getTime(); }; 7 8(function() { 9 'use strict'; 10 11 var vendors = ['webkit', 'moz']; 12 for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) { 13 var vp = vendors[i]; 14 window.requestAnimationFrame = window[vp+'RequestAnimationFrame']; 15 window.cancelAnimationFrame = (window[vp+'CancelAnimationFrame'] 16 || window[vp+'CancelRequestAnimationFrame']); 17 } 18 if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) // iOS6 is buggy 19 || !window.requestAnimationFrame || !window.cancelAnimationFrame) { 20 var lastTime = 0; 21 window.requestAnimationFrame = function(callback) { 22 var now = Date.now(); 23 var nextTime = Math.max(lastTime + 16, now); 24 return setTimeout(function() { callback(lastTime = nextTime); }, 25 nextTime - now); 26 }; 27 window.cancelAnimationFrame = clearTimeout; 28 } 29}()); 30 31var ieVersion = (function(){ 32 var undef, 33 v = 3, 34 div = document.createElement('div'), 35 all = div.getElementsByTagName('i'); 36 37 while ( 38 div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->', 39 all[0] 40 ); 41 42 return v > 4 ? v : undef; 43}()); 44 45var AL_EFFECT_TYPE = { 46 snow: 1, 47 heat: 2, 48 rain: 3 49}; 50 51var al_effect_containerArray = []; 52 53//particleSizeSmall, particleSizeLarge, particleSpeedSlow, particleSpeedFast, containerIndex, link, target, atts 54function Flake(options) { 55 var that = this; 56 57 var sizeSmall = options.particleSizeSmall; 58 var sizeLarge = options.particleSizeLarge; 59 var widthSmall = isNaN(options.particleWidthSmall) ? null : options.particleWidthSmall; 60 var widthLarge = isNaN(options.particleWidthLarge) ? null : options.particleWidthLarge; 61 var speedSlow = isNaN(options.particleSpeedSlow) ? null : options.particleSpeedSlow; 62 var speedFast = isNaN(options.particleSpeedFast) ? null : options.particleSpeedFast; 63 var staticPosition = (speedSlow || speedFast) ? false : true; 64 var initialDirection = options.particleDirection; 65 var directionVariation = options.particleDirectionVariation; 66 var alignToDirection = typeof options.particleAlignToDirection !== 'undefined' ? true : null; 67 var wrapperIndex = options.containerIndex; 68 var linkURL = typeof options.link !== 'undefined' ? options.link : ''; 69 var linkTarget = typeof options.target !== 'undefined' ? options.target : ''; 70 var linkAtts = typeof options.linkAtts !== 'undefined' ? options.linkAtts : ''; 71 var icon = typeof options.particleIcon !== 'undefined' ? options.particleIcon : ''; 72 var numTypes = typeof options.particleNumTypes !== 'undefined' ? options.particleNumTypes : 0; 73 74 var element = null; 75 var xPos = 0; 76 var yPos = 0; 77 var angle = 0; 78 var size = 0; 79 var width = null; 80 var meltSize = 0; 81 var speed = 0; 82 var spinAngle = 0; 83 var spinDirection = 0; 84 85 //transforms 86 var transformType = ""; 87 var translateType = ""; 88 var translateEnd = ""; 89 var translate = ""; 90 var scale = ""; 91 var rotate = ""; 92 93 var bMelt = typeof options.melt !== 'undefined' ? options.melt : false; 94 var bMelting = false; 95 var bSpin = typeof options.spin !== 'undefined' ? options.spin : false; 96 var bSnowflakeIcon = al_effect_containerArray[wrapperIndex].wrapper.hasClass("al-particle-snowflake"); 97 var bFAIcon = al_effect_containerArray[wrapperIndex].wrapper.hasClass("al-particle-icon"); 98 var bStop = false; 99 100 that.init = function() { 101 that.createElement(); 102 that.setParameters(); 103 }; 104 105 that.setParameters = function() { 106 if (options.isStoppedGraceful) { 107 element.hide(); 108 bStop = true; 109 } else { 110 size = Math.random() * (sizeLarge - sizeSmall) + sizeSmall; 111 if (widthSmall || widthLarge) width = Math.ceil((widthLarge - widthSmall) / (sizeLarge - sizeSmall) * (size - sizeSmall) + widthSmall); 112 113 angle = initialDirection + (Math.random() * directionVariation * 2) - directionVariation;
114 if (width != null && alignToDirection) { 115 var tempWidth = Math.abs(width * Math.cos(angle) + size * Math.sin(-angle)); 116 var tempSize = Math.abs(size * Math.cos(angle) + width * Math.sin(-angle)); 117 var tW = width; 118 width = size;//tempWidth; 119 size = tW;//tempSize; 120 } 121 122 meltSize = size; 123 124 var widthVar = "width"; 125 var heightVar = "height"; 126 if (staticPosition) { 127 widthVar = "wrapperWidth"; 128 heightVar = "wrapperHeight"; 129 } 130 var xPosNew = Math.random() * (al_effect_containerArray[wrapperIndex].spawnArea[widthVar] - (width || size)); 131 var yPosNew = Math.random() * (al_effect_containerArray[wrapperIndex].spawnArea[heightVar] - size); 132 if (staticPosition) { 133 xPos = xPosNew; 134 yPos = yPosNew; 135 } else { 136 xPos = al_effect_containerArray[wrapperIndex].spawnArea.xOffset(xPosNew, yPosNew); 137 yPos = al_effect_containerArray[wrapperIndex].spawnArea.yOffset(xPosNew, yPosNew); 138 speed = Math.random() * (speedFast - speedSlow) + speedSlow; 139 } 140 141 bMelting = false; 142 if (bMelt) { 143 element.removeClass("al-transition-melt"); 144 } 145 if (bSnowflakeIcon || bFAIcon) { 146 that.setFontSize(); 147 } 148 if (bSpin) { 149 //element.addClass("al-particle-spin"); 150 spinAngle = Math.random() * 360; 151 spinDirection = Math.random() < 0.5 ? -1 : 1; 152 } 153 154 that.resizeElement(); 155 } 156 }; 157 158 that.createElement = function() { 159 var innerHTML = ""; 160 if (bSnowflakeIcon) { 161 innerHTML = "<i class='fa-fw fas fa-snowflake'></i>"; 162 } else if (bFAIcon && icon) { 163 innerHTML = "<i class='fa-fw " + icon + "'></i>"; 164 } 165 166 var flakeClasses = ''; 167 if (numTypes > 0) { 168 flakeClasses += ' al-particle-type-' + Math.floor(Math.random() * 3 + 1); 169 } 170 171 if (linkURL != '') { 172 innerHTML = "<a class='flake" + flakeClasses + "' href='" + linkURL + "' target='" + linkTarget + "' " + linkAtts + ">" + innerHTML + "</a>"; 173 } else { 174 innerHTML = "<div class='flake" + flakeClasses + "'>" + innerHTML + "</div>"; 175 } 176 177 element = jQuery(innerHTML).appendTo(al_effect_containerArray[wrapperIndex].wrapper); 178 //element.css({width: size, height: size, left: xPos, top: yPos}); 179 180 if (bSnowflakeIcon || bFAIcon) { 181 that.setFontSize(); 182 } 183 184 if (typeof ieVersion === "undefined") { 185 transformType = "transform"; 186 translateType = "translate3d"; 187 translateEnd = ", 0"; 188 } else { 189 transformType = "-ms-transform"; 190 translateType = "translate"; 191 } 192 }; 193 194 that.moveElement = function() { 195 //element.css({left: xPos, top: yPos}); 196 translate = translateType + "(" + xPos + "px, " + yPos + "px" + translateEnd + ")"; 197 }; 198 199 that.resizeElement = function() { 200 var percent = meltSize / size; 201 if (percent == 1) { 202 scale = ""; 203 element.css({width: (width || size), height: size}); 204 } else { 205 scale = "scale(" + percent + ")"; 206 } 207 }; 208 209 that.setFontSize = function() { 210 element.css({fontSize: meltSize + "px", lineHeight: meltSize + "px"}); 211 }; 212 213 that.rotateElement = function() { 214 rotate = "rotate(" + spinAngle + "deg)"; 215 }; 216 217 that.setTransform = function() { 218 element.css(transformType, translate + " " + scale + " " + rotate); 219 }; 220 221 that.doReset = function() { 222 var widthCalc = (width || size); 223 var sizeCalc = size; 224 if (alignToDirection) { 225 widthCalc = Math.abs(widthCalc * Math.cos(angle) + sizeCalc * Math.sin(-angle)); 226 sizeCalc = Math.abs(sizeCalc * Math.cos(angle) + widthCalc * Math.sin(-angle)); 227 } 228 229 var currentDimensions = { 230 bMelt: bMelt, 231 xPos: xPos, 232 yPos: yPos, 233 size: sizeCalc, 234 width: widthCalc, 235 zero: 0 236 }; 237 var hitBoundary = al_effect_containerArray[wrapperIndex].spawnArea.outsideBoundaries(currentDimensions); 238 239 return hitBoundary; 240 }; 241 242 that.draw = function(delta) { 243 if (!bStop && al_effect_containerArray[wrapperIndex].shown) { 244 var doMelt = false;
245 var keepMoving = true; 246 var hitBoundary = that.doReset(); 247 if (hitBoundary) { 248 if (hitBoundary.doMelt) { 249 doMelt = true; 250 } 251 keepMoving = false; 252 } 253 254 if (!staticPosition) { 255 if (!bMelting && keepMoving) { 256 var cosCalc = Math.cos(angle); 257 var sinCalc = Math.sin(-angle); 258 xPos += speed * cosCalc * delta; 259 yPos += speed * sinCalc * delta; 260 /*angle += (Math.random() - 0.5) / 80; 261 if (angle > initialDirection + directionVariation) { 262 angle = initialDirection + directionVariation; 263 } else if (angle < initialDirection - directionVariation) { 264 angle = initialDirection - directionVariation; 265 }*/ 266 if (bSpin && !alignToDirection) { 267 spinAngle += spinDirection * speed * delta; 268 that.rotateElement(); 269 } 270 /*if (width != null && alignToDirection) { 271 width = Math.abs(width * cosCalc + size * sinCalc); 272 size = Math.abs(size * cosCalc + width * sinCalc); 273 }*/ 274 } else if (doMelt && meltSize > 1) { 275 bMelting = true; 276 meltSize *= 1 - (0.7 * delta); 277 if (hitBoundary.lesser == 'zero') { 278 that[hitBoundary.greater] = al_effect_containerArray[wrapperIndex][hitBoundary.lesser]; 279 } else { 280 that[hitBoundary.lesser] = al_effect_containerArray[wrapperIndex][hitBoundary.greater] - meltSize + 2; 281 } 282 that.resizeElement(); 283 element.addClass("al-transition-melt"); 284 if (bSnowflakeIcon || bFAIcon) { 285 that.setFontSize(); 286 } 287 if (bSpin) { 288 //element.removeClass("al-particle-spin"); 289 } 290 } else if (!keepMoving || meltSize <= 1) { 291 that.setParameters(); 292 } 293 }
294 if (alignToDirection) { 295 spinAngle = -angle * 180 / Math.PI; 296 that.rotateElement(); 297 } 298 299 that.moveElement(); 300 that.setTransform(); 301 } 302 }; 303 304 that.stop = function() { 305 bStop = true; 306 }; 307 308 that.start = function() { 309 bStop = false; 310 } 311 312 that.init(); 313} 314 315function SnowEffect(options) { 316 //particleCount, particleSizeSmall, particleSizeLarge, scaleParticles, mobileSize, mobileParticleCount 317 318 var that = this; 319 320 var numFlakes = 0; 321 var flakes = []; 322 var containerIndex = 0; 323 var lastTime = 0; 324 var bStop = false; 325 var bStatic = isNaN(options.particleSpeedSlow) && isNaN(options.particleSpeedFast); 326 var stopAfter = 0; 327 var stopMethod = null; 328 329 that.init = function() { 330 var spawnArea = { 331 angle: options.particleDirection, 332 sinAngle: 0, 333 cosAngle: 0, 334 wrapper: options.effectWrapper, 335 wrapperWidth: 0, 336 wrapperHeight: 0, 337 height: 0, 338 width: 0, 339 hOffset: 0, 340 vOffset: 0, 341 boundaries: {}, 342 sides: [], 343 init: function() { 344 this.sinAngle = Math.sin(options.particleDirection); 345 this.cosAngle = Math.cos(options.particleDirection); 346 this.updateDimensions(); 347 }, 348 updateDimensions: function() { 349 this.wrapperWidth = this.wrapper.width(); 350 this.wrapperHeight = this.wrapper.height(); 351 this.height = parseInt(Math.abs(this.wrapperWidth * this.sinAngle) + Math.abs(this.wrapperHeight * this.cosAngle)); 352 this.width = parseInt(Math.abs(this.wrapperWidth * this.cosAngle) + Math.abs(this.wrapperHeight * this.sinAngle)); 353 this.updateBoundaries(); 354 }, 355 updateBoundaries: function() { 356 var boundsTop = { 357 lesser: 'zero', 358 lesserAdd: 'zero', 359 greater: 'yPos', 360 greaterAdd: 'size', 361 doMelt: true 362 }; 363 var boundsBottom = { 364 lesser: 'yPos', 365 lesserAdd: 'size', 366 greater: 'wrapperHeight', 367 greaterAdd: 'zero', 368 doMelt: true 369 }; 370 var boundsRight = { 371 lesser: 'xPos', 372 lesserAdd: 'width',
373 greater: 'wrapperWidth', 374 greaterAdd: 'zero', 375 doMelt: true 376 }; 377 var boundsLeft = { 378 lesser: 'zero', 379 lesserAdd: 'zero', 380 greater: 'xPos', 381 greaterAdd: 'width', 382 doMelt: true 383 }; 384 385 var angle = Math.round(this.angle / (Math.PI) * 180) % 360; 386 if (angle == 0) { 387 this.boundaries = { 388 top: boundsTop, 389 bottom: boundsBottom, 390 right: boundsRight 391 }; 392 } else if (angle < 90) { 393 this.boundaries = { 394 top: boundsTop, 395 right: boundsRight 396 }; 397 } else if (angle == 90) { 398 this.boundaries = { 399 top: boundsTop, 400 left: boundsLeft, 401 right: boundsRight 402 }; 403 } else if (angle < 180) { 404 this.boundaries = { 405 top: boundsTop, 406 left: boundsLeft 407 }; 408 } else if (angle == 180) { 409 this.boundaries = { 410 top: boundsTop, 411 left: boundsLeft, 412 bottom: boundsBottom 413 }; 414 } else if (angle < 270) { 415 this.boundaries = { 416 left: boundsLeft, 417 bottom: boundsBottom 418 }; 419 } else if (angle == 270) { 420 this.boundaries = { 421 left: boundsLeft, 422 right: boundsRight, 423 bottom: boundsBottom 424 }; 425 } else if (angle < 360) { 426 this.boundaries = { 427 right: boundsRight, 428 bottom: boundsBottom 429 }; 430 } 431 432 this.sides = Object.keys(this.boundaries); 433 }, 434 xOffset: function(currentX, currentY) { 435 var rotationOffset = ((currentX - this.width / 2) * this.cosAngle) - ((currentY - this.height / 2) * -this.sinAngle); 436 var wrapperOffset = (this.wrapperWidth / 2); 437 var virtualOffset = (this.width) * -this.cosAngle; 438 var translationOffset = virtualOffset + wrapperOffset; 439 440 return rotationOffset + translationOffset; 441 }, 442 yOffset: function(currentX, currentY) { 443 var rotationOffset = ((currentX - this.width / 2) * -this.sinAngle) + ((currentY - this.height / 2) * this.cosAngle); 444 var wrapperOffset = (this.wrapperHeight / 2); 445 var virtualOffset = (this.height) * this.sinAngle; 446 var translationOffset = virtualOffset + wrapperOffset; 447 448 return rotationOffset + translationOffset; 449 }, 450 outsideBoundaries: function(dimensionObj) { 451 /* dimensionObj = { 452 'bMelt': boolean, 453 'xPos': number, 454 'yPos': number, 455 'size': number, 456 'width': number, 457 'zero': 0 458 } */ 459 dimensionObj.wrapperWidth = this.wrapperWidth; 460 dimensionObj.wrapperHeight = this.wrapperHeight; 461 for (var i = 0; i < this.sides.length; i++) { 462 var side = this.boundaries[this.sides[i]]; 463 var offsetLesser = dimensionObj.bMelt ? dimensionObj[side.lesserAdd] : 0; 464 var offsetGreater = dimensionObj.bMelt ? 0 : dimensionObj[side.greaterAdd]; 465 if (dimensionObj[side.lesser] + offsetLesser > dimensionObj[side.greater] + offsetGreater) { 466 if ( dimensionObj.bMelt && side.doMelt ) { 467 return side; 468 } 469 return true; 470 } 471 } 472 473 return false; 474 } 475 }; 476 spawnArea.init(); 477 478 containerIndex = al_effect_containerArray.length; 479 options.containerIndex = containerIndex; 480 al_effect_containerArray.push({ 481 wrapper: options.effectWrapper, 482 spawnArea: spawnArea, 483 shown: options.effectWrapper.css("display") == "none" ? false : true, 484 effect: that, 485 }); 486 jQuery(window).on("resize", function() { 487 if (al_effect_containerArray[containerIndex] != null) { 488 al_effect_containerArray[containerIndex].spawnArea.updateDimensions(); 489 if (al_effect_containerArray[containerIndex].wrapper.css("display") == "none") { 490 al_effect_containerArray[containerIndex].shown = false; 491 } else { 492 al_effect_containerArray[containerIndex].shown = true; 493 } 494 } 495 }); 496 497 numFlakes = options.particleCount; 498 499 if (options.scaleParticles) { 500 if (typeof options.mobileSize == 'undefined') { 501 if (al_effect_containerArray[containerIndex].spawnArea.width < 1440) { 502 numFlakes *= al_effect_containerArray[containerIndex].spawnArea.width / 1440; 503 } 504 } else if (window.innerWidth <= options.mobileSize) { 505 numFlakes = options.mobileParticleCount; 506 } 507 } 508 509 stopAfter = options.stopAfter; 510 stopMethod = options.stopMethod; 511 512 if (stopAfter) { 513 options.isStoppedGraceful = false;
514 setTimeout( function() { 515 if (stopMethod == 'freeze') { 516 that.stop() 517 } else if (stopMethod == 'hide') { 518 that.stop() 519 al_effect_containerArray[containerIndex].wrapper.hide(); 520 al_effect_containerArray[containerIndex].shown = false; 521 } else if (stopMethod == 'graceful') { 522 options.isStoppedGraceful = true; 523 } 524 }, stopAfter * 1000); 525 } 526 527 for (var i = 0; i < numFlakes; i++) { 528 var flake = new Flake(options); 529 flakes.push(flake); 530 } 531 532 lastTime = Date.now(); 533 that.draw(); 534 }; 535 536 that.draw = function() { 537 var delta = (Date.now() - lastTime) / 1000; 538 for (var i = 0; i < flakes.length; i++) { 539 flakes[i].draw(delta); 540 } 541 lastTime = Date.now(); 542 543 if (!bStop && !bStatic) requestAnimationFrame(that.draw); 544 }; 545 546 that.getIndex = function() { 547 return containerIndex; 548 }; 549 550 that.stop = function() { 551 bStop = true; 552 for (var i = 0; i < flakes.length; i++) { 553 flakes[i].stop(); 554 } 555 }; 556 557 that.start = function() { 558 bStop = false; 559 for (var i = 0; i < flakes.length; i++) { 560 flakes[i].start(); 561 } 562 lastTime = Date.now(); 563 that.draw(); 564 }; 565 566 that.init(); 567} 568 569function initEffects(elem) { 570 var style = jQuery("style", elem).clone(); 571 var options = {}; 572 573 if (elem.length > 0) { 574 options.link = elem.attr("data-link"); 575 options.target = elem.attr("data-target"); 576 options.linkAtts = elem.attr("data-link-atts"); 577 options.stopAfter = parseFloat(elem.attr("data-stop-after")); 578 options.stopMethod = elem.attr("data-stop-method"); 579 options.particleCount = parseInt(elem.attr("data-particle-count")); 580 options.particleSizeSmall = parseInt(elem.attr("data-size-small")); 581 options.particleSizeLarge = parseInt(elem.attr("data-size-large")); 582 options.particleWidthSmall = parseInt(elem.attr("data-width-small")); 583 options.particleWidthLarge = parseInt(elem.attr("data-width-large")); 584 options.particleSpeedSlow = parseInt(elem.attr("data-speed-slow")); 585 options.particleSpeedFast = parseInt(elem.attr("data-speed-fast")); 586 options.particleDirection = parseInt(elem.attr("data-direction")) * Math.PI / 180; 587 options.particleDirectionVariation = parseInt(elem.attr("data-direction-variation")) * Math.PI / 180; 588 options.particleAlignToDirection = elem.attr("data-align"); 589 options.particleNumTypes = parseInt(elem.attr("data-num-types")); 590 options.particleIcon = elem.attr("data-icon"); 591 options.frost = elem.attr("data-frost"); 592 options.melt = elem.attr("data-melt"); 593 options.spin = elem.attr("data-spin"); 594 options.scaleParticles = elem.hasClass("al-scale-particles-manual"); 595 if (elem.hasClass("al-scale-particles-manual")) { 596 options.mobileSize = elem.attr("data-particle-scale-width"); 597 options.mobileParticleCount = elem.attr("data-particle-scale-count"); 598 } 599 if (elem.hasClass("al-particle-rain")) { 600 options.particleWidthSmall = 1; 601 options.particleWidthLarge = 1; 602 options.particleAlignToDirection = true; 603 } 604 605 var elemClass = ""; 606 if (typeof elem.attr("data-class") !== 'undefined') elemClass = " " + elem.attr("data-class"); 607 var elemID = ""; 608 if (typeof elem.attr("data-id") !== 'undefined') elemID = " id='" + elem.attr("data-id") + "'"; 609 610 var isFrontend = false; 611 if (typeof elem.attr("data-frontend") !== 'undefined') isFrontend = elem.attr("data-frontend") == "true" ? true : false; 612 613 htmlClasses = "al-windoweffects-wrapper al-windoweffects-" + elem.attr("data-container-num"); 614 htmlClasses += elemClass; 615 htmlClasses += " " + elem.attr("data-visibility"); 616 htmlClasses += elem.hasClass("al-particle-snowflake") ? " al-particle-snowflake" : ""; 617 htmlClasses += elem.hasClass("al-particle-rain") ? " al-particle-rain" : ""; 618 htmlClasses += elem.hasClass("al-particle-icon") ? " al-particle-icon" : ""; 619 620 var selector = elem.attr("data-selector"); 621 if (isFrontend) { 622 var wrapperSelector = ".al-windoweffects-wrapper.al-windoweffects-" + elem.attr("data-container-num"); 623 jQuery(wrapperSelector, selector).remove(); 624 } 625 var containerHTML = "<div class='" + htmlClasses + "'" + elemID + "></div>"; 626 var depth = elem.attr("data-depth"); 627 if (depth == "behind") { 628 options.effectWrapper = jQuery(containerHTML).prependTo(selector); 629 options.effectWrapper.siblings().each(function() { 630 var position = jQuery(this).css("position"); 631 if (position == "static") { 632 jQuery(this).css("position", "relative"); 633 } 634 635 var zindex = jQuery(this).css("z-index"); 636 if (zindex == "auto") { 637 jQuery(this).css("z-index", 2); 638 } 639 }); 640 } else { 641 options.effectWrapper = jQuery(containerHTML).appendTo(selector); 642 } 643 644 options.effectWrapper.append(style); 645 646 var effect = new SnowEffect(options); 647 elem.attr("data-effect-container-index", effect.getIndex()); 648 649 return true; 650 } else { 651 return false;
652 } 653} 654 655function removeEffects(elem) { 656 var index = elem.attr("data-effect-container-index"); 657 if (typeof index !== "undefined") { 658 al_effect_containerArray[index].effect.stop(); 659 al_effect_containerArray[index] = null; 660 var selector = elem.attr("data-selector"); 661 var wrapperSelector = ".al-windoweffects-wrapper.al-windoweffects-" + elem.attr("data-container-num"); 662 jQuery(wrapperSelector, selector).remove(); 663 } 664} 665 666function checkEffectExists(elem, selector) { 667 setTimeout(function() { 668 if (jQuery(selector).find(".al-windoweffects-wrapper").length == 0) { 669 initFB_AL_Effects(elem); 670 } else { 671 checkEffectExists(elem, selector); 672 } 673 }, 2000); 674} 675 676function initFB_AL_Effects(elem) { 677 var childElem = jQuery(elem).find(".al-windoweffects-container"); 678 var selector = childElem.attr("data-selector"); 679 initEffects(childElem); 680 checkEffectExists(elem, selector); 681} 682 683function removeFB_AL_Effects(elem) { 684 elem = jQuery(elem).find(".al-windoweffects-container"); 685 removeEffects(elem); 686} 687 688jQuery(document).ready(function() { 689 jQuery(".al-windoweffects-container").each( function() { initEffects(jQuery(this)); } ); 690});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.