PageSourceSearch

https://www.thecureiv.com/wp-content/themes/the_cure_iv_new/js/common.js?v=1790403619

js thecureiv.com collected 2026-09-26 06:21:01 UTC 9,778 bytes, 305 lines download raw bytes

1jQuery(document).ready(function () {
2  var videoSlider = jQuery('.banner-Slider');
3  videoSlider.owlCarousel({
4    loop: true,
5    margin: 10,
6    nav: true,
7    dots: false,
8    items: 1,
9    autoplay: true,
10    autoplayHoverPause: true
11  });
12
13  videoSlider.on('translate.owl.carousel', function (e) {
14    jQuery('.owl-item .item video').each(function () {
15      // pause playing video - after sliding
16      jQuery(this).get(0).pause();
17    });
18  });
19
20  videoSlider.on('translated.owl.carousel', function (e) {
21    // check: does the slide have a video?
22    if (jQuery('.owl-item.active').find('video').length !== 0) {
23      // play video in active slide
24      jQuery('.owl-item.active .item video').get(0).play();
25    }
26  });
27  jQuery('video').trigger('play');
28
29});
30
31
32
33jQuery(document).ready(function () {
34  var owl = jQuery('.brand-carousel');
35  owl.owlCarousel({
36    loop: true,
37    margin: 10,
38    navRewind: false,
39    nav: false,
40    dots: false,
41    autoplay: true,
42    autoplayHoverPause: true,
43    responsive: {
44      0: {
45        items: 1
46      },
47      600: {
48        items: 3
49      },
50      1000: {
51        items: 4
52      }
53    }
54  })
55});
56
57
58
59
60$(function () {
61  $('#navigation').uNav();
62});
63
64$(window).scroll(function () {
65  if ($(this).scrollTop() > 50) {
66    $('#navigation').addClass('sticky-header');
67  } else {
68    $('#navigation').removeClass('sticky-header');
69  }
70});
71
72$(".learn-more").click(function () {
73  $('.our-test-learn').toggle("slide");
74});
75
76
77
78
79/*!
80 * modified Simple lightbox effect in pure JS
81 * @see {@link https://github.com/squeral/lightbox}
82 * @see {@link https://github.com/squeral/lightbox/blob/master/lightbox.js}
83 * @params {Object} elem Node element
84 * @params {Object} [rate] debounce rate, default 500ms
85 * new IframeLightbox(elem)
86 * passes jshint
87 */
88(function (root, document) {
89  "use strict";
90  var docBody = document.body || "";
91
92  var appendChild = "appendChild";
93  var classList = "classList";
94  var createElement = "createElement";
95  var dataset = "dataset";
96  var getAttribute = "getAttribute";
97  var getElementById = "getElementById";
98  var getElementsByClassName = "getElementsByClassName";
99  var _addEventListener = "addEventListener";
100
101  var containerClass = "iframe-lightbox";
102  var iframeLightboxOpenClass = "iframe-lightbox--open";
103  var iframeLightboxLinkIsBindedClass = "iframe-lightbox-link--is-binded";
104
105  var isLoadedClass = "is-loaded";
106  var isOpenedClass = "is-opened";
107  var isShowingClass = "is-showing";
108
109  var IframeLightbox = function (elem, settings) {
110    var options = settings || {};
111    this.trigger = elem;
112    this.el = document[getElementsByClassName](containerClass)[0] || "";
113    this.body = this.el ? this.el[getElementsByClassName]("body")[0] : "";
114    this.content = this.el ? this.el[getElementsByClassName]("content")[0] : "";
115    this.src = elem[dataset].src || "";
116    this.href = elem[getAttribute]("href") || "";
117    this.dataPaddingBottom = elem[dataset].paddingBottom || "";
118    this.dataScrolling = elem[dataset].scrolling || "";
119    this.rate = options.rate || 500;
120    this.scrolling = options.scrolling;
121    /*!
122     * Event handlers
123     */
124    this.onOpened = options.onOpened;
125    this.onIframeLoaded = options.onIframeLoaded;
126    this.onLoaded = options.onLoaded;
127    this.onCreated = options.onCreated;
128    this.onClosed = options.onClosed;
129    this.init();
130  };
131  IframeLightbox.prototype.init = function () {
132    var _this = this;
133    if (!this.el) {
134      this.create();
135    }
136    var debounce = function (func, wait) {
137      var timeout,
138        args,
139        context,
140        timestamp;
141      return function () {
142        context = this;
143        args = [].slice.call(arguments, 0);
144        timestamp = new Date();
145        var later = function () {
146          var last = (new Date()) - timestamp;
147          if (last < wait) {
148            timeout = setTimeout(later, wait - last);
149          } else {
150            timeout = null;
151            func.apply(context, args);
152          }
153        };
154        if (!timeout) {
155          timeout = setTimeout(later, wait);
156        }
157      };
158    };
159    var logic = function () {
160      _this.open();
161    };
162    if (!this.trigger[classList].contains(iframeLightboxLinkIsBindedClass)) {
163      this.trigger[classList].add(iframeLightboxLinkIsBindedClass);
164      this.trigger[_addEventListener]("click", function (e) {
165        e.stopPropagation();
166        e.preventDefault();
167        debounce(logic, this.rate).call();
168      });
169    }
170  };
171  IframeLightbox.prototype.create = function () {
172    var _this = this,
173      bd = document[createElement]("div");
174    this.el = document[createElement]("div");
175    this.content = document[createElement]("div");
176    this.body = document[createElement]("div");
177    this.el[classList].add(containerClass);
178    bd[classList].add("backdrop");
179    this.content[classList].add("content");
180    this.body[classList].add("body");
181    this.el[appendChild](bd);
182    this.content[appendChild](this.body);
183    this.contentHolder = document[createElement]("div");
184    this.contentHolder[classList].add("content-holder");
185    this.contentHolder[appendChild](this.content);
186    this.el[appendChild](this.contentHolder);
187    this.btnClose = document[createElement]("a");
188    this.btnClose[classList].add("btn-close");
189    /* jshint -W107 */
190    this.btnClose.setAttribute("href", "javascript:void(0);");
191    /* jshint +W107 */
192    this.el[appendChild](this.btnClose);
193    docBody[appendChild](this.el);
194    bd[_addEventListener]("click", function () {
195      _this.close();
196    });
197    this.btnClose[_addEventListener]("click", function () {
198      _this.close();
199    });
200    root[_addEventListener]("keyup", function (ev) {
201      if (27 === (ev.which || ev.keyCode)) {
202        _this.close();
203      } x
204    });
205    var clearBody = function () {
206      if (_this.isOpen()) {
207        return;
208      }
209      _this.el[classList].remove(isShowingClass);
210      _this.body.innerHTML = "";
211    };
212    this.el[_addEventListener]("transitionend", clearBody, false);
213    this.el[_addEventListener]("webkitTransitionEnd", clearBody, false);
214    this.el[_addEventListener]("mozTransitionEnd", clearBody, false);
215    this.el[_addEventListener]("msTransitionEnd", clearBody, false);
216    this.callCallback(this.onCreated, this);
217  };
218  IframeLightbox.prototype.loadIframe = function () {
219    var _this = this;
220    this.iframeId = containerClass + Date.now();
221    this.iframeSrc = this.src || this.href || "";
222    /*!
223     * @see {@link https://stackoverflow.com/questions/18648203/how-remove-horizontal-scroll-bar-for-iframe-on-google-chrome}
224     */
225    var iframeHTML = [];
226    iframeHTML.push('<iframe src="' + this.iframeSrc + '" name="' + this.iframeId + '" id="' + this.iframeId + '" onload="this.style.opacity=1;" style="opacity:0;border:none;" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true" height="166" frameborder="no"></iframe>');
227    /*!
228     * @see {@link https://epic-spinners.epicmax.co/}
229     */
230    /*iframeHTML.push('<div class="spring-spinner"><div class="spring-spinner-part top"><div class="spring-spinner-rotator"></div></div><div class="spring-spinner-part bottom"><div class="spring-spinner-rotator"></div></div></div>');*/
231    iframeHTML.push('<div class="half-circle-spinner"><div class="circle circle-1"></div><div class="circle circle-2"></div></div>');
232    this.body.innerHTML = iframeHTML.join("");
233    (function (iframeId, body) {
234      var iframe = document[getElementById](iframeId);
235      iframe.onload = function () {
236        /* console.log("loaded iframe:", this.iframeSrc); */
237        this.style.opacity = 1;
238        body[classList].add(isLoadedClass);
239        if (_this.scrolling || _this.dataScrolling) {
240          iframe.removeAttribute("scrolling");
241          iframe.style.overflow = "scroll";
242        } else {
243          iframe.setAttribute("scrolling", "no");
244          iframe.style.overflow = "hidden";
245        }
246        _this.callCallback(_this.onIframeLoaded, _this);
247        _this.callCallback(_this.onLoaded, _this);
248      };
249    })(this.iframeId, this.body);
250  };
251  IframeLightbox.prototype.open = function () {
252    this.loadIframe();
253    if (this.dataPaddingBottom) {
254      this.content.style.paddingBottom = this.dataPaddingBottom;
255    } else {
256      this.content.removeAttribute("style");
257    }
258    this.el[classList].add(isShowingClass);
259    this.el[classList].add(isOpenedClass);
260    docBody[classList].add(iframeLightboxOpenClass);
261    this.callCallback(this.onOpened, this);
262  };
263  IframeLightbox.prototype.close = function () {
264    this.el[classList].remove(isOpenedClass);
265    this.body[classList].remove(isLoadedClass);
266    docBody[classList].remove(iframeLightboxOpenClass);
267    this.callCallback(this.onClosed, this);
268  };
269  IframeLightbox.prototype.isOpen = function () {
270    return this.el[classList].contains(isOpenedClass);
271  };
272  IframeLightbox.prototype.callCallback = function (func, data) {
273    if (typeof func !== "function") {
274      return;
275    }
276    var caller = func.bind(this);
277    caller(data);
278  };
279  root.IframeLightbox = IframeLightbox;
280})("undefined" !== typeof window ? window : this, document);
281
282
283(function (root, document) {
284  "use strict";
285  [].forEach.call(document.getElementsByClassName("iframe-lightbox-link"), function (el) {
286    el.lightbox = new IframeLightbox(el, {
287      onCreated: function () {
288        /* show your preloader */
289      },
290      onLoaded: function () {
291        /* hide your preloader */
292      },
293      onError: function () {
294        /* hide your preloader */
295      },
296      onClosed: function () {
297        /* hide your preloader */
298      },
299      scrolling: false,
300      /* default: false */
301      rate: 500 /* default: 500 */
302    });
303  });
304})("undefined" !== typeof window ? window : this, document);
305

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.