1(function ($) { 2 "use strict"; 3 4 var WidgetDefaultHandler = function ($scope) { 5 if ($scope.find(".wow").length) { 6 var wow = new WOW({ 7 boxClass: "wow", // animated element css class (default is wow) 8 animateClass: "animated", // animation css class (default is animated) 9 mobile: true, // trigger animations on mobile devices (default is true) 10 live: true // act on asynchronously loaded content (default is true) 11 }); 12 wow.init(); 13 } 14 if ($scope.find(".tabs-box").length) { 15 $(".tabs-box .tab-buttons .tab-btn").on("click", function (e) { 16 e.preventDefault(); 17 var target = $($(this).attr("data-tab")); 18 19 if ($(target).is(":visible")) { 20 return false; 21 } else { 22 target 23 .parents(".tabs-box") 24 .find(".tab-buttons") 25 .find(".tab-btn") 26 .removeClass("active-btn"); 27 $(this).addClass("active-btn"); 28 target 29 .parents(".tabs-box") 30 .find(".tabs-content") 31 .find(".tab") 32 .fadeOut(0); 33 target 34 .parents(".tabs-box") 35 .find(".tabs-content") 36 .find(".tab") 37 .removeClass("active-tab"); 38 $(target).fadeIn(300); 39 $(target).addClass("active-tab"); 40 } 41 }); 42 } 43 44 45 if ($scope.find(".circle-progress").length) { 46 $(".circle-progress").appear(function () { 47 let circleProgress = $(".circle-progress"); 48 circleProgress.each(function () { 49 let progress = $(this); 50 let progressOptions = progress.data("options"); 51 progress.circleProgress(progressOptions); 52 }); 53 }); 54 } 55 56 // News Two Carousel 57 if ($scope.find(".blog-two__carousel").length) { 58 var blogCarousel = $(".blog-two__carousel"); 59 var nextBtn = $(".blog-two__carousel__custom-nav .left-btn"); 60 var prevBtn = $(".blog-two__carousel__custom-nav .right-btn"); 61 blogCarousel.owlCarousel({ 62 loop: true, 63 margin: 30, 64 nav: true, 65 smartSpeed: 500, 66 autoHeight: false, 67 autoplay: true, 68 dots: false, 69 autoplayTimeout: 10000, 70 navText: [ 71 '<span class="icon-left-arrow"></span>', 72 '<span class="icon-right-arrow"></span>' 73 ], 74 responsive: { 75 0: { 76 items: 1 77 }, 78 600: { 79 items: 1 80 }, 81 992: { 82 items: 3 83 }, 84 1024: { 85 items: 3 86 }, 87 1200: { 88 items: 3 89 } 90 } 91 }); 92 nextBtn.on("click", function (e) { 93 e.preventDefault(); 94 blogCarousel.trigger("next.owl.carousel", [500]); 95 }); 96 prevBtn.on("click", function (e) { 97 e.preventDefault(); 98 blogCarousel.trigger("prev.owl.carousel", [500]); 99 }); 100 } 101 102 if ($scope.find(".video-popup").length) { 103 $(".video-popup").magnificPopup({ 104 type: "iframe", 105 mainClass: "mfp-fade", 106 removalDelay: 160, 107 preloader: true, 108 109 fixedContentPos: false 110 }); 111 } 112
113 if ($scope.find(".img-popup").length) { 114 var groups = {}; 115 $(".img-popup").each(function () { 116 var id = parseInt($(this).attr("data-group"), 10); 117 118 if (!groups[id]) { 119 groups[id] = []; 120 } 121 122 groups[id].push(this); 123 }); 124 125 $.each(groups, function () { 126 $(this).magnificPopup({ 127 type: "image", 128 closeOnContentClick: true, 129 closeBtnInside: false, 130 gallery: { 131 enabled: true 132 } 133 }); 134 }); 135 } 136 137 // Popular Causes Progress Bar 138 if ($scope.find(".count-bar").length) { 139 $(".count-bar").appear( 140 function () { 141 var el = $(this); 142 var percent = el.data("percent"); 143 $(el).css("width", percent).addClass("counted"); 144 }, { 145 accY: -50 146 } 147 ); 148 } 149 150 //Fact Counter + Text Count 151 if ($scope.find(".count-box").length) { 152 $(".count-box").appear( 153 function () { 154 var $t = $(this), 155 n = $t.find(".count-text").attr("data-stop"), 156 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 157 158 if (!$t.hasClass("counted")) { 159 $t.addClass("counted"); 160 $({ 161 countNum: $t.find(".count-text").text() 162 }).animate({ 163 countNum: n 164 }, { 165 duration: r, 166 easing: "linear", 167 step: function () { 168 $t.find(".count-text").text(Math.floor(this.countNum)); 169 }, 170 complete: function () { 171 $t.find(".count-text").text(this.countNum); 172 } 173 }); 174 } 175 }, { 176 accY: 0 177 } 178 ); 179 } 180 181 //Jquery Knob animation 182 if ($scope.find(".dial").length) { 183 $(".dial").appear( 184 function () { 185 var elm = $(this); 186 var color = elm.attr("data-fgColor"); 187 var perc = elm.attr("value"); 188 var thickness = elm.attr("data-thickness"); 189 190 elm.knob({ 191 value: 0, 192 min: 0, 193 max: 100, 194 skin: "tron", 195 readOnly: true, 196 thickness: thickness, 197 dynamicDraw: true, 198 displayInput: false 199 }); 200 201 $({ 202 value: 0 203 }).animate({ 204 value: perc 205 }, { 206 duration: 2000, 207 easing: "swing", 208 progress: function () { 209 elm.val(Math.ceil(this.value)).trigger("change"); 210 } 211 }); 212 }, { 213 accY: 0 214 } 215 ); 216 } 217 218 if ($scope.find(".odometer").length) { 219 var odo = $(".odometer"); 220 odo.each(function () { 221 $(this).appear(function () { 222 var countNumber = $(this).attr("data-count"); 223 $(this).html(countNumber); 224 }); 225 }); 226 } 227 228 let thmSwiperSliders = $scope.find(".thm-swiper__slider"); 229 if (thmSwiperSliders.length) { 230 thmSwiperSliders.each(function () { 231 let elm = $(this); 232 let options = elm.data('swiper-options'); 233 let thmSwiperSlider = new Swiper(elm, "object" === typeof options ? options : JSON.parse(options)); 234 }); 235 } 236 237 let thmOwlCarousels = $scope.find(".thm-owl__carousel"); 238 if (thmOwlCarousels.length) { 239 thmOwlCarousels.each(function () { 240 let elm = $(this); 241 let options = elm.data('owl-options'); 242 let thmOwlCarousel = elm.owlCarousel("object" === typeof options ? options : JSON.parse(options)); 243 }); 244 } 245 246 let thmOwlNavCarousels = $scope.find(".thm-owl__carousel--custom-nav"); 247 if (thmOwlNavCarousels.length) { 248 thmOwlNavCarousels.each(function () { 249 let elm = $(this); 250 let owlNavPrev = elm.data('owl-nav-prev'); 251 let owlNavNext = elm.data('owl-nav-next');
252 $(owlNavPrev).on("click", function (e) { 253 elm.trigger('prev.owl.carousel'); 254 e.preventDefault(); 255 }) 256 257 $(owlNavNext).on("click", function (e) { 258 elm.trigger('next.owl.carousel'); 259 e.preventDefault(); 260 }) 261 }); 262 } 263 264 // Accrodion 265 if ($scope.find(".accrodion-grp").length) { 266 var accrodionGrp = $(".accrodion-grp"); 267 accrodionGrp.each(function () { 268 var accrodionName = $(this).data("grp-name"); 269 var Self = $(this); 270 var accordion = Self.find(".accrodion"); 271 Self.addClass(accrodionName); 272 Self.find(".accrodion .accrodion-content").hide(); 273 Self.find(".accrodion.active").find(".accrodion-content").show(); 274 accordion.each(function () { 275 $(this) 276 .find(".accrodion-title") 277 .on("click", function () { 278 if ($(this).parent().hasClass("active") === false) { 279 $(".accrodion-grp." + accrodionName) 280 .find(".accrodion") 281 .removeClass("active"); 282 $(".accrodion-grp." + accrodionName) 283 .find(".accrodion") 284 .find(".accrodion-content") 285 .slideUp(); 286 $(this).parent().addClass("active"); 287 $(this).parent().find(".accrodion-content").slideDown(); 288 } 289 }); 290 }); 291 }); 292 } 293 294 if ($scope.find(".listing-details__contact-info-phone").length) { 295 $(".listing-details__contact-info-phone").on("click", function (e) { 296 e.preventDefault(); 297 var textElement = $(this).find(".text h5"); 298 var mainText = textElement.data("number"); 299 var toggleText = textElement.data("toggle-number"); 300 if (textElement.text() == mainText) { 301 textElement.text(toggleText); 302 } else { 303 textElement.text(mainText); 304 } 305 }); 306 } 307 308 309 if ($scope.find(".listing-top__map-show-hide").length) { 310 $(".listing-top__map-show-hide").on("click", function () { 311 $(this).toggleClass("hidden"); 312 var textElement = $(this).find(".listing-top__map-show-hide-text span"); 313 if (textElement.text() == textElement.data("text")) { 314 textElement.text(textElement.data("toggle-text")); 315 } else { 316 textElement.text(textElement.data("text")); 317 } 318 $(".listing__map").toggleClass("hidden"); 319 $(".listing__content").toggleClass("hidden"); 320 }); 321 } 322 323 324 325 if ($scope.find(".banner-bg-slide").length) { 326 $(".banner-bg-slide").each(function () { 327 var Self = $(this); 328 var bgSlideOptions = Self.data("options"); 329 var bannerTwoSlides = Self.vegas(bgSlideOptions); 330 }); 331 } 332 333 }; 334 335 336 var WidgetTeamHandler = function ($scope) { 337 // Team One Carousel 338 if ($scope.find(".team-one__carousel").length) { 339 $(".team-one__carousel").owlCarousel({ 340 loop: true, 341 margin: 30, 342 nav: false, 343 smartSpeed: 500, 344 autoHeight: false, 345 autoplay: true, 346 dots: true, 347 autoplayTimeout: 10000, 348 navText: [ 349 '<span class="icon-left-arrow"></span>', 350 '<span class="icon-right-arrow"></span>' 351 ], 352 responsive: { 353 0: { 354 items: 1 355 }, 356 600: { 357 items: 1 358 }, 359 800: { 360 items: 2 361 }, 362 1024: { 363 items: 4 364 }, 365 1200: { 366 items: 4 367 } 368 } 369 }); 370 } 371 }; 372 373 var WidgetPriceHandler = function ($scope) { 374 if ($scope.find(".pricing-tabs").length) { 375 //Pricing Tabs 376 if ($(".pricing-tabs").length) { 377 $(".pricing-tabs .tab-btns .tab-btn").on("click", function (e) { 378 e.preventDefault(); 379 var target = $($(this).attr("data-tab")); 380 381 if ($(target).hasClass("actve-tab")) { 382 return false; 383 } else { 384 $(".pricing-tabs .tab-btns .tab-btn").removeClass("active-btn"); 385 $(this).addClass("active-btn"); 386 $(".pricing-tabs .pr-content .pr-tab").removeClass("active-tab"); 387 $(target).addClass("active-tab"); 388 } 389 }); 390 } 391 } 392 }; 393 394 395 var WidgetPortfolioHandler = function ($scope) { 396 // ===Portfolio=== 397 if ($scope.find(".masonary-layout").length) { 398 $(".masonary-layout").isotope({ 399 layoutMode: "masonry" 400 }); 401 } 402 403 if ($scope.find(".post-filter").length) { 404 $(".post-filter li") 405 .children(".filter-text") 406 .on("click", function () { 407 var Self = $(this); 408 var selector = Self.parent().attr("data-filter"); 409 $(".post-filter li").removeClass("active"); 410 Self.parent().addClass("active"); 411 $(".filter-layout").isotope({ 412 filter: selector, 413 animationOptions: { 414 duration: 500, 415 easing: "linear", 416 queue: false 417 } 418 }); 419 return false; 420 }); 421 } 422 423 if ($(".post-filter.has-dynamic-filters-counter").length) { 424 // var allItem = $('.single-filter-item').length; 425 var activeFilterItem = $(".post-filter.has-dynamic-filters-counter").find( 426 "li" 427 ); 428 activeFilterItem.each(function () { 429 var filterElement = $(this).data("filter"); 430 var count = $(".filter-layout").find(filterElement).length; 431 $(this) 432 .children(".filter-text") 433 .append('<span class="count">(' + count + ")</span>"); 434 }); 435 } 436 437 // Project Two Carousel 438 if ($scope.find(".project-two__carousel").length) { 439 $(".project-two__carousel").owlCarousel({ 440 loop: true, 441 margin: 30, 442 nav: false, 443 smartSpeed: 500, 444 autoHeight: false, 445 autoplay: true, 446 dots: true, 447 autoplayTimeout: 10000, 448 navText: [ 449 '<span class="icon-left-arrow"></span>', 450 '<span class="icon-right-arrow"></span>' 451 ], 452 responsive: { 453 0: { 454 items: 1 455 }, 456 600: { 457 items: 1 458 }, 459 800: { 460 items: 2 461 }, 462 1024: { 463 items: 3 464 }, 465 1200: { 466 items: 4 467 } 468 } 469 }); 470 } 471 }; 472 473 var WidgetFooterSubscribeHandler = function ($scope) { 474 // mailchimp form 475 if ($scope.find(".mc-form").length) { 476 $(".mc-form").each(function () { 477 var Self = $(this); 478 var mcURL = Self.data("url"); 479 var mcResp = Self.parent().find(".mc-form__response"); 480 481 Self.ajaxChimp({ 482 url: mcURL, 483 callback: function (resp) { 484 // appending response 485 mcResp.append(function () { 486 return '<p class="mc-message">' + resp.msg + "</p>"; 487 }); 488 // making things based on response 489 if (resp.result === "success") { 490 // Do stuff 491 Self.removeClass("errored").addClass("successed"); 492 mcResp.removeClass("errored").addClass("successed"); 493 Self.find("input").val(""); 494 495 mcResp.find("p").fadeOut(10000); 496 } 497 if (resp.result === "error") { 498 Self.removeClass("successed").addClass("errored"); 499 mcResp.removeClass("successed").addClass("errored"); 500 Self.find("input").val(""); 501 502 mcResp.find("p").fadeOut(10000); 503 } 504 } 505 }); 506 }); 507 } 508 }; 509 510 var WidgetContactHandler = function ($scope) { 511 if ($(".get-insurance__progress-range").length) { 512 $(".get-insurance__progress-range").each(function () { 513 let balanceTag = $(this).find(".get-insurance__balance span"); 514 let balanceInput = $(this).find(".get-insurance__balance__input"); 515 $(this).find(".balance-range-slider").ionRangeSlider({ 516 onStart: function (data) { 517 balanceTag.html(data.from); 518 balanceInput.prop("value", data.from); 519 }, 520 onChange: function (data) { 521 balanceTag.html(data.from); 522 balanceInput.prop("value", data.from); 523 } 524 }); 525 }); 526 } 527 528 if ($(".range-slider-price").length) { 529 var priceRange = document.getElementById("range-slider-price"); 530 531 noUiSlider.create(priceRange, { 532 start: [30, 150], 533 limit: 200, 534 behaviour: "drag", 535 connect: true, 536 range: { 537 min: 10, 538 max: 200 539 } 540 }); 541 542 var limitFieldMin = document.getElementById("min-value-rangeslider"); 543 var limitFieldMax = document.getElementById("max-value-rangeslider"); 544 545 priceRange.noUiSlider.on("update", function (values, handle) { 546 (handle ? $(limitFieldMax) : $(limitFieldMin)).text(values[handle]); 547 }); 548 } 549 }; 550 551 552 553 //elementor front start 554 $(window).on("elementor/frontend/init", function () { 555 elementorFrontend.hooks.addAction( 556 "frontend/element_ready/widget", 557 WidgetDefaultHandler 558 ); 559 560 561 elementorFrontend.hooks.addAction( 562 "frontend/element_ready/insur-team.default", 563 WidgetTeamHandler 564 ); 565 566 elementorFrontend.hooks.addAction( 567 "frontend/element_ready/insur-pricing.default", 568 WidgetPriceHandler 569 ); 570 571 elementorFrontend.hooks.addAction( 572 "frontend/element_ready/insur-portfolio.default", 573 WidgetPortfolioHandler 574 ); 575 576 elementorFrontend.hooks.addAction( 577 "frontend/element_ready/footer-subscribe.default", 578 WidgetFooterSubscribeHandler 579 ); 580 581 582 elementorFrontend.hooks.addAction( 583 "frontend/element_ready/insur-contact-form.default", 584 WidgetContactHandler 585 ); 586 });
587})(jQuery);
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.