PageSourceSearch

https://www.icontact.com/wp-content/themes/iccwpt/library/source-js/functions.js?v=1.0.01790237736&ver=7.1.1

js icontact.com collected 2026-09-24 08:27:40 UTC 17,932 bytes, 443 lines download raw bytes

1window.onload = function() {
2
3  (function($){
4    document.body.classList.add("loaded-doc");
5    function cscroll() {
6      $(window).bind('scroll', function() {
7        let stv = $(window).scrollTop();
8        if(stv > 16) {
9          $("body").addClass("scrolled-doc");
10        }
11        else {
12          $("body").removeClass("scrolled-doc");
13        }
14      });
15    }
16    $(window).on('resize',function() {
17      cscroll();
18    }).trigger('resize');
19
20
21    function externalLinks() {
22      for(var c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) {
23        var b = c[a];
24        b.getAttribute("href") && b.hostname !== location.hostname && (b.target = "_blank")
25      }
26    }
27    externalLinks();   
28    if(document.querySelector(".m-h .nav-trigger")){
29      document.querySelector(".m-h .nav-trigger").addEventListener("click", function(e){ 
30        document.querySelector("body").classList.toggle("mobile-nav-active");
31        e.preventDefault(); 
32      });
33    }
34    
35    $(".m-h .menu-item-has-children").each(function(){
36      $(this).find("a:first").append("<span class='mobile-submenu-trigger'></span>");
37    });
38
39    $(document).on("click", ".m-h .menu-item-has-children .mobile-submenu-trigger", function(){
40      $(this).parent().parent().toggleClass("active-submenu-child");
41      return false;
42    });
43
44    if(window.location.href.includes("pricing") && window.location.hash && $(".comparison-modal").length > 0){
45      if(window.location.hash === "#full-pricing-comparision") {
46        $(".comparison-modal").addClass("active");
47      }
48
49    }
50
51    function setCLH() {
52      var ww = jQuery(window).width();
53      if (ww < 1025 && $(".pricing-table").length > 0) {
54        if($(".pricing-table .slick-track").length <= 0) {
55          $(".pricing-table .grid-row.col-3.pt-info.active").slick({
56            initialSlide: 1,
57            slidesToShow: 1,
58            slideToscroll: 1,
59            arrows: false,
60            dots: true,
61            infinite: false,
62            centerMode: true,
63            centerPadding: "84px",
64            responsive: [
65              {
66                breakpoint: 480,
67                settings: {
68                  centerPadding: "40px"
69                }
70              }
71            ]
72          });
73        }
74      }
75      else {
76        if($(".pricing-table .slick-track").length > 0) {
77          $(".pricing-table .grid-row.col-3.pt-info.active").slick('unslick'); 
78        }
79      }
80    }
81
82    $(document).on("click",".single-cta-btn a, .bcb-copy a", function(){
83      let ctg = $(this).attr("href");
84      if(ctg.includes("#") && $(ctg).length > 0) {
85        let correction = -148;
86        $('html,body').animate({scrollTop: ($(ctg).offset().top+correction)}, 1000);
87        return false;
88      }
89    });
90    $(document).on("click",".sidebar-dropdown .toggle-sidebar-dropdown a", function(){
91      $(".sidebar-dropdown").toggleClass("active");
92      return false;
93    })
94    $(document).on("click", ".back-from-search", function(){
95      history.back();
96      return false;
97    });
98
99    $(document).on("click", ".integration-hub .ih-dd p", function(){
100      $(".article-sidebar .ih-dd").not($(this).parent()).removeClass("active");
101      $(this).parent().toggleClass("active");
102      return false;
103    });
104
105    if($("body").hasClass("page-id-1136") && window.location.hash) {
106      let correction = -132;
107      let target = window.location.hash;
108      $('html,body').animate({scrollTop: ($(target).offset().top+correction)}, 1000);
109    }
110    $("#formLogin1 .form-body .frm-row").slice(1).find(".colm6").slice(1).append(' | <a href="#" class="reveal-password">Reveal Password</a>');
111
112    $(document).on("click",".promo-banner .pb-toggle",function(){
113      $(".promo-banner").toggleClass("hidden");
114      return false;
115    })
116    $(document).on("click", ".reveal-password",function(){
117      if($("#password").length > 0) {
118        if($("#password").attr("type") == "password") {
119           $("#password").attr("type", "text");
120        }
121        else {
122          $("#password").attr("type","password");
123        }
124      }
125      var text = $(this).text();
126      $(this).text(text == "Reveal Password" ? "Hide Password" : "Reveal Password");
127    })
128
129    $(document).on("click",".comparison-modal .cm-close, .pricing-comparision-modal",function(){
130      $(".comparison-modal .cm-heading.standard-package .info a").attr("href",$(".pricing-table .package-a .pti-cta a").attr("href"));
131      $(".comparison-modal .cm-heading.premium-package .info a").attr("href",$(".pricing-table .package-b .pti-cta a").attr("href"));
132      $(".comparison-modal .cm-heading.ultimate-package .info a").attr("href",$(".pricing-table .package-c .pti-cta a").attr("href"));
133      $(".cm-heading.standard-package .price").empty().html($(".pricing-table .pt-info.active .package-a .pti-price.active p").html());
134      $(".cm-heading.premium-package .price").empty().html($(".pricing-table .pt-info.active .package-b .pti-price.active p").html());
135      $(".cm-heading.ultimate-package .price").empty().html($(".pricing-table .pt-info.active .package-c .pti-price.active p").html());
136      $(".cm-heading.standard-package .info strong, .cm-heading.premium-package .info strong, .cm-heading.ultimate-package .info strong").empty().text(Intl.NumberFormat('en-US').format($(".contacts-no-dd ul .active").text())+" contacts");
137      $(".comparison-modal").toggleClass("active");
138      return false;
139    });
140
141    $(document).on("click", ".contacts-no-dd p",function(){
142      $(this).parent().toggleClass("active");
143      return false;
144    });
145    $(document).on("click", ".op-selector p",function(){
146      $(this).parent().toggleClass("active");
147      return false;
148    });
149
150    $(document).on("click",".comparison-modal.active",function(event) {
151      if (event.target === this) {
152        $(".comparison-modal").removeClass("active");
153      }
154    });
155
156    $(document).on("click",".fi-logo.w-link",function(){
157      window.location.href = $(this).attr("data-url");
158    });
159    $(document).on("click", ".page-content",function(){
160      if($("body").hasClass("page-id-3713") && $(".container.wide").length > 0) {
161        if($(".pricing-table-info .contacts-no-dd").hasClass("active")){
162          $(".pricing-table-info .contacts-no-dd").removeClass("active");
163        }
164      }
165    });
166
167    $(document).on("click", ".glossary-terms a",function(){
168      let correction = -132;
169      let target = $(this).attr("href");
170      $('html,body').animate({scrollTop: ($(target).offset().top+correction)}, 1000);
171      return false;
172    });
173    $(document).on("click", ".contacts-no-dd li", function(){
174      $(".contacts-no-dd p").text($(this).text());
175      $(".contacts-no-dd ul li").removeClass("active");
176      $(this).addClass("active");
177      $(".package-info.package-a .pti-price, .package-info.package-b .pti-price, .package-info.package-c .pti-price").removeClass("active");
178      $(".package-info.package-a .pti-price.tier-"+$(this).text()+", .package-info.package-b .pti-price.tier-"+$(this).text()+", .package-info.package-c .pti-price.tier-"+$(this).text()).addClass("active");
179      if($(".period-selector a.active").attr("data-target") == "monthly-prices") {
180        $(".pricing-table .package-a .pti-cta a").attr("href","/signup?buynow=1&term=1&sl="+$(this).text()+"&sAccountType=standard");
181        $(".pricing-table .package-b .pti-cta a").attr("href","/signup?buynow=1&term=1&sl="+$(this).text()+"&sAccountType=premium");
182        $(".pricing-table .package-c .pti-cta a").attr("href","/signup?buynow=1&term=1&sl="+$(this).text()+"&sAccountType=ultimate");
183      }
184      else {
185        $(".pricing-table .package-a .pti-cta a").attr("href","/signup?buynow=1&term=12&sl="+$(this).text()+"&sAccountType=standard");
186        $(".pricing-table .package-b .pti-cta a").attr("href","/signup?buynow=1&term=12&sl="+$(this).text()+"&sAccountType=premium");
187        $(".pricing-table .package-c .pti-cta a").attr("href","/signup?buynow=1&term=12&sl="+$(this).text()+"&sAccountType=ultimate");
188      }
189      $(".contacts-no-dd").removeClass("active");
190    });
191
192
193    $(document).on("click", ".op-selector li", function(){
194      $(".op-selector p").text($(this).text());
195      $(".op-selector ul li").removeClass("active");
196      $(this).addClass("active");
197      $(".plp-packs-info .pi-price").removeClass("active");
198      $(".plp-packs-info .pi-price.tier-"+$(this).text()).addClass("active");
199      $(".plp-packs-info .pi-cta-btn-a").attr("href","/signup?buynow=1&term=1&sl="+$(this).text()+"&sAccountType=standard");
200      $(".plp-packs-info .pi-cta-btn-b").attr("href","/signup?buynow=1&term=1&sl="+$(this).text()+"&sAccountType=premium");
201      $(".op-selector").removeClass("active");
202    });
203    
204    $(document).on("click", ".image-modal", function(){
205      let mimage = $(this).attr("href");
206      $("body").addClass("visible-popup").append('<div class="popup-modal"><a href="#" class="close">&times;</a><div class="pm-content"><img src="'+mimage+'"></div></div>')
207      return false;
208    });
209    $(document).on("click", ".popup-modal .close, .popup-modal", function(){
210      $(".popup-modal").remove();
211      $("body").removeClass("visible-popup");
212      return false;
213    });
214    
215    $(document).on("click",".custom-video",function(){
216      if($(this).hasClass("in-modal")) {
217        let vid = $(this).attr("data-vid");
218        if($(this).hasClass("hosted-file")) {
219          $("body").addClass("visible-popup").append('<div class="video-modal"><div class="vm-container"><a href="#" class="vm-close">&times;</a><video width="320" height="240" controls autoplay><source src="'+vid+'" type="video/mp4"></video></div></div>');
220        }
221        else {        
222          $("body").append('<div class="video-modal"><div class="vm-container"><a href="#" class="vm-close">&times;</a><iframe src="https://www.youtube.com/embed/'+vid+'?autoplay=1" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen" allow="autoplay"></iframe></div></div>');
223        }
224      }
225      else {
226        if(!$(this).hasClass("active")){
227          $(this).addClass("active");
228          let vid = $(this).attr("data-vid");
229          if($(this).hasClass("video-file")) {
230            $(this).append('<video width="320" height="240" controls autoplay><source src="'+vid+'" type="video/mp4"></video>');  
231          }
232          else {
233            $(this).append('<iframe src="https://www.youtube.com/embed/'+vid+'?autoplay=1" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen" allow="autoplay"></iframe>');
234          }
235        }
236      }
237    });
238    $(document).on("click", ".video-modal .vm-close",function(){
239      $(".video-modal").remove();
240      $("body").removeClass("visible-popup");
241      return false;
242    });
243
244    $(document).on("click", ".tabs-nav .tn-entry .heading", function(){
245      $(".tabs-nav .tn-entry, .tabs-content .tn-entry").removeClass("active");
246      $(this).parent().addClass("active");
247      $(".tabs-content #"+$(this).attr("data-tid")).addClass("active");
248      return false;
249    })
250
251    $(document).on("click",".collapsible .label",function(){
252      $(".collapsible").not($(this).parent()).removeClass("active");
253      $(this).parent().toggleClass("active");
254      return false;
255    });
256
257    if($(".copy-block table").length > 0) {
258      $(".copy-block table").each(function(){
259        $(this).wrapAll('<div class="responsive-table-wrapper"></div>');
260      });
261    }
262
263    $(document).on("click",".period-selector p a",function(){
264      $(".period-selector p a").removeClass("active");
265      $(this).addClass("active");
266      $(".pricing-table .pt-info").removeClass("active");
267      $(".pricing-table .pt-info."+$(this).attr("data-target")).addClass("active");
268      let cscn = $(".pricing-table .contacts-no-dd .active").text();
269      if($(this).attr("data-target") == "monthly-prices") {
270        $(".pricing-table .package-a .pti-cta a").attr("href","/signup?buynow=1&term=1&sl="+cscn+"&sAccountType=standard");
271        $(".pricing-table .package-b .pti-cta a").attr("href","/signup?buynow=1&term=1&sl="+cscn+"&sAccountType=premium");
272        $(".pricing-table .package-c .pti-cta a").attr("href","/signup?buynow=1&term=1&sl="+cscn+"&sAccountType=ultimate");
273      }
274      else {
275        $(".pricing-table .package-a .pti-cta a").attr("href","/signup?buynow=1&term=12&sl="+cscn+"&sAccountType=standard");
276        $(".pricing-table .package-b .pti-cta a").attr("href","/signup?buynow=1&term=12&sl="+cscn+"&sAccountType=premium");
277        $(".pricing-table .package-c .pti-cta a").attr("href","/signup?buynow=1&term=12&sl="+cscn+"&sAccountType=ultimate");
278      }
279      var ww = jQuery(window).width();
280      if (ww < 1025) {
281        if(!$(".pricing-table .grid-row.col-3.pt-info.active").hasClass("slick-initialized")){
282          $(".pricing-table .grid-row.col-3.pt-info.active").slick({
283            initialSlide: 1,
284            slidesToShow: 1,
285            slideToscroll: 1,
286            arrows: false,
287            dots: true,
288            infinite: false,
289            centerMode: true,
290            centerPadding: "84px",
291            responsive: [
292              {
293                breakpoint: 480,
294                settings: {
295                  centerPadding: "40px"
296                }
297              }
298            ]
299          });
300        }
301      }
302      return false;
303    })
304    
305    if($(".fc-carousel").length > 0) {
306      $(".fc-carousel").slick({
307        slidesToShow: 5,
308        slidesToScroll: 1,
309        arrows: false,
310        dots: false,
311        infinite: true,
312        autoplay: true,
313        autoplaySpeed: 3000,
314        responsive: [
315          {
316            breakpoint: 840,
317            settings: {
318              slidesToShow: 3
319            }
320          }
321        ]
322      });
323    }
324
325    if($(".pricing-table").length > 0) {
326      $(".pricing-table .package-a .pti-cta a").attr("href","/signup?buynow=1&term=1&sl=500&sAccountType=standard");
327      $(".pricing-table .package-b .pti-cta a").attr("href","/signup?buynow=1&term=1&sl=500&sAccountType=premium");
328      $(".pricing-table .package-c .pti-cta a").attr("href","/signup?buynow=1&term=1&sl=500&sAccountType=ultimate");
329    }
330
331    var ww = jQuery(window).width();
332    if (ww < 1025 && $(".pricing-table").length > 0) {
333      if($(".pricing-table .slick-track").length <= 0) {
334        $(".pricing-table .grid-row.col-3.pt-info.active").slick({
335          initialSlide: 1,
336          slidesToShow: 1,
337          slideToscroll: 1,
338          arrows: false,
339          dots: true,
340          infinite: false,
341          centerMode: true,
342          centerPadding: "84px",
343          responsive: [
344            {
345              breakpoint: 480,
346              settings: {
347                centerPadding: "40px"
348              }
349            }
350          ]
351        });
352      }
353    }
354    else {
355      if($(".pricing-table .slick-track").length > 0) {
356        $(".pricing-table .grid-row.col-3.pt-info.active").slick('unslick'); 
357      }
358    }
359
360
361    $(window).on('resize',function() {
362      setCLH();
363    }).trigger('resize');
364
365    if($(".jump-to-section").length > 0){
366      String.prototype.cleanup = function() {
367        return this.toLowerCase().replace(/[^a-zA-Z0-9]+/g, "-");
368      }
369      if($(".sac-copy h2").length > 1 || $(".sac-copy h3").length > 1){
370        $(".jump-to-section").removeClass("hidden");
371        let counter = 0;
372        $(".sac-copy h2, .sac-copy h3").each(function(){
373          let clabel = $(this).text().toLowerCase();
374          clabel = clabel.replace(/^\w/, (c) => c.toUpperCase());
375          let urllabel = $(this).text().cleanup();
376          counter++;
377          $(this).attr("id","heading-"+counter);
378          $(".jump-to-section .jump-to-section-links").append("<p><a href='#heading-"+counter+"' class='capitalize-text'>"+clabel+"</a></p>");
379        });
380      }
381
382      $(document).on("click", ".jump-to-section a", function(){
383        let correction = -124;
384        let target = $(this).attr("href");
385        $('html,body').animate({scrollTop: ($(target).offset().top+correction)}, 1000);
386        return false;
387      });
388    }
389    
390    $(document).on("click",".jump-to-section h4",function(){
391      $(this).parent().toggleClass("active");
392      return false;
393    })
394
395    
396    if($(".hp-testimonial .pricing-testimonials").length > 0) {
397      $(document).on("click",".pricing-testimonials .pricing-testimonials-nav .next", function(){
398        if($(".pricing-testimonials .pricing-testimonials-entry.active").next().hasClass("pricing-testimonials-entry")){
399          $(".pricing-testimonials .pricing-testimonials-entry.active").removeClass("active").next().addClass("active");
400        }
401        else {
402          $(".pricing-testimonials .pricing-testimonials-entry.active").removeClass("active");
403          $(".pricing-testimonials .pricing-testimonials-entry:first").addClass("active");
404        }
405        return false;
406      });
407      $(document).on("click",".pricing-testimonials .pricing-testimonials-nav .prev", function(){
408        if($(".pricing-testimonials .pricing-testimonials-entry.active").prev().hasClass("pricing-testimonials-entry")){
409          $(".pricing-testimonials .pricing-testimonials-entry.active").removeClass("active").prev().addClass("active");
410        }
411        else {
412          $(".pricing-testimonials .pricing-testimonials-entry.active").removeClass("active");
413          $(".pricing-testimonials .pricing-testimonials-entry:last").addClass("active");
414        }
415        return false;
416      });
417    }
418    if($(".customer-testimonials").length > 0) {
419      $(".customer-testimonials").slick({
420        slidesToShow: 2,
421        slidesToScroll: 1,
422        autoplay: true,
423        autoplaySpeed: 6500,
424        arrows: false,
425        dots: true,
426        infinite: false,
427        responsive: [
428          {
429            breakpoint: 840,
430            settings: {
431              slidesToShow: 1
432            }
433          }
434        ]
435      });
436    }
437
438
439    
440
441
442  })($);
443}

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.