1(function($, fnFrontend){ 2 "use strict"; 3 4 var FrenifyMow = { 5 6 init: function() { 7 8 var widgets = { 9 'frel-posts.default' : FrenifyMow.posts, 10 'frel-search.default' : FrenifyMow.searchMarquee, 11 'frel-categories.default' : FrenifyMow.categories, 12 'frel-title.default' : FrenifyMow.categoryMarquee, 13 'frel-youtube-list.default' : FrenifyMow.youtube_list, 14 'frel-gallery.default' : FrenifyMow.gallery, 15 }; 16 17 $.each( widgets, function( widget, callback ) { 18 fnFrontend.hooks.addAction( 'frontend/element_ready/' + widget, callback ); 19 }); 20 }, 21 gallery: function(){ 22 FrenifyMow.lightGallery(); 23 FrenifyMow.justified(); 24 FrenifyMow.masonry(); 25 FrenifyMow.mosaic(); 26 }, 27 28 mosaic: function(){ 29 $('.fn__cs_gallery_mosaic').each(function(){ 30 var e = $(this), 31 w = e.width(), 32 hgap = e.data('hgap'), 33 vgap = hgap, 34 r; 35 if(w > 1200){ 36 r = 6; 37 }else { 38 r = 3; 39 } 40 w = w - (r-1)*vgap; 41 var www = ((2 * w / r) - hgap * (-1) * (r-1))/2; 42 var www2 = ((2 * w / r) - hgap * (r-1))/2; 43 44 var itemsPerDiv = r; 45 var $list = e.find('.listt'); 46 var $items = $list.children('li'); 47 48 // Create div containers and append items 49 for (var i = 0; i < $items.length; i += itemsPerDiv) { 50 var $div = $('<div class="item-group"></div>'); 51 var $ul = $('<ul></ul>'); 52 $items.slice(i, i + itemsPerDiv).appendTo($ul); 53 $ul.appendTo($div); 54 $div.appendTo(e); 55 } 56 57 // Remove the original ul 58 $list.remove(); 59 60 e.find('.item-group:even').each(function(){ 61 $(this).find('li').each(function(){ 62 var li = $(this); 63 li.css({width: (www + (li.index()%r)*hgap*(-1))/w * 100 + '%'}); 64 }); 65 }); 66 67 e.find('.item-group:odd').each(function(){ 68 $(this).find('li').each(function(){ 69 var li = $(this); 70 li.css({width: (www2 + (li.index()%r)*hgap) / w * 100 + '%'}); 71 }); 72 }); 73 }); 74 }, 75 76 masonry: function(){ 77 var masonry = $('.fn__masonry'); 78 if($().isotope){ 79 masonry.each(function(){ 80 $(this).isotope({ 81 itemSelector: '.mas__in', 82 masonry: {} 83 }); 84 }); 85 } 86 }, 87 88 justified: function(){ 89 FrenifyMow.lightGallery(); 90 var justified = $(".fn__justified_gallery"); 91 justified.each(function(){ 92 var element = $(this); 93 var height = parseInt(element.attr('data-height')); 94 var gutter = parseInt(element.attr('data-gutter')); 95 if(!height || height === 0){height = 300;} 96 if(!gutter || gutter === 0){gutter = 20;} 97 if($().justifiedGallery){ 98 element.justifiedGallery({ 99 rowHeight : height, 100 lastRow : 'nojustify', 101 margins : gutter, 102 refreshTime: 500, 103 refreshSensitivity: 0, 104 maxRowHeight: null, 105 border: 0, 106 captions: false, 107 randomize: false 108 }); 109 } 110 }); 111 }, 112 113 lightGallery: function(){ 114 if($().lightGallery){ 115 // FIRST WE SHOULD DESTROY LIGHTBOX FOR NEW SET OF IMAGES 116 117 var gallery = $('.fn__lightbox_wrap'); 118 119 gallery.each(function(){ 120 var element = $(this); 121 element.lightGallery(); // binding 122 if(element.length){element.data('lightGallery').destroy(true); }// destroying 123 element.lightGallery({ 124 selector: ".fn__lightbox_item", 125 addClass: 'fn__lightgallery_lightbox', 126 thumbnail: 1, 127 loadYoutubeThumbnail: !1, 128 loadVimeoThumbnail: !1, 129 showThumbByDefault: !1, 130 mode: "lg-fade", 131 download: !1, 132 getCaptionFromTitleOrAlt: !1, 133 }); 134 }); 135 } 136 }, 137 138 139 youtube_list: function(){ 140 var ytlist = $('.fn_cs_youtube_list'); 141 if(ytlist.length){ 142 ytlist.each(function(){ 143 var $parent = $(this); 144 var $player = $parent.find('.ylist_player'); 145 146 var $videopart = $parent.find('.video_part'); 147 var iframes = $videopart.html(); 148 $videopart.html(''); 149 var $iframes = $(iframes); 150 $videopart.html($iframes.eq(0)); 151 $parent.find('.list_part li').off().on('click',function(){ 152 var $item = $(this); 153 var $currentElement = $iframes.eq($item.index()); 154 if(!$item.hasClass('active')){ 155 $item.siblings('.active').removeClass('active');; 156 $item.addClass('active'); 157 $videopart.html($currentElement); 158 } 159 });
160 }); 161 } 162 }, 163 164 posts: function(){ 165 FrenifyMow.posts_epsilon(); 166 FrenifyMow.posts_fslider(); 167 FrenifyMow.posts_cslider(); 168 FrenifyMow.posts_carousel(); 169 FrenifyMow.posts_yota(); 170 FrenifyMow.posts_interactive(); 171 FrenifyMow.categoryMarquee(); 172 }, 173 174 posts_interactive: function(){ 175 if($('.fn__widget_posts_interactive').length){ 176 $('.fn__widget_posts_interactive .interactive_item').on('mouseenter',function(){ 177 var $item = $(this), 178 $parent = $item.closest('.fn__widget_posts_interactive'), 179 $index = $item.index(); 180 $parent.find('.bg_list li.active').removeClass('active'); 181 $parent.find('.bg_list li:nth-child('+($index+1)+')').addClass('active'); 182 }); 183 } 184 }, 185 186 posts_yota: function(){ 187 $('.fn__widget_posts_yota .col_secondary .item').on('mouseenter',function(){ 188 var element = $(this); 189 var parent = element.closest('.fn__widget_posts_yota'); 190 parent.find('.col_primary .item.active').removeClass('active'); 191 element.siblings('.active').removeClass('active'); 192 parent.find('.col_primary .item:nth-child('+(element.index()+1)+')').addClass('active'); 193 element.addClass('active'); 194 }); 195 $('.fn__widget_posts_yota .col_secondary .nav-buttons .next-button').off().on('click',function(){ 196 var element = $(this); 197 var parent = element.closest('.fn__widget_posts_yota'); 198 var secondaryItems = parent.find('.col_secondary .item'); 199 var primaryItems = parent.find('.col_primary .item'); 200 var index = parent.find('.col_secondary .item.active').index(); 201 var nextIndex = (index+1)%secondaryItems.length; 202 secondaryItems.removeClass('active'); 203 primaryItems.removeClass('active'); 204 secondaryItems.eq(nextIndex).addClass('active'); 205 primaryItems.eq(nextIndex).addClass('active'); 206 207 208 if(parent.attr('data-layout') === 'yota_1'){ 209 var scrollContainer = parent.find('.col_secondary .col_in'); 210 var scrollTo = secondaryItems.eq(nextIndex).position().top + scrollContainer.scrollTop() - 50; 211 var scroll = parent.find('.col_secondary .col_in'); 212 213 scroll.stop().animate({ 214 scrollTop:scrollTo 215 }, 'slow'); 216 }else{ 217 var translateX = -secondaryItems.eq(nextIndex).position().left; 218 parent.find('.col_inn').css({transform: 'translateX('+translateX+'px)'}); 219 } 220 221 return false; 222 }); 223 $('.fn__widget_posts_yota .col_secondary .nav-buttons .prev-button').off().on('click',function(){ 224 var element = $(this); 225 var parent = element.closest('.fn__widget_posts_yota'); 226 var secondaryItems = parent.find('.col_secondary .item'); 227 var primaryItems = parent.find('.col_primary .item'); 228 var index = parent.find('.col_secondary .item.active').index(); 229 var nextIndex = (index+secondaryItems.length-1)%secondaryItems.length; 230 secondaryItems.removeClass('active'); 231 primaryItems.removeClass('active'); 232 secondaryItems.eq(nextIndex).addClass('active'); 233 primaryItems.eq(nextIndex).addClass('active'); 234 235 236 if(parent.attr('data-layout') === 'yota_1'){ 237 var scrollContainer = parent.find('.col_secondary .col_in'); 238 var scrollTo = secondaryItems.eq(nextIndex).position().top + scrollContainer.scrollTop() - 50; 239 var scroll = parent.find('.col_secondary .col_in'); 240 241 scroll.stop().animate({ 242 scrollTop:scrollTo 243 }, 'slow'); 244 }else{ 245 var translateX = -secondaryItems.eq(nextIndex).position().left; 246 parent.find('.col_inn').css({transform: 'translateX('+translateX+'px)'}); 247 } 248 249 return false; 250 }); 251 }, 252 253 categories: function(){ 254 FrenifyMow.categoryMarquee(); 255 FrenifyMow.categoryCarousel(); 256 FrenifyMow.categoryVInteractive(); 257 FrenifyMow.categoryHInteractive(); 258 }, 259 260 categoryVInteractive: function(){ 261 var $interactive = $('.fn_cs_cats_v_interactive'); 262 var $cursor = $('<div class="fn_cs_cats_v_ccc"></div>'); 263 264 if ($interactive.length) { 265 $('body').append($cursor); 266 } 267 268 // Track mouse position globally on the body 269 $('body').on('mousemove', function(e) { 270 $cursor.css({ 271 top: e.clientY + 25, 272 left: e.clientX + 25 273 }); 274 }); 275 276 // Add class and update content when hovering over the target element 277 $('.fn_cs_cats_v_interactive .item_list').on('mouseenter mousemove', function() { 278 var $item = $(this), 279 $img = $item.find('.img_holder'); 280 $cursor.css({backgroundImage: 'url(' + $img.data('url') + ')'}).html('').html($img.find('.sub').html()).addClass('opened'); 281 }).on('mouseleave', function() { 282 $cursor.removeClass('opened'); 283 }); 284 }, 285 286 categoryHInteractive: function(){ 287 var $interactive = $('.fn_cs_cats_h_interactive'); 288 var $cursor = $('<div class="fn_cs_cats_h_ccc"></div>'); 289 290 if ($interactive.length) { 291 $('body').append($cursor); 292 } 293 294 // Track mouse position globally on the body 295 $('body').on('mousemove', function(e) { 296 $cursor.css({ 297 top: e.clientY + 25, 298 left: e.clientX + 25 299 }); 300 }); 301 302 // Add class and update content when hovering over the target element 303 $('.fn_cs_cats_h_interactive .item_list').on('mouseenter mousemove', function() { 304 var $item = $(this), 305 $img = $item.find('.img_holder'); 306 $cursor.css({backgroundImage: 'url(' + $img.data('url') + ')'}).html('').html($img.find('.sub').html()).addClass('opened'); 307 }).on('mouseleave', function() { 308 $cursor.removeClass('opened'); 309 }); 310 }, 311 312 categoryCarousel: function(){ 313 var rtl = $('body').hasClass('rtl') ? true : false; 314 $('.fn_cs_cats_carousel .slick_slider').each(function () { 315 var element = $(this); 316 var parent = element.closest('.fn_cs_cats_carousel'); 317 if(!parent.hasClass('ready')){ 318 parent.addClass('ready'); 319 var $next = parent.find('.slider_nav .next'); 320 var $prev = parent.find('.slider_nav .prev'); 321 322 element.slick({ 323 slidesToShow: 1, 324 slidesToScroll: 1, 325 variableWidth: true, 326 infinite: false, 327 rtl: rtl, 328 dots: false, 329 centerMode: false, 330 draggable: true, 331 swipe: true, 332 swipeToSlide: true, 333 touchThreshold: 10, 334 arrows: true, 335 prevArrow: $prev, 336 nextArrow: $next, 337 });
338 } 339 340 }); 341 }, 342 343 categoryMarquee: function(){ 344 var direction = $('body').hasClass('rtl') ? 'right' : 'left'; 345 346 $(".fn__cs_title_smarquee .marquee").each(function(){ 347 var e = $(this); 348 if(!e.hasClass('ready')){ 349 var speed = e.data('speed') || 50; 350 e.addClass('ready').marquee({ 351 duplicated: true, 352 speed: speed, 353 delayBeforeStart: 0, 354 direction: direction, 355 pauseOnHover: false, 356 startVisible: true 357 }); 358 } 359 }); 360 361 $(".fn_cs_cats_big_marquee .marquee").each(function(){ 362 var e = $(this); 363 if(!e.hasClass('ready')){ 364 var speed = e.data('speed') || 50; 365 e.addClass('ready').marquee({ 366 duplicated: true, 367 speed: speed, 368 delayBeforeStart: 0, 369 direction: direction, 370 pauseOnHover: false, 371 startVisible: true 372 }); 373 } 374 }); 375 376 $(".fn__widget_posts_boxed_marquee .marquee").each(function(){ 377 var e = $(this); 378 direction = e.closest(".fn__widget_posts_boxed_marquee").data("direction"); 379 if(!e.hasClass('ready')){ 380 var speed = e.data('speed') || 50; 381 e.addClass('ready').marquee({ 382 duplicated: true, 383 speed: speed, 384 delayBeforeStart: 0, 385 direction: direction, 386 pauseOnHover: false, 387 startVisible: true 388 }); 389 } 390 }); 391 392 $(".fn_cs_cats_small_marquee .marquee").each(function(){ 393 var e = $(this); 394 if(!e.hasClass('ready')){ 395 var speed = e.data('speed') || 30; 396 e.addClass('ready').marquee({ 397 duplicated: true, 398 speed: speed, 399 delayBeforeStart: 0, 400 direction: direction, 401 pauseOnHover: true, 402 startVisible: true 403 }); 404 } 405 }); 406 }, 407 408 searchMarquee: function(){ 409 var direction = $('body').hasClass('rtl') ? 'right' : 'left'; 410 $(".fn_cs_searchbox .marquee").each(function(){ 411 var e = $(this); 412 if(!e.hasClass('ready')){ 413 e.addClass('ready').marquee({ 414 duplicated: true, 415 speed: 50, 416 delayBeforeStart: 0, 417 direction: direction, 418 pauseOnHover: false, 419 startVisible: true 420 }); 421 } 422 }); 423 }, 424 425 posts_carousel: function(){ 426 var rtl = $('body').hasClass('rtl') ? true : false; 427 $('.fn__widget_posts_gcarousel .swiper').each(function() { 428 var $item = $(this); 429 var autoplay = $item.data('slider-autoplay'); 430 var loop = true; 431 if(autoplay === 'enable'){ 432 autoplay = {delay: 7000,disableOnInteraction: false}; 433 }else{ 434 autoplay = false; 435 loop = false; 436 } 437 var cols = $item.data('cols'); 438 var max1201, max1041, max1401; 439 if(cols == 'col_2'){ 440 max1201 = 2; 441 max1041 = 2; 442 max1401 = 2; 443 }else if(cols == 'col_3'){ 444 max1201 = 3; 445 max1401 = 3; 446 }else if(cols == 'col_4'){ 447 max1401 = 4; 448 max1201 = 4; 449 max1041 = 3; 450 }else if(cols == 'col_5'){ 451 max1401 = 5; 452 max1201 = 4; 453 max1041 = 3; 454 } 455 const swiper = new Swiper($item[0], { 456 loop: loop, 457 rtl: rtl, 458 speed: 500, 459 spaceBetween: 30, 460 navigation: { 461 nextEl: $item.closest('.fn__circle_slider').find('.swiper-button-next')[0], 462 prevEl: $item.closest('.fn__circle_slider').find('.swiper-button-prev')[0], 463 }, 464 slidesPerView: max1401, 465 autoplay: autoplay, 466 breakpoints: { 467 0: { 468 slidesPerView: 1, 469 }, 470 769: { 471 slidesPerView: 2, 472 }, 473 1041: { 474 slidesPerView: max1041, 475 }, 476 1201: { 477 slidesPerView: max1201, 478 }, 479 1401: { 480 slidesPerView: max1401, 481 }, 482 } 483 }); 484 }); 485 $('.fn__widget_posts_fcarousel .swiper').each(function() { 486 const swiper = new Swiper($(this)[0], { 487 loop: false, 488 rtl: rtl, 489 speed: 500, 490 spaceBetween: 0, 491 navigation: { 492 nextEl: $(this).closest('.fn__circle_slider').find('.swiper-button-next')[0], 493 prevEl: $(this).closest('.fn__circle_slider').find('.swiper-button-prev')[0], 494 }, 495 slidesPerView: 1, 496 autoplay: { 497 delay: 7000, 498 disableOnInteraction: false, 499 }, 500 }); 501 }); 502 $('.fn__widget_posts_alpha .swiper').each(function() { 503 const swiper = new Swiper($(this)[0], { 504 loop: false, 505 rtl: rtl, 506 speed: 500, 507 spaceBetween: 30, 508 navigation: { 509 nextEl: $(this).closest('.fn__circle_slider').find('.swiper-button-next')[0], 510 prevEl: $(this).closest('.fn__circle_slider').find('.swiper-button-prev')[0], 511 }, 512 slidesPerView: 3, 513 autoplay: { 514 delay: 7000, 515 disableOnInteraction: false, 516 }, 517 breakpoints: { 518 0: { 519 slidesPerView: 1, 520 }, 521 769: { 522 slidesPerView: 2, 523 }, 524 1041: { 525 slidesPerView: 3, 526 }, 527 } 528 }); 529 }); 530 $('.fn__widget_posts_mcarousel .swiper').each(function() { 531 const swiper = new Swiper($(this)[0], { 532 loop: false, 533 rtl: rtl, 534 speed: 500, 535 spaceBetween: 0, 536 navigation: { 537 nextEl: $(this).closest('.fn__circle_slider').find('.swiper-button-next')[0], 538 prevEl: $(this).closest('.fn__circle_slider').find('.swiper-button-prev')[0], 539 }, 540 slidesPerView: 1, 541 autoplay: { 542 delay: 70000, 543 disableOnInteraction: false, 544 }, 545 }); 546 }); 547 }, 548 549 posts_fslider: function(){ 550 var rtl = $('body').hasClass('rtl') ? true : false; 551 $('.fn__widget_posts_fslider .swiper').each(function() { 552 const swiper = new Swiper($(this)[0], { 553 loop: false, 554 rtl: rtl, 555 speed: 500, 556 spaceBetween: 0, 557 navigation: { 558 nextEl: $(this).closest('.fn__circle_slider').find('.swiper-button-next')[0], 559 prevEl: $(this).closest('.fn__circle_slider').find('.swiper-button-prev')[0], 560 }, 561 slidesPerView: 1, 562 autoplay: { 563 delay: 700000, 564 disableOnInteraction: false, 565 }, 566 }); 567 }); 568 }, 569 570 posts_cslider: function(){ 571 var rtl = $('body').hasClass('rtl') ? true : false; 572 $('.fn__widget_posts_cslider .swiper').each(function() { 573 const swiper = new Swiper($(this)[0], { 574 loop: true, 575 rtl: rtl, 576 speed: 500, 577 spaceBetween: 50, 578 navigation: { 579 nextEl: $(this).closest('.fn__circle_slider').find('.swiper-button-next')[0], 580 prevEl: $(this).closest('.fn__circle_slider').find('.swiper-button-prev')[0], 581 }, 582 slidesPerView: 1, 583 autoplay: { 584 delay: 7000, 585 disableOnInteraction: false, 586 }, 587 }); 588 }); 589 }, 590 591 posts_epsilon: function(){ 592 var rtl = $('body').hasClass('rtl') ? true : false; 593 $('.fn__widget_posts_epsilon .swiper').each(function(){ 594 var swiper = $(this), 595 parent = swiper.closest('.fn__circle_slider'), 596 item = parent.find('.epsilon_item'), 597 timeoutId, 598 progressbar = parent.find('.progress-bar'), 599 progressContainer = parent.find('.fn-block-progress-circle'); 600 601 new Swiper(swiper[0], { 602 effect: 'fade', 603 direction: 'horizontal', 604 loop: false, 605 rtl: rtl, 606 speed: 500, 607 spaceBetween: 0, 608 slidesPerView: 1, 609 autoplay: { 610 delay: 7000, 611 disableOnInteraction: false, 612 }, 613 on: { 614 init: function(){ 615 if(item.length > 1){ 616 progressContainer.addClass('active'); 617 } 618 }, 619 slideChange: function(){ 620 if(item.length > 1){ 621 var circumference = 2 * Math.PI * 15; 622 progressbar.css({ 623 'transition-duration': '0s',
624 'stroke-dashoffset': circumference 625 }); 626 clearTimeout(timeoutId); 627 timeoutId = setTimeout(function(){ 628 progressbar.css({ 629 'transition-duration': '7s', 630 'stroke-dashoffset': 0 631 }); 632 },10); 633 } 634 635 }, 636 } 637 }); 638 639 }); 640 }, 641 642 }; 643 644 $( window ).on( 'elementor/frontend/init', FrenifyMow.init ); 645 646 647})(jQuery, window.elementorFrontend);
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.