PageSourceSearch

https://degenstberg.be/wp-content/plugins/medicate-core/public/js/script.js?ver=1.0.0

js degenstberg.be collected 2026-10-02 00:26:50 UTC 16,386 bytes, 396 lines download raw bytes

1(function(jQuery) {
2    "use strict";
3    var registerDependencies = function() {
4            // if (null != PluginJsConfig && null != PluginJsConfig.js_dependencies) {
5            //     var js_dependencies = PluginJsConfig.js_dependencies;
6            //     for (var dependency in js_dependencies) {
7            //         asyncloader.register(js_dependencies[dependency], dependency);
8            //     }
9            // }
10            // console.log(PluginJsConfig.js_dependencies);
11        },
12        timer = function() {
13            jQuery('.timer').countTo();
14        },
15        owl_carousel = function(e) {
16            jQuery('.owl-carousel ').each(function() {
17                var app_slider = jQuery(this);
18                // console.log(app_slider);
19                var rtl = false;
20                var prev = 'fas fa-angle-left';
21                var next = 'fas fa-angle-right';
22                var prev_text = 'Prev';
23                var next_text = 'Next';
24                if (jQuery('body').hasClass('pt-is-rtl')) {
25                    rtl = true;
26                    prev = 'fas fa-angle-right';
27                    next = 'fas fa-angle-left';
28                }
29                if (app_slider.data('prev_text') && app_slider.data('prev_text') != '') {
30                    prev_text = app_slider.data('prev_text');
31                }
32                if (app_slider.data('next_text') && app_slider.data('next_text') != '') {
33                    next_text = app_slider.data('next_text');
34                }
35                app_slider.owlCarousel({
36                    rtl: rtl,
37                    items: app_slider.data("desk_num"),
38                    loop: app_slider.data("loop"),
39                    margin: app_slider.data("margin"),
40                    nav: app_slider.data("nav"),
41                    dots: app_slider.data("dots"),
42                    loop: app_slider.data("loop"),
43                    autoplay: app_slider.data("autoplay"),
44                    autoplayHoverPause: true,
45                    autoplayTimeout: app_slider.data("autoplay-timeout"),
46                    navText: ["<i class='" + prev + "'></i>", "<i class='" + next + "'></i>"],
47                    responsiveClass: true,
48                    responsive: {
49                        // breakpoint from 0 up
50                        0: {
51                            items: app_slider.data("mob_sm"),
52                            // nav: true,
53                            // dots: true
54                        },
55                        // breakpoint from 480 up
56                        480: {
57                            items: app_slider.data("mob_num"),
58                            // nav: true,
59                            // dots: true
60                        },
61                        // breakpoint from 786 up
62                        786: {
63                            items: app_slider.data("tab_num")
64                        },
65                        // breakpoint from 1023 up
66                        1023: {
67                            items: app_slider.data("lap_num")
68                        },
69                        1199: {
70                            items: app_slider.data("desk_num")
71                        }
72                    }
73                });
74            });
75        },
76        cost_calc = function() {
77            var treatment = jQuery('#treatment').find(":selected").val();
78            var treatmentplanname = jQuery('#treatment-plan').find(":selected").val();
79            var treatmentplan = jQuery('#treatment-plan').find(':selected').data('plan');
80            var treatment_location = jQuery('#location').find(':selected').data('location');
81            var appointment = jQuery('#appointment').is(":checked");
82            var appointment_price = jQuery('#appointment').val();
83
84            var appointment_final_price;
85
86            if(appointment == true)
87            {
88                appointment_final_price = parseInt(appointment_price);
89            }
90            else
91            {
92                appointment_final_price = 0;
93            }
94
95            if(!isNaN(treatmentplan) && !isNaN(treatment_location) )
96            {
97                var final_cost = treatmentplan + treatment_location + appointment_final_price;
98            }
99
100
101            if(jQuery.isNumeric(final_cost) == true)
102            {
103
104                jQuery(".pt-cost-calculator .pt-calculator-price .pt-total-title").text('Final Price : ');
105                jQuery(".pt-cost-calculator .pt-calculator-price .pt-cost-value").text('$'+final_cost);
106            }
107
108        },
109        owl2 = function() {
110            jQuery('.owl-carousel ').each(function() {
111                var app_slider = jQuery(this);
112                console.log(app_slider);
113                jQuery('.owl-filter-bar').on('click', '.item', function() {
114                    var $item = jQuery(this);
115                    var filter = $item.data('owl-filter')
116                    $item.addClass('current').siblings().removeClass('current');
117                    app_slider.owlcarousel2_filter(filter);
118                });
119            });
120        },
121        pop_video = function() {
122            jQuery('.popup-youtube, .popup-vimeo, .popup-gmaps, .button-play').magnificPopup({
123                type: 'iframe',
124                mainClass: 'mfp-fade',
125                preloader: true,
126            });
127        },
128
129        woo_commerce_quantity = function() {
130            jQuery(document).on('click', 'button.plus, button.minus', function() {
131                var qty = jQuery(this).parent('.quantity').find('.qty');
132                var val = parseFloat(qty.val());
133                var max = parseFloat(qty.attr('max'));
134                var min = parseFloat(qty.attr('min'));
135                var step = parseFloat(qty.attr('step'));
136            // Format values
137            if (!val || val === '' || val === 'NaN') val = 0;
138            if (max === '' || max === 'NaN') max = '';
139            if (min === '' || min === 'NaN') min = 0;
140            if (step === 'any' || step === '' || step === undefined || parseFloat(step) === 'NaN') step 
140= 1;
141            if (jQuery(this).is('.plus')) {
142                if (!isNaN(max)) {
143                    if (max > val) {
144                        qty.val(val + step).change();
145                    }
146                } else {
147                    qty.val(val + step).change();
148                }
149                return false;
150            } else {
151                if (!isNaN(min)) {
152                    if (min < val) {
153                        qty.val(val - step).change();
154                    }
155                } else {
156                    qty.val(val - step).change();
157                }
158                return false;
159            }
160        });
161        },
162
163
164        circle_progress = function() {
165            jQuery('.pt-circle-progress-bar').each(function() {
166                var number = jQuery(this).data('skill-level');
167                var empty_color = jQuery(this).data('empty-color');
168                var fill_color = jQuery(this).data('fill-color');
169                var size = jQuery(this).data('size');
170                var thickness = jQuery(this).data('thickness');
171                jQuery(this).circleProgress({
172                    value: '0.' + number,
173                    size: size,
174                    emptyFill: empty_color,
175                    fill: {
176                        color: fill_color
177                    }
178                }).on('circle-animation-progress', function(event, progress) {
179                    jQuery(this).find('.pt-progress-count').html(Math.round(number * progress) + '%');
180                });
181            });
182        },
183        isotope = function() {
184            jQuery('.pt-masonry').isotope({
185                itemSelector: '.pt-masonry-item',
186                masonry: {
187                    columnWidth: '.grid-sizer',
188                    gutter: 0
189                }
190            });
191            jQuery('.pt-grid').isotope({
192                itemSelector: '.pt-grid-item',
193            });
194            jQuery('.pt-filter-button-group').on('click', '.pt-filter-btn', function() {
195                var filterValue = jQuery(this).attr('data-filter');
196                // console.log(filterValue);
197                jQuery('.pt-masonry').isotope({
198                    filter: filterValue
199                });
200                jQuery('.pt-grid').isotope({
201                    filter: filterValue
202                });
203                jQuery('.pt-filter-button-group .pt-filter-btn').removeClass('active');
204                jQuery(this).addClass('active');
205                updateFilterCounts();
206            });
207            var initial_items = 5;
208            var next_items = 3;
209            if (jQuery('.pt-masonry').length > 0) {
210                var initial_items = jQuery('.pt-masonry').data('initial_items');
211                var next_items = jQuery('.pt-masonry').data('next_items');
212            }
213            if (jQuery('.pt-grid').length > 0) {
214                var initial_items = jQuery('.pt-grid').data('initial_items');
215                var next_items = jQuery('.pt-grid').data('next_items');
216            }
217
218            function showNextItems(pagination) {
219                var itemsMax = jQuery('.visible_item').length;
220                var itemsCount = 0;
221                jQuery('.visible_item').each(function() {
222                    if (itemsCount < pagination) {
223                        jQuery(this).removeClass('visible_item');
224                        itemsCount++;
225                    }
226                });
227                if (itemsCount >= itemsMax) {
228                    jQuery('#showMore').hide();
229                }
230                if (jQuery('.pt-masonry').length > 0) {
231                    jQuery('.pt-masonry').isotope('layout');
232                }
233                if (jQuery('.pt-grid').length > 0) {
234                    jQuery('.pt-grid').isotope('layout');
235                }
236            }
237            // function that hides items when page is loaded
238            function hideItems(pagination) {
239                var itemsMax = jQuery('.pt-filter-items').length;
240                // console.log(itemsMax);
241                var itemsCount = 0;
242                jQuery('.pt-filter-items').each(function() {
243                    if (itemsCount >= pagination) {
244                        jQuery(this).addClass('visible_item');
245                    }
246                    itemsCount++;
247                });
248                if (itemsCount < itemsMax || initial_items >= itemsMax) {
249                    jQuery('#showMore').hide();
250                }
251                if (jQuery('.pt-masonry').length > 0) {
252                    jQuery('.pt-masonry').isotope('layout');
253                }
254                if (jQuery('.pt-grid').length > 0) {
255                    jQuery('.pt-grid').isotope('layout');
256                }
257            }
258            jQuery('#showMore').on('click', function(e) {
259                e.preventDefault();
260                showNextItems(next_items);
261            });
262            hideItems(initial_items);
263
264            function updateFilterCounts() {
265                // get filtered item elements
266                if (jQuery('.pt-masonry').length > 0) {
267                    var itemElems = jQuery('.pt-masonry').isotope('getFilteredItemElements');
268                }
269                if (jQuery('.pt-grid').length > 0) {
270                    var itemElems = jQuery('.pt-grid').isotope('getFilteredItemElements');
271                }
272                var count_items = jQuery(itemElems).length;
273                // console.log(count_items);
274                if (count_items > initial_items) {
275                    jQuery('#showMore').show();
276                } else {
277                    jQuery('#showMore').hide();
278                }
279                if (jQuery('.pt-filter-items').hasClass('visible_item')) {
280                    jQuery('.pt-filter-items').removeClass('visible_item');
281                }
282                var index = 0;
283                jQuery(itemElems).each(function() {
284                    if (index >= initial_items) {
285                        jQuery(this).addClass('visible_item');
286                    }
287                    index++;
288                });
289                if (jQuery('.pt-masonry').length > 0) {
290                    jQuery('.pt-masonry').isotope('layout');
291                }
292                if (jQuery('.pt-grid').length > 0) {
293                    jQuery('.pt-grid').isotope('layout');
294                }
295            }
296        },
297        progress_bar = function() {
298            jQuery('.pt-progress-bar > span').each(function() {
299                var app_slider = jQuery('.pt-progressbar-box');
300                jQuery(this).progressBar({
301                    shadow: false,
302                    animation: true,
303                    height: app_slider.data('h'),
304                    percentage: false,
305                    border: false,
306                    animateTarget: true,
307                });
308                
309            });
310        },
311        accordion = function() {
312            jQuery('.pt-accordion-block .pt-accordion-box .pt-accordion-details').hide();
313            jQuery('.pt-accordion-block .pt-accordion-box:first').addClass('pt-active').children().slideDown('slow');
314            jQuery('.pt-accordion-block .pt-accordion-box').on("click", function() {
315                if (jQuery(this).children('div.pt-accordion-details').is(':hidden')) {
316                    jQuery('.pt-accordion-block .pt-accordion-box').removeClass('pt-active').children('div.pt-accordion-details').slideUp('slow');
317                    jQuery(this).toggleClass('pt-active').children('div.pt-accordion-details').slideDown('slow');
318                }
319            });
320        };
321        jQuery(document).ready(function() {
322            registerDependencies();
323
324            if (jQuery('.quantity .minus,.quantity .plus').length > 0) {
325                woo_commerce_quantity();
326            }
327            if (jQuery('.timer').length > 0) {
328            // asyncloader.require(['jquery.countTo'], function() {
329                timer();
330            // });
331        }
332        if (jQuery('.popup-youtube, .popup-vimeo, .popup-gmaps, .button-play').length > 0) {
333            // asyncloader.require(['jquery.magnific-popup'], function() {
334                pop_video();
335            // });
336        }
337        if (jQuery('.pt-circle-progress-bar').length > 0) {
338            // asyncloader.require(['circle-progress'], function() {
339                circle_progress();
340            // });
341        }
342
343        
344        jQuery('p:empty').remove();
345    });
346        jQuery(window).on('load', function(e) {
347        // console.log('onload');
348
349        if (jQuery('.owl-carousel').length > 0) {
350            // asyncloader.require(['owl.carousel'], function() {
351                owl_carousel();
352            // });
353        }
354        if (jQuery('.pt-masonry , .pt-grid ').length > 0) {
355            // asyncloader.require(['isotope.pkgd'], function() {
356                isotope();
357            // });
358        }
359        if (jQuery('.pt-progressbar-box').length > 0) {
360            // asyncloader.require(['progressbar.js'], function() {
361                progress_bar();
362                // console.log('onload');
363            // });
364        }        
365
366        if (jQuery('.pt-cost-calculator').length > 0) {
367            // asyncloader.require(['progressbar.js'], function() {
368                cost_calc();
369                // console.log('onload');
370            // });
371        }
372        jQuery('img').each(function() {
373            jQuery(this).attr('height', jQuery(this).height() + 'px');
374            jQuery(this).attr('width', jQuery(this).width() + 'px');
375        });
376        
377        jQuery.fn.BeerSlider = function ( options ) {
378            options = options || {};
379            return this.each(function() {
380                new BeerSlider(this, options);
381            });
382        };
383        jQuery('.beer-slider').BeerSlider({start: 50});           
384    });
385
386        jQuery('.pt-cost-calculator').each(function() {
387            jQuery(document).on('change', '.treatment-plan , .treatment , .location , .appointment', function() {
388                cost_calc();
389            }); 
390            jQuery("#time").on('click','li',function(){
391                jQuery("#time li.active").removeClass("active"); 
392                jQuery(this).addClass("active");  // adding active class
393            });
394        }); 
395
396    })(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.