vendor: 14,874 bytes, lines 1-513
1/*! 2 * Bowser - a browser detector 3 * https://github.com/ded/bowser 4 * MIT License | (c) Dustin Diaz 2015 5 */ 6 7!function (name, definition) { 8 if (typeof module != 'undefined' && module.exports) module.exports = definition() 9 else if (typeof define == 'function' && define.amd) define(name, definition) 10 else this[name] = definition() 11}('bowser', function () { 12 /** 13 * See useragents.js for examples of navigator.userAgent 14 */ 15 16 var t = true 17 18 function detect(ua) { 19 20 function getFirstMatch(regex) { 21 var match = ua.match(regex); 22 return (match && match.length > 1 && match[1]) || ''; 23 } 24 25 function getSecondMatch(regex) { 26 var match = ua.match(regex); 27 return (match && match.length > 1 && match[2]) || ''; 28 } 29 30 var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() 31 , likeAndroid = /like android/i.test(ua) 32 , android = !likeAndroid && /android/i.test(ua) 33 , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua) 34 , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua) 35 , chromeos = /CrOS/.test(ua) 36 , silk = /silk/i.test(ua) 37 , sailfish = /sailfish/i.test(ua) 38 , tizen = /tizen/i.test(ua) 39 , webos = /(web|hpw)os/i.test(ua) 40 , windowsphone = /windows phone/i.test(ua) 41 , windows = !windowsphone && /windows/i.test(ua) 42 , mac = !iosdevice && !silk && /macintosh/i.test(ua) 43 , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua) 44 , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) 45 , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) 46 , tablet = /tablet/i.test(ua) 47 , mobile = !tablet && /[^-]mobi/i.test(ua) 48 , xbox = /xbox/i.test(ua) 49 , result 50 51 if (/opera|opr|opios/i.test(ua)) { 52 result = { 53 name: 'Opera' 54 , opera: t 55 , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i) 56 } 57 } 58 else if (/coast/i.test(ua)) { 59 result = { 60 name: 'Opera Coast' 61 , coast: t 62 , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) 63 } 64 } 65 else if (/yabrowser/i.test(ua)) { 66 result = { 67 name: 'Yandex Browser' 68 , yandexbrowser: t 69 , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) 70 } 71 } 72 else if (/ucbrowser/i.test(ua)) { 73 result = { 74 name: 'UC Browser' 75 , ucbrowser: t 76 , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i) 77 } 78 } 79 else if (/mxios/i.test(ua)) { 80 result = { 81 name: 'Maxthon' 82 , maxthon: t 83 , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i) 84 } 85 } 86 else if (/epiphany/i.test(ua)) { 87 result = { 88 name: 'Epiphany' 89 , epiphany: t 90 , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i) 91 } 92 } 93 else if (/puffin/i.test(ua)) { 94 result = { 95 name: 'Puffin' 96 , puffin: t 97 , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) 98 } 99 } 100 else if (/sleipnir/i.test(ua)) { 101 result = { 102 name: 'Sleipnir' 103 , sleipnir: t 104 , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) 105 } 106 } 107 else if (/k-meleon/i.test(ua)) { 108 result = { 109 name: 'K-Meleon' 110 , kMeleon: t 111 , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) 112 } 113 } 114 else if (windowsphone) { 115 result = { 116 name: 'Windows Phone' 117 , windowsphone: t 118 } 119 if (edgeVersion) { 120 result.msedge = t 121 result.version = edgeVersion 122 } 123 else { 124 result.msie = t 125 result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) 126 } 127 } 128 else if (/msie|trident/i.test(ua)) { 129 result = { 130 name: 'Internet Explorer' 131 , msie: t 132 , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) 133 } 134 } else if (chromeos) { 135 result = { 136 name: 'Chrome' 137 , chromeos: t 138 , chromeBook: t 139 , chrome: t 140 , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) 141 } 142 } else if (/chrome.+? edge/i.test(ua)) { 143 result = { 144 name: 'Microsoft Edge' 145 , msedge: t 146 , version: edgeVersion 147 } 148 } 149 else if (/vivaldi/i.test(ua)) { 150 result = { 151 name: 'Vivaldi' 152 , vivaldi: t 153 , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier 154 } 155 } 156 else if (sailfish) { 157 result = { 158 name: 'Sailfish' 159 , sailfish: t 160 , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) 161 } 162 } 163 else if (/seamonkey\//i.test(ua)) { 164 result = { 165 name: 'SeaMonkey' 166 , seamonkey: t 167 , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) 168 } 169 } 170 else if (/firefox|iceweasel|fxios/i.test(ua)) { 171 result = { 172 name: 'Firefox' 173 , firefox: t 174 , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i) 175 } 176 if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { 177 result.firefoxos = t 178 } 179 } 180 else if (silk) { 181 result = { 182 name: 'Amazon Silk' 183 , silk: t 184 , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) 185 } 186 } 187 else if (/phantom/i.test(ua)) { 188 result = { 189 name: 'PhantomJS' 190 , phantom: t 191 , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) 192 } 193 } 194 else if (/slimerjs/i.test(ua)) { 195 result = { 196 name: 'SlimerJS' 197 , slimer: t 198 , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i) 199 } 200 } 201 else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { 202 result = { 203 name: 'BlackBerry' 204 , blackberry: t 205 , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) 206 } 207 } 208 else if (webos) { 209 result = { 210 name: 'WebOS' 211 , webos: t 212 , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) 213 }; 214 if( /touchpad\//i.test(ua) ){ 215 result.touchpad = t; 216 } 217 } 218 else if (/bada/i.test(ua)) { 219 result = { 220 name: 'Bada' 221 , bada: t 222 , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) 223 }; 224 } 225 else if (tizen) { 226 result = { 227 name: 'Tizen' 228 , tizen: t 229 , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier 230 }; 231 } 232 else if (/qupzilla/i.test(ua)) { 233 result = { 234 name: 'QupZilla' 235 , qupzilla: t 236 , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier 237 } 238 } 239 else if (/chromium/i.test(ua)) { 240 result = { 241 name: 'Chromium' 242 , chromium: t 243 , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier 244 } 245 } 246 else if (/chrome|crios|crmo/i.test(ua)) { 247 result = { 248 name: 'Chrome' 249 , chrome: t 250 , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) 251 } 252 } 253 else if (android) { 254 result = { 255 name: 'Android' 256 , version: versionIdentifier 257 } 258 } 259 else if (/safari|applewebkit/i.test(ua)) { 260 result = { 261 name: 'Safari' 262 , safari: t 263 } 264 if (versionIdentifier) { 265 result.version = versionIdentifier 266 } 267 } 268 else if (iosdevice) { 269 result = { 270 name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' 271 } 272 // WTF: version is not part of user agent in web apps 273 if (versionIdentifier) { 274 result.version = versionIdentifier 275 } 276 } 277 else if(/googlebot/i.test(ua)) { 278 result = { 279 name: 'Googlebot' 280 , googlebot: t 281 , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier 282 } 283 } 284 else { 285 result = { 286 name: getFirstMatch(/^(.*)\/(.*) /), 287 version: getSecondMatch(/^(.*)\/(.*) /) 288 }; 289 } 290 291 // set webkit or gecko flag for browsers based on these engines 292 if (!result.msedge && /(apple)?webkit/i.test(ua)) { 293 if (/(apple)?webkit\/537\.36/i.test(ua)) { 294 result.name = result.name || "Blink" 295 result.blink = t 296 } else { 297 result.name = result.name || "Webkit" 298 result.webkit = t 299 } 300 if (!result.version && versionIdentifier) { 301 result.version = versionIdentifier 302 } 303 } else if (!result.opera && /gecko\//i.test(ua)) { 304 result.name = result.name || "Gecko" 305 result.gecko = t 306 result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) 307 } 308 309 // set OS flags for platforms that have multiple browsers 310 if (!result.msedge && (android || result.silk)) { 311 result.android = t 312 } else if (iosdevice) { 313 result[iosdevice] = t 314 result.ios = t 315 } else if (mac) { 316 result.mac = t 317 } else if (xbox) { 318 result.xbox = t 319 } else if (windows) { 320 result.windows = t 321 } else if (linux) { 322 result.linux = t 323 } 324 325 // OS version extraction 326 var osVersion = ''; 327 if (result.windowsphone) { 328 osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); 329 } else if (iosdevice) { 330 osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); 331 osVersion = osVersion.replace(/[_\s]/g, '.'); 332 } else if (android) { 333 osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); 334 } else if (result.webos) { 335 osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); 336 } else if (result.blackberry) { 337 osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); 338 } else if (result.bada) { 339 osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); 340 } else if (result.tizen) { 341 osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); 342 } 343 if (osVersion) { 344 result.osversion = osVersion; 345 } 346 347 // device type extraction 348 var osMajorVersion = osVersion.split('.')[0]; 349 if ( 350 tablet 351 || nexusTablet 352 || iosdevice == 'ipad' 353 || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile))) 354 || result.silk 355 ) { 356 result.tablet = t 357 } else if ( 358 mobile 359 || iosdevice == 'iphone' 360 || iosdevice == 'ipod' 361 || android 362 || nexusMobile 363 || result.blackberry 364 || result.webos 365 || result.bada 366 ) { 367 result.mobile = t 368 } 369 370 // Graded Browser Support 371 // http://developer.yahoo.com/yui/articles/gbs 372 if (result.msedge || 373 (result.msie && result.version >= 10) || 374 (result.yandexbrowser && result.version >= 15) || 375 (result.vivaldi && result.version >= 1.0) || 376 (result.chrome && result.version >= 20) || 377 (result.firefox && result.version >= 20.0) || 378 (result.safari && result.version >= 6) || 379 (result.opera && result.version >= 10.0) || 380 (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || 381 (result.blackberry && result.version >= 10.1) 382 || (result.chromium && result.version >= 20) 383 ) { 384 result.a = t; 385 } 386 else if ((result.msie && result.version < 10) || 387 (result.chrome && result.version < 20) || 388 (result.firefox && result.version < 20.0) || 389 (result.safari && result.version < 6) || 390 (result.opera && result.version < 10.0) || 391 (result.ios && result.osversion && result.osversion.split(".")[0] < 6) 392 || (result.chromium && result.version < 20) 393 ) { 394 result.c = t 395 } else result.x = t 396 397 return result 398 } 399 400 var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent : '') 401 402 bowser.test = function (browserList) { 403 for (var i = 0; i < browserList.length; ++i) { 404 var browserItem = browserList[i]; 405 if (typeof browserItem=== 'string') { 406 if (browserItem in bowser) { 407 return true; 408 } 409 } 410 } 411 return false; 412 } 413 414 /** 415 * Get version precisions count 416 * 417 * @example 418 * getVersionPrecision("1.10.3") // 3 419 * 420 * @param {string} version 421 * @return {number} 422 */ 423 function getVersionPrecision(version) { 424 return version.split(".").length; 425 } 426 427 /** 428 * Array::map polyfill 429 * 430 * @param {Array} arr 431 * @param {Function} iterator 432 * @return {Array} 433 */ 434 function map(arr, iterator) { 435 var result = [], i; 436 if (Array.prototype.map) { 437 return Array.prototype.map.call(arr, iterator); 438 } 439 for (i = 0; i < arr.length; i++) { 440 result.push(iterator(arr[i])); 441 } 442 return result; 443 } 444 445 /** 446 * Calculate browser version weight 447 * 448 * @example 449 * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1 450 * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1 451 * compareVersions(['1.10.2.1', '1.10.2.1']); // 0 452 * compareVersions(['1.10.2.1', '1.0800.2']); // -1 453 * 454 * @param {Array<String>} versions versions to compare 455 * @return {Number} comparison result 456 */ 457 function compareVersions(versions) { 458 // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 459 var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1])); 460 var chunks = map(versions, function (version) { 461 var delta = precision - getVersionPrecision(version); 462 463 // 2) "9" -> "9.0" (for precision = 2) 464 version = version + new Array(delta + 1).join(".0"); 465 466 // 3) "9.0" -> ["000000000"", "000000009"] 467 return map(version.split("."), function (chunk) { 468 return new Array(20 - chunk.length).join("0") + chunk; 469 }).reverse(); 470 }); 471 472 // iterate in reverse order by reversed chunks array 473 while (--precision >= 0) { 474 // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) 475 if (chunks[0][precision] > chunks[1][precision]) { 476 return 1; 477 } 478 else if (chunks[0][precision] === chunks[1][precision]) { 479 if (precision === 0) { 480 // all version chunks are same 481 return 0; 482 } 483 } 484 else { 485 return -1; 486 } 487 } 488 } 489 490 /** 491 * Check if browser is unsupported 492 * 493 * @example 494 * bowser.isUnsupportedBrowser({ 495 * msie: "10", 496 * firefox: "23", 497 * chrome: "29", 498 * safari: "5.1", 499 * opera: "16", 500 * phantom: "534" 501 * }); 502 * 503 * @param {Object} minVersions map of minimal version to browser 504 * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map 505 * @param {String} [ua] user agent string 506 * @return {Boolean} 507 */ 508 function isUnsupportedBrowser(minVersions, strictMode, ua) { 509 var _bowser = bowser; 510 511 // make strictMode param optional with ua param usage 512 if (typeof strictMode === 'string') { 513 ua = strictMode;
514 strictMode = void(0); 515 } 516 517 if (strictMode === void(0)) { 518 strictMode = false; 519 } 520 if (ua) { 521 _bowser = detect(ua); 522 } 523 524 var version = "" + _bowser.version; 525 for (var browser in minVersions) { 526 if (minVersions.hasOwnProperty(browser)) { 527 if (_bowser[browser]) { 528 // browser version and min supported version. 529 return compareVersions([version, minVersions[browser]]) < 0; 530 } 531 } 532 } 533 534 return strictMode; // not found 535 } 536 537 /** 538 * Check if browser is supported 539 * 540 * @param {Object} minVersions map of minimal version to browser 541 * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map 542 * @param {String} [ua] user agent string 543 * @return {Boolean} 544 */ 545 function check(minVersions, strictMode, ua) { 546 return !isUnsupportedBrowser(minVersions, strictMode, ua); 547 } 548 549 bowser.isUnsupportedBrowser = isUnsupportedBrowser; 550 bowser.compareVersions = compareVersions; 551 bowser.check = check; 552 553 /* 554 * Set our detect method to the main bowser object so we can 555 * reuse it to test other user agents. 556 * This is needed to implement future tests. 557 */ 558 bowser._detect = detect; 559 560 return bowser 561}); 562 563(function($){ 564 UABBTrigger = { 565 566 /** 567 * Trigger a hook. 568 * 569 * @since 1.1.0.3 570 * @method triggerHook 571 * @param {String} hook The hook to trigger. 572 * @param {Array} args An array of args to pass to the hook. 573 */ 574 triggerHook: function( hook, args ) 575 { 576 $( 'body' ).trigger( 'uabb-trigger.' + hook, args ); 577 }, 578 579 /** 580 * Add a hook. 581 * 582 * @since 1.1.0.3 583 * @method addHook 584 * @param {String} hook The hook to add. 585 * @param {Function} callback A function to call when the hook is triggered. 586 */ 587 addHook: function( hook, callback ) 588 { 589 $( 'body' ).on( 'uabb-trigger.' + hook, callback ); 590 }, 591 592 /** 593 * Remove a hook. 594 * 595 * @since 1.1.0.3 596 * @method removeHook 597 * @param {String} hook The hook to remove. 598 * @param {Function} callback The callback function to remove. 599 */ 600 removeHook: function( hook, callback ) 601 { 602 $( 'body' ).off( 'uabb-trigger.' + hook, callback ); 603 }, 604 }; 605})(jQuery); 606 607jQuery(document).ready(function( $ ) { 608 609 if( typeof bowser !== 'undefined' && bowser !== null ) { 610 611 var uabb_browser = bowser.name, 612 uabb_browser_v = bowser.version, 613 uabb_browser_class = uabb_browser.replace(/\s+/g, '-').toLowerCase(), 614 uabb_browser_v_class = uabb_browser_class + parseInt( uabb_browser_v ); 615 616 $('html').addClass(uabb_browser_class).addClass(uabb_browser_v_class); 617 618 } 619 620 $('.uabb-row-separator').parents('html').css('overflow-x', 'hidden'); 621}); 622 623jQuery(function($) { 624 $(function() { 625 $( '.fl-node-zu2s4yf73jr1 .uabb-photo-img' ) 626 .on( 'mouseenter', function( e ) { 627 $( this ).data( 'title', $( this ).attr( 'title' ) ).removeAttr( 'title' ); 628 } ) 629 .on( 'mouseleave', function( e ){ 630 $( this ).attr( 'title', $( this ).data( 'title' ) ).data( 'title', null ); 631 } ); 632 }); 633}); 634 635;(function($) { 636 637 /** 638 * Class for Menu Module 639 * 640 * @since 1.6.0 641 */ 642 UABBCreativeMenu = function( settings ) { 643 644 // set params 645 this.settingsId = settings.id; 646 this.nodeClass = '.fl-node-' + settings.id; 647 this.wrapperClass = this.nodeClass + ' .uabb-creative-menu'; 648 this.type = settings.type; 649 this.mobileToggle = settings.mobile; 650 this.mobileBelowRow = settings.mobileBelowRow; 651 this.breakPoints = settings.breakPoints; 652 this.mobileBreakpoint = settings.mobileBreakpoint; 653 this.mediaBreakpoint = settings.mediaBreakpoint; 654 this.mobileMenuType = settings.mobileMenuType; 655 this.isBuilderActive = settings.isBuilderActive; 656 this.currentBrowserWidth = $( window ).width(); 657 658 // initialize the menu 659 this._initMenu(); 660 661 // check if viewport is resizing 662 $( window ).on( 'resize', $.proxy( function( e ) { 663 664 var width = $( window ).width(); 665 666 // if screen width is resized, reload the menu 667 if( width != this.currentBrowserWidth ) { 668 669 this._initMenu(); 670 this._clickOrHover(); 671 this.currentBrowserWidth = width; 672 } 673 674 }, this ) ); 675 676 }; 677 678 UABBCreativeMenu.prototype = { 679 nodeClass : '', 680 wrapperClass : '', 681 type : '', 682 breakPoints : {}, 683 $submenus : null, 684 685 /** 686 * Check if the screen size fits a mobile viewport. 687 * 688 * @since 1.6.0 689 * @return bool 690 */ 691 _isMobile: function() { 692 return $( window ).width() <= this.breakPoints.small ? true : false;
693 }, 694 695 /** 696 * Check if the screen size fits a medium viewport. 697 * 698 * @since 1.6.0 699 * @return bool 700 */ 701 _isMedium: function() { 702 return $( window ).width() <= this.breakPoints.medium ? true : false; 703 }, 704 705 /** 706 * Check if the screen size fits a custom viewport. 707 * 708 * @since 1.6.0 709 * @return bool 710 */ 711 _isCustom: function() { 712 return $( window ).width() <= this.breakPoints.custom ? true : false; 713 }, 714 715 /** 716 * Check if the menu should toggle for the current viewport base on the selected breakpoint 717 * 718 * @see this._isMobile() 719 * @see this._isMedium() 720 * @since 1.6.0 721 * @return bool 722 */ 723 _isMenuToggle: function() { 724 if ( 'always' == this.mobileBreakpoint 725 || ( this._isMobile() && 'mobile' == this.mobileBreakpoint ) 726 || ( this._isMedium() && 'medium-mobile' == this.mobileBreakpoint ) 727 || ( this._isCustom() && 'custom' == this.mobileBreakpoint ) 728 ) { 729 return true; 730 } 731 732 return false; 733 }, 734 735 /** 736 * Initialize the toggle logic for the menu. 737 * 738 * @see this._isMenuToggle() 739 * @see this._menuOnCLick() 740 * @see this._clickOrHover() 741 * @see this._submenuOnRight() 742 * @see this._toggleForMobile() 743 * @see this._initBelowRowMenu() 744 * @since 1.6.0 745 * @return void 746 */ 747 _initMenu: function() { 748 this._menuOnFocus(); 749 750 if ( $( this.nodeClass ).length ) { 751 this._initMegaMenus(); 752 } 753 754 if( this._isMenuToggle() || this.type == 'accordion' ) { 755 756 $( this.wrapperClass ).off( 'mouseenter mouseleave' ); 757 this._menuOnClick(); 758 this._clickOrHover(); 759 760 } else { 761 $( this.wrapperClass ).off( 'click' ); 762 this._submenuOnRight(); 763 } 764 765 if( this.mobileToggle != 'expanded' ) { 766 this._toggleForMobile(); 767 this._initBelowRowMenu(); 768 769 if( this.mobileMenuType === 'off-canvas' ) { 770 this._initializeCanvas(); 771 } 772 773 if( this.mobileMenuType === 'full-screen' ) { 774 this.__initializeFullScreen(); 775 } 776 } 777 }, 778 779 /** 780 * Adds a focus class to menu elements similar to be used similar to CSS :hover psuedo event 781 * 782 * @since 1.6.0 783 * @return void 784 */ 785 _menuOnFocus: function() { 786 $( this.nodeClass ).off('focus').on( 'focus', 'a', $.proxy( function( e ) { 787 var $menuItem = $( e.target ).parents( '.menu-item' ).first(), 788 $parents = $( e.target ).parentsUntil( this.wrapperClass ); 789 790 $('.uabb-creative-menu .focus').removeClass('focus'); 791 792 $menuItem.addClass('focus'); 793 $parents.addClass('focus'); 794 795 }, this ) ).on( 'focusout', 'a', $.proxy( function( e ) { 796 $( e.target ).parentsUntil( this.wrapperClass ).removeClass( 'focus' ); 797 }, this ) ); 798 }, 799 800 /** 801 * Logic for submenu toggling on accordions or mobile menus (vertical, horizontal) 802 * 803 * @since 1.6.0 804 * @return void 805 */ 806 _menuOnClick: function() { 807 $( '.uabb-has-submenu-container' ).off().click( $.proxy( function( e ) { 808 809 var $link = $( e.target ).parents( '.uabb-has-submenu' ).first(), 810 $subMenu = $link.children( '.sub-menu' ).first(), 811 $href = $link.children('.uabb-has-submenu-container').first().find('> a').attr('href'), 812 $subMenuParents = $( e.target ).parents( '.sub-menu' ), 813 $activeParent = $( e.target ).closest( '.uabb-has-submenu.uabb-active' ); 814 815 if( !$subMenu.is(':visible') || $(e.target).hasClass('uabb-menu-toggle') 816 || ($subMenu.is(':visible') && (typeof $href === 'undefined' || $href == '#')) ) { 817 e.preventDefault(); 818 } 819 else { 820 window.location.href = $href; 821 return; 822 } 823 824 if ($(this.wrapperClass).hasClass('uabb-creative-menu-accordion-collapse')) { 825 826 if ( !$link.parents('.menu-item').hasClass('uabb-active') ) { 827 $('.uabb-active', this.wrapperClass).not($link).removeClass('uabb-active'); 828 } 829 else if ($link.parents('.menu-item').hasClass('uabb-active') && $link.parent('.sub-menu').length) { 830 $('.uabb-active', this.wrapperClass).not($link).not($activeParent).removeClass('uabb-active'); 831 } 832 833 $('.sub-menu', this.wrapperClass).not($subMenu).not($subMenuParents).slideUp('normal'); 834 } 835 836 $subMenu.slideToggle(); 837 $link.toggleClass( 'uabb-active' ); 838 }, this ) ); 839 840 }, 841 842 /** 843 * Changes general styling and behavior of menus based on mobile / desktop viewport. 844 * 845 * @see this._isMobile() 846 * @since 1.6.0 847 * @return void 848 */ 849 _clickOrHover: function() { 850 this.$submenus = this.$submenus || $( this.wrapperClass ).find( '.sub-menu' ); 851 var $wrapper = $( this.wrapperClass ), 852 $menu = $wrapper.find( '.menu' ); 853 $li = $wrapper.find( '.uabb-has-submenu' ); 854 855 if( this._isMenuToggle() ) { 856 $li.each( function( el ) { 857 if( !$(this).hasClass('uabb-active') ) { 858 $(this).find( '.sub-menu' ).fadeOut(); 859 } 860 } ); 861 } else { 862 $li.each( function( el ) { 863 if( !$(this).hasClass('uabb-active') ) { 864 $(this).find( '.sub-menu' ).css( { 865 'display' : '', 866 'opacity' : '' 867 } ); 868 } 869 } ); 870 } 871 }, 872 873 /** 874 * Logic to prevent submenus to go outside viewport boundaries. 875 * 876 * @since 1.6.0 877 * @return void 878 */ 879 _submenuOnRight: function() { 880 881 $( this.wrapperClass ) 882 .on( 'mouseenter', '.uabb-has-submenu', $.proxy( function( e ) { 883 884 if( $ ( e.currentTarget ).find('.sub-menu').length === 0 ) { 885 return; 886 } 887 888 var $link = $( e.currentTarget ), 889 $parent = $link.parent(), 890 $subMenu = $link.find( '.sub-menu' ), 891 subMenuWidth = $subMenu.width(), 892 subMenuPos = 0, 893 winWidth = $( window ).width(); 894 895 if( $link.closest( '.uabb-menu-submenu-right' ).length !== 0) { 896 897 $link.addClass( 'uabb-menu-submenu-right' ); 898 899 } else if( $( 'body' ).hasClass( 'rtl' ) ) { 900 901 subMenuPos = $parent.is( '.sub-menu' ) ? 902 $parent.offset().left - subMenuWidth: 903 $link.offset().left - subMenuWidth; 904 905 if( subMenuPos <= 0 ) { 906 $link.addClass( 'uabb-menu-submenu-right' ); 907 } 908 909 } else { 910 911 subMenuPos = $parent.is( '.sub-menu' ) ? 912 $parent.offset().left + $parent.width() + subMenuWidth : 913 $link.offset().left + subMenuWidth; 914 915 if( subMenuPos > winWidth ) { 916 $link.addClass('uabb-menu-submenu-right'); 917 } 918 } 919 }, this ) ) 920 .on( 'mouseleave', '.uabb-has-submenu', $.proxy( function( e ) { 921 $( e.currentTarget ).removeClass( 'uabb-menu-submenu-right' ); 922 }, this ) ); 923 924 }, 925 926 /** 927 * Logic for the mobile menu button. 928 * 929 * @since 1.6.0 930 * @return void 931 */ 932 _toggleForMobile: function() { 933 934 var $wrapper = null, 935 $menu = null; 936 937 if( this._isMenuToggle() ) { 938 939 $wrapper = $( this.wrapperClass ); 940 $menu = $wrapper.children( '.menu' ); 941 942 if( !$wrapper.find( '.uabb-creative-menu-mobile-toggle' ).hasClass( 'uabb-active' ) ) { 943 if( window.innerWidth <= this.mediaBreakpoint ) { 944 $menu.css({ display: 'none' }); 945 } else { 946 if( this.mobileBelowRow == 'below-row' ) { 947 $menu.css({ display: 'block' }); 948 } 949 } 950 } 951 952 $wrapper.find( '.uabb-creative-menu-mobile-toggle' ).off().on( 'focus', function( e ) { 953 $(this).on('keypress', function(e) { 954 if(e.which === 13) { 955 $(this).trigger('click'); 956 } 957 }); 958 } ); 959 960 $wrapper.off().on( 'click', '.uabb-creative-menu-mobile-toggle', function( e ) { 961 $( this ).toggleClass( 'uabb-active' ); 962 $menu.slideToggle(); 963 } ); 964 965 $menu.on( 'click', '.menu-item > a[href*="#"]', function(e) { 966 var $href = $(this).attr('href'), 967 $targetID = ''; 968 969 if ( $href !== '#' ) { 970 $targetID = $href.split('#')[1]; 971 972 if ( $('body').find('#'+ $targetID).length > 0 ) { 973 e.preventDefault(); 974 $( this ).toggleClass( 'uabb-active' ); 975 $menu.slideToggle('fast', function() { 976 setTimeout(function() { 977 $('html, body').animate({ 978 scrollTop: $('#'+ $targetID).offset().top 979 }, 1000, function() { 980 window.location.hash = $targetID; 981 }); 982 }, 500); 983 }); 984 } 985 } 986 }); 987 } 988 else { 989 990 $wrapper = $( this.wrapperClass ), 991 $menu = $wrapper.children( '.menu' ); 992 $wrapper.find( '.uabb-creative-menu-mobile-toggle' ).removeClass( 'uabb-active' ); 993 $menu.css({ display: '' }); 994 } 995 }, 996 997 /** 998 * Logic for the Below Row menu. 999 * 1000 * @since 1.11.0 1001 * @return void 1002 */ 1003 _initBelowRowMenu: function() { 1004 1005 var $wrapper = null, 1006 $menu = null; 1007 1008 if( this._isMenuToggle() && (window.innerWidth <= this.mediaBreakpoint || this.mediaBreakpoint == 'always' )) { 1009 if ( this._isMobileBelowRowEnabled() ) { 1010 this._placeMobileMenuBelowRow(); 1011 $wrapper = $( this.wrapperClass ); 1012 $menu = $( this.nodeClass + '-clone' ); 1013 $menu.find( 'ul.menu' ).show(); 1014 } else { 1015 $wrapper = $( this.wrapperClass ); 1016 $menu = $wrapper.children( '.menu' ); 1017 } 1018 1019 if( false != this.mobileBelowRow && !$wrapper.find( '.uabb-creative-menu-mobile-toggle' ).hasClass( 'uabb-active' ) ) { 1020 if( window.innerWidth <= this.mediaBreakpoint || this.mediaBreakpoint == 'always' ) { 1021 $menu.css({ display: 'none' }); 1022 } else { 1023 $menu.css({ display: 'block' }); 1024 } 1025 } 1026 1027 $wrapper.find( '.uabb-creative-menu-mobile-toggle' ).off().on( 'focus', function( e ) { 1028 $(this).on('keypress', function(e) { 1029 if(e.which === 13) { 1030 $(this).trigger('click'); 1031 } 1032 }); 1033 } ); 1034 1035 $wrapper.off().on( 'click', '.uabb-creative-menu-mobile-toggle', function( e ) { 1036 $( this ).toggleClass( 'uabb-active' ); 1037 $menu.slideToggle(); 1038 } ); 1039 1040 } else { 1041 if ( this._isMobileBelowRowEnabled() ) { 1042 this._removeMenuFromBelowRow(); 1043 } 1044 1045 $wrapper = $( this.wrapperClass ), 1046 $menu = $wrapper.children( '.menu' ); 1047 $wrapper.find( '.uabb-creative-menu-mobile-toggle' ).removeClass( 'uabb-active' ); 1048 $menu.css({ display: '' }); 1049 } 1050 }, 1051 1052 /** 1053 * Initialize Off Canvas Menu. 1054 * 1055 * @since 1.6.0 1056 * @return void 1057 */ 1058 _initializeCanvas: function() { 1059 if ( this.isBuilderActive ) { 1060 this._toggleMenu(); 1061 return; 1062 } 1063 if ( 'always' === this.mediaBreakpoint || this.mediaBreakpoint >= this.currentBrowserWidth ) { 1064 $(this.nodeClass).find('.uabb-creative-menu.off-canvas').appendTo('body').wrap('<div class="fl-node-'+this.settingsId+'">'); 1065 } 1066 this._toggleMenu(); 1067 }, 1068 1069 /** 1070 * Initialize Overlay Menu. 1071 * 1072 * @since 1.6.0 1073 * @return void 1074 */ 1075 __initializeFullScreen: function() { 1076 if ( this.isBuilderActive ) { 1077 this._toggleMenu(); 1078 return; 1079 } 1080 if ( 'always' === this.mediaBreakpoint || this.mediaBreakpoint >= this.currentBrowserWidth ) { 1081 $(this.nodeClass).find('.uabb-creative-menu.full-screen').appendTo('body').wrap('<div class="fl-node-'+this.settingsId+'">'); 1082 } 1083 this._toggleMenu(); 1084 }, 1085 1086 /** 1087 * Trigger the toggle event for off-canvas. 1088 * and full-screen overlay menus. 1089 * 1090 * @since 1.6.0 1091 * @return void 1092 */ 1093 _toggleMenu: function() { 1094 var self = this; 1095 // Toggle Click 1096 $(self.nodeClass).find('.uabb-creative-menu-mobile-toggle' ).off().on( 'focus', function( e ) { 1097 $(this).on('keypress', function(e) { 1098 if(e.which === 13) { 1099 $(this).trigger('click'); 1100 } 1101 }); 1102 } ); 1103 1104 $(self.nodeClass).find('.uabb-creative-menu-mobile-toggle' ).off('click').on( 'click', function() { 1105 if( $(self.nodeClass).find('.uabb-creative-menu').hasClass('menu-open') ) { 1106 $(self.nodeClass).find('.uabb-creative-menu').addClass('menu-close'); 1107 $(self.nodeClass).find('.uabb-creative-menu').removeClass('menu-open'); 1108 } else { 1109 $(self.nodeClass).find('.uabb-creative-menu').addClass('menu-open'); 1110 } 1111 } ); 1112 1113 // Close button click 1114 $(self.nodeClass).find('.uabb-creative-menu .uabb-menu-close-btn, .uabb-clear' ).on( 'click', function() { 1115 $(self.nodeClass).find('.uabb-creative-menu').addClass('menu-close'); 1116 $(self.nodeClass).find('.uabb-creative-menu').removeClass('menu-open'); 1117 1118 } ); 1119 1120 if ( this.isBuilderActive ) { 1121 setTimeout(function() {
1122 if ( $('.fl-builder-settings[data-node="'+self.settingsId+'"]').length > 0 ) { 1123 $('.uabb-creative-menu').removeClass('menu-open'); 1124 $(self.nodeClass).find('.uabb-creative-menu-mobile-toggle').trigger('click'); 1125 } 1126 }, 600); 1127 1128 FLBuilder.addHook('settings-form-init', function() { 1129 if ( ! ( $('.fl-builder-settings[data-node="'+self.settingsId+'"]').length > 0 ) ) { 1130 return; 1131 } 1132 if ( ! $(self.nodeClass).find('.uabb-creative-menu').hasClass('uabb-menu-overlay') ) { 1133 $('.fl-builder-panel').css('z-index', '999999'); 1134 } 1135 if ( ! $(self.nodeClass).find('.uabb-creative-menu').hasClass('menu-open') ) { 1136 $('.uabb-creative-menu').removeClass('menu-open'); 1137 $('.uabb-creative-menu-mobile-toggle').removeClass('uabb-active'); 1138 1139 $(self.nodeClass).find('.uabb-creative-menu-mobile-toggle').trigger('click'); 1140 } 1141 }); 1142 } 1143 }, 1144 1145 /** 1146 * Check to see if Below Row should be enabled. 1147 * 1148 * @since 1.11.0 1149 * @return boolean 1150 */ 1151 _isMobileBelowRowEnabled: function() { 1152 return this.mobileBelowRow && $( this.nodeClass ).closest( '.fl-col' ).length; 1153 }, 1154 1155 /** 1156 * Logic for putting the mobile menu below the menu's 1157 * column so it spans the full width of the page. 1158 * 1159 * @since 1.11.0 1160 * @return void 1161 */ 1162 _placeMobileMenuBelowRow: function() { 1163 1164 if ( $( this.nodeClass + '-clone' ).length ) { 1165 return; 1166 } 1167 1168 var module = $( this.nodeClass ), 1169 clone = null, 1170 col = module.closest( '.fl-col' ); 1171 1172 if ( module.length < 1 ) { 1173 return; 1174 } 1175 clone = ( module.length > 1 ) ? $( module[0] ).clone() : module.clone(); 1176 module.find( 'ul.menu' ).css('display','none'); 1177 clone.addClass( ( this.nodeClass + '-clone' ).replace( '.', '' ) ); 1178 clone.find( '.uabb-creative-menu-mobile-toggle' ).remove(); 1179 col.after( clone ); 1180 1181 this._menuOnClick(); 1182 }, 1183 1184 /** 1185 * Logic for removing the mobile menu from below the menu's 1186 * column and putting it back in the main wrapper. 1187 * 1188 * @since 1.11.0 1189 * @return void 1190 */ 1191 _removeMenuFromBelowRow: function(){ 1192 if ( ! $( this.nodeClass + '-clone' ).length ) { 1193 return; 1194 } 1195 var module = $( this.nodeClass ); 1196 module.find( 'ul.menu' ).css('display','none'), 1197 clone = $( this.nodeClass + '-clone' ); 1198 menu = clone.find( 'ul.menu' ); 1199 module.find( 'ul.menu' ).after( menu ); 1200 1201 clone.remove(); 1202 }, 1203 1204 /** 1205 * Init any mega menus that exist. 1206 * 1207 * @see this._isMenuToggle() 1208 * @since 1.6.0 1209 * @return void 1210 */ 1211 _initMegaMenus: function() { 1212 1213 var module = $( this.nodeClass ), 1214 rowContent = module.closest( '.fl-row-content' ), 1215 rowWidth = rowContent.width(), 1216 rowOffset = ( rowContent.offset.left != undefined ) ? rowContent.offset().left : '', 1217 megas = module.find( '.mega-menu' ), 1218 disabled = module.find( '.mega-menu-disabled' ), 1219 isToggle = this._isMenuToggle(); 1220 1221 if ( isToggle ) { 1222 megas.removeClass( 'mega-menu' ).addClass( 'mega-menu-disabled' ); 1223 module.find( 'li.mega-menu-disabled > ul.sub-menu' ).css( 'width', '' ); 1224 rowContent.css( 'position', '' ); 1225 } else { 1226 disabled.removeClass( 'mega-menu-disabled' ).addClass( 'mega-menu' ); 1227 module.find( 'li.mega-menu > ul.sub-menu' ).css( 'width', rowWidth + 'px' ); 1228 rowContent.css( 'position', 'relative' ); 1229 } 1230 }, 1231 1232 }; 1233 1234})(jQuery); 1235 1236jQuery(document).ready(function(){ 1237 new UABBCreativeMenu({ 1238 id: 'kj0ipdo541vx', 1239 type: 'expanded', 1240 mobile: 'expanded', 1241 mobileBelowRow: false, 1242 breakPoints: { 1243 medium: 992, 1244 small: 767, 1245 custom: 768 }, 1246 mobileBreakpoint: 'mobile', 1247 mediaBreakpoint: '767', 1248 mobileMenuType: 'default', 1249 fullScreenAnimation: '', 1250 isBuilderActive: false }); 1251}); 1252 1253 1254jQuery(document).ready(function(){ 1255 new UABBCreativeMenu({ 1256 id: 'mo3xntjr9bgy', 1257 type: 'accordion', 1258 mobile: 'expanded', 1259 mobileBelowRow: false, 1260 breakPoints: { 1261 medium: 992, 1262 small: 767, 1263 custom: 768 }, 1264 mobileBreakpoint: 'mobile', 1265 mediaBreakpoint: '767', 1266 mobileMenuType: 'default', 1267 fullScreenAnimation: '', 1268 isBuilderActive: false }); 1269}); 1270 1271 1272/* Start Layout Custom JS */ 1273 1274/* End Layout Custom JS */ 1275
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.