PageSourceSearch

https://piscorotisserie.com/wp-content/themes/vincent/js/theme_ver-4.8.4.js

js piscorotisserie.com collected 2026-10-08 22:53:16 UTC 16,540 bytes, 424 lines download raw bytes

1"use strict";
2
3jQuery(document).ready(function () {
4    jQuery(".vincent_menu > li").hover(
5        function () {
6            jQuery(this).addClass('vincent_menu_active');
7        }, function () {
8            jQuery(this).removeClass('vincent_menu_active');
9        }
10    );
11
12    jQuery(".widget ul li a").hover(
13        function () {
14            jQuery(this).parent().addClass('vincent_link_hover');
15        }, function () {
16            jQuery(this).parent().removeClass('vincent_link_hover');
17        }
18    );
19
20    jQuery(".widget_search input[type=text]").focus(
21        function () {
22            if (jQuery(this).attr('data-placeholder') == jQuery(this).val()) {
23                jQuery(this).val('');
24            }
25        }
26    );
27
28    jQuery(".widget_search input").blur(
29        function () {
30            if (jQuery(this).val() == '') {
31                jQuery(this).val(jQuery(this).attr('data-placeholder'));
32            }
33        }
34    );
35
36    if (jQuery('.vincent_js_bg_color').size() > 0) {
37        jQuery('.vincent_js_bg_color').each(function () {
38            jQuery(this).css('background-color', jQuery(this).attr('data-bgcolor'));
39        });
40    }
41
42    if (jQuery('.vincent_js_bg_image').size() > 0) {
43        jQuery('.vincent_js_bg_image').each(function () {
44            jQuery(this).css('background-image', 'url(' + jQuery(this).attr('data-src') + ')');
45        });
46    }
47
48    if (jQuery('.vincent_js_color').size() > 0) {
49        jQuery('.vincent_js_color').each(function () {
50            jQuery(this).css('color', jQuery(this).attr('data-color'));
51        });
52    }
53
54    if (jQuery('.vincent_js_font_size').size() > 0) {
55        jQuery('.vincent_js_font_size').each(function(){
56            var font_size = jQuery(this).attr('data-font-size');
57
58            jQuery(this).css({'font-size': font_size, 'line-height': font_size});
59        });
60    }
61
62    if (jQuery('.vincent_js_height').size() > 0) {
63        jQuery('.vincent_js_height').each(function(){
64            var block_height = jQuery(this).attr('data-height');
65
66            jQuery(this).height(block_height);
67        });
68    }
69
70    var header = jQuery('header');
71
72    if (jQuery(header).is('.header_type_1')) {
73        jQuery(".vincent_hleft, .vincent_hright").css('height', jQuery("header > div").height() + 'px');
74    }
75
76    if (jQuery(header).is('.header_type_2') || jQuery(header).is('.header_type_3')) {
77        var menu_cont = jQuery('.vincent_menu_inner'),
78            cont_height = jQuery('.vincent_logo_cont').parent().height(),
79            white_space = cont_height - menu_cont.height();
80
81        jQuery(menu_cont).css('padding-top', (white_space / 2) + 22);
82    }
83
84    if (jQuery('.vincent_testimonials_slider').size() > 0) {
85        jQuery(".vincent_testimonials_slider").each(function () {
86            var autoplay = jQuery(this).attr('data-autoplay'),
87                speed = parseInt(jQuery(this).attr('data-speed'));
88            jQuery(this).on("initialized.owl.carousel", function (e) {
89                jQuery(this).css("opacity", "1");
90            });
91            jQuery(this).owlCarousel(
92                {
93                    items: 1,
94                    autoHeight: true,
95                    center: true,
96                    lazyLoad: true,
97                    loop: true,
98                    autoplay: autoplay,
99                    autoplayTimeout: speed,
100                    autoplayHoverPause: true,
101                    navigation: false
102                }
103            );
104        });
105    }
106
107    // Team Social Buttons
108    jQuery('.vincent_team_social_button').each(function(){
109        var color = jQuery(this).attr('data-color'),
110            hover = jQuery(this).attr('data-hover');
111
112        jQuery(this).css('color', color);
113
114        jQuery(this).on({
115            mouseenter: function(){
116                jQuery(this).css('color', hover);
117            },
118            mouseleave: function(){
119                jQuery(this).css('color', color);
120            }
121        });
122    });
123
124    // Element Custom Button
125    jQuery('.vincent_vc_custom_button.button_type_bordered').each(function(){
126        var color = jQuery(this).attr('data-color'),
127            hover = jQuery(this).attr('data-hover'),
128            border_color = jQuery(this).attr('data-border'),
129            border_hover = jQuery(this).attr('data-border-hover');
130
131        jQuery(this).css({'color': color, 'border-color': border_color});
132
133        jQuery(this).on({
134            mouseenter: function(){
135                jQuery(this).css({'color': hover, 'border-color': border_hover});
136            },
137            mouseleave: function(){
138                jQuery(this).css({'color': color, 'border-color': border_color});
139            }
140        });
141    });
142
143    jQuery('.vincent_vc_custom_button.button_type_colored').each(function(){
144        var color = jQuery(this).attr('data-color'),
145            hover = jQuery(this).attr('data-hover'),
146            bg_color = jQuery(this).attr('data-button-bg-color'),
147            bg_hover = jQuery(this).attr('data-hover-bg-color');
148
149        if (bg_color == 'transparent' || bg_color == '') {
150            var bg_color_transparent = 'transparent';
151            jQuery(this).css({'color': color, 'background': bg_color_transparent, 'border-color': color});
152        } else {
153            jQuery(this).css({'color': color, 'background': bg_color, 'border-color': bg_color});
154        }
155
156
157        jQuery(this).on({
158            mouseenter: function(){
159                if (bg_hover == 'transparent' || bg_hover == '') {
160                    var bg_hover_transparent = 'transparent';
161                    jQuery(this).css({'color': hover, 'background': bg_hover_transparent, 'border-color': bg_color});
162                } else {
163                    jQuery(this).css({'color': hover, 'background': bg_hover, 'border-color': bg_hover});
164                }
165            },
166            mouseleave: function(){
167                if (bg_color == 'transparent' || bg_color == '') {
168                    jQuery(this).css({'color': color, 'background': bg_color_transparent, 'border-color': color});
169                } else {
170                    jQuery(this).css({'color': color, 'background': bg_color, 'border-color': bg_color});
171                }
172            }
173        });
174    });
175
176    jQuery('.vincent_simple_post_read_more_button').each(function(){
177        var color = jQuery(this).attr('data-color'),
178            hover = jQuery(this).attr('data-hover'),
179            bg_color = jQuery(this).attr('data-bg-color'),
180            bg_hover = jQuery(this).attr('data-bg-hover'),
181            border_color = jQuery(this).attr('data-border-color'),
182            border_hover = jQuery(this).attr('data-border_hover');
183
184        jQuery(this).css({'color': color, 'background': bg_color, 'border-color': border_color});
185
186        jQuery(this).on({
187            mouseenter: function() {
188                jQuery(this).css({'color': hover, 'background': bg_hover, 'border-color': border_hover});
189            },
190            mouseleave: function() {
191                jQuery(this).css({'color': color, 'background': bg_color, 'border-color': border_color});
192            }
193        });
194    });
195
196    // Element Info Box
197    jQuery('.vincent_vc_infobox').each(function(){
198        jQuery(this).height(jQuery(this).attr('data-height'));
199    });
200
201    // Error 404 Page
202    vincent_404_page_centered();
203    
204    // Back to Top
205    var vincent_scrollTrigger = 600, // px
206        vincent_backToTop = function () {
207            var vincent_scrollTop = jQuery(window).scrollTop();
208            if (vincent_scrollTop > vincent_scrollTrigger) {
209                jQuery('.vincent_back_to_top').addClass('show');
210            } else {
211                jQuery('.vincent_back_to_top').removeClass('show');
212            }
213        };
214    vincent_backToTop();
215    jQuery(window).on('scroll', function () {
216        vincent_backToTop();
217    });
218    jQuery('.vincent_back_to_top').on('click', function (e) {
219        e.preventDefault();
220        jQuery('html,body').animate({
221            scrollTop: 0
222        }, 200);
223    });
224
225    if (jQuery('.vincent_ajax_prod_list').size() > 0) {
226        jQuery('.vincent_ajax_prod_list').each(function(){
227            vincent_product_listing_ajax_loading(jQuery(this));
228        });
229
230        jQuery(document).on('click', '.vincent_ajax_prod_list', function(){
231            jQuery('.vincent_prod_output_container').html('');
232            vincent_product_listing_ajax_loading(jQuery(this));
233            jQuery(this).parent().find('.active').removeClass('active');
234            jQuery(this).addClass('active');
235        });
236    }
237
238    if (jQuery('.vincent_ajax_query_posts').size() > 0) {
239        jQuery('.vincent_ajax_query_posts').each(function () {
240            vincent_ajax_query_posts(jQuery(this), true);
241        });
242
243        jQuery(document).on("click", ".vincent_ajax_query_posts", function () {
244            vincent_ajax_query_posts(jQuery(this), false);
245        });
246    }
247});
248
249jQuery(window).load(function(){
250    // Iframes in Blog Listings
251    var vincent_iframe = jQuery('.vincent_element_blog .grid_post iframe'),
252        vincent_iframe_width = jQuery(vincent_iframe).width();
253
254    jQuery(vincent_iframe).height(vincent_iframe_width);
255
256    vincent_image_cover();
257    setTimeout(vincent_image_cover, 500);
258
259    vincent_contacts_element();
260    vincent_custom_products_element();
261
262    // Element Countdown
263    jQuery('.vincent_element_countdown').each(function(){
264        var digits_color = jQuery(this).attr('data-dig-color'),
265            labels_color = jQuery(this).attr('data-lab-color'),
266            bg_color = jQuery(this).attr('data-bg-color');
267
268        jQuery(this).find('.item').css({'color': digits_color, 'background': bg_color});
269        jQuery(this).find('.label').css('color', labels_color);
270
271    });
272});
273
274jQuery(window).resize(function(){
275    var window_width = jQuery(window).width();
276
277    vincent_image_cover();
278    setTimeout(vincent_image_cover, 100);
279    setTimeout(vincent_image_cover, 200);
280    setTimeout(vincent_image_cover, 300);
281    setTimeout(vincent_image_cover, 400);
282    setTimeout(vincent_image_cover, 500);
283
284    vincent_contacts_element();
285    setTimeout(vincent_contacts_element, 100);
286    setTimeout(vincent_contacts_element, 200);
287    setTimeout(vincent_contacts_element, 300);
288    setTimeout(vincent_contacts_element, 400);
289    setTimeout(vincent_contacts_element, 500);
290
291    vincent_custom_products_element();
292    setTimeout(vincent_custom_products_element, 100);
293    setTimeout(vincent_custom_products_element, 200);
294    setTimeout(vincent_custom_products_element, 300);
295    setTimeout(vincent_custom_products_element, 400);
296    setTimeout(vincent_custom_products_element, 500);
297
298    vincent_404_page_centered();
299
300    if (window_width > 737) {
301        jQuery('.vincent_menu_mobile').css('display', 'none');
302        jQuery('.vincent_menu_mobile_trigger').removeClass('active');
303    }
304});
305
306jQuery('a[href="#"]').on('click', function(event){
307    event.preventDefault();
308});
309
310jQuery('.vincent_menu_mobile_trigger').on('click', function(){
311    jQuery(this).toggleClass('active');
312    jQuery('.vincent_menu_mobile').slideToggle(300);
313});
314
315jQuery('.vincent_menu_mobile .menu-item-has-children a').on('click', function(){
316    jQuery(this).toggleClass('opened').next().slideToggle(300);
317});
318
319function vincent_image_cover(){
320    jQuery('.vincent_vc_image_cover').each(function(){
321        var element_counter = jQuery(this).parents('.vc_row').find('.vincent_vc_image_cover').length,
322            parent_container_height;
323
324        if (element_counter > 1) {
325            jQuery(this).parents('.vc_row').find('.vincent_vc_image_cover').height('0');
326            parent_container_height = jQuery(this).parents('.vc_row').height();
327            jQuery(this).parents('.vc_row').find('.vincent_vc_image_cover').height(parent_container_height);
328        } else {
329            jQuery(this).height('0');
330            parent_container_height = jQuery(this).parents('.vc_row').height();
331            jQuery(this).height(parent_container_height);
332        }
333    });
334}
335
336function vincent_contacts_element(){
337    jQuery('.vincent_vc_contacts').each(function(){
338        var map_width = jQuery(this).find('.vincent_contact_map').width(),
339            row_height = jQuery(this).height(),
340            map_height = row_height + 40;
341
342        jQuery(this).parents('.vc_row').css('overflow', 'visible');
343        jQuery(this).find('.vincent_contact_map .wrapper').width(map_width).height(map_height);
344    });
345}
346
347function vincent_custom_products_element() {
348    jQuery('.vincent_vc_custom_products').each(function(){
349        var row_height = jQuery(this).height(),
350            image_height = row_height + 40,
351            bg_color = jQuery(this).attr('data-bgcolor');
352
353        jQuery(this).parents('.vc_row').css('overflow', 'visible');
354        jQuery(this).find('.vincent_custom_prod_image').height(image_height);
355        jQuery(this).find('h2').css('background', bg_color);
356        jQuery(this).find('.price').css('background', bg_color);
357    });
358}
359
360function vincent_ajax_query_posts(vincent_ajax_query_posts_this, vincent_ajax_query_posts_first_load) {
361    var vincent_return_to = vincent_ajax_query_posts_this.attr('data-return-to');
362    jQuery('.'+vincent_return_to).addClass('vincent_ajax_query_posts_active_preloader');
363    var vincent_ajax_query_posts_data_args = vincent_ajax_query_posts_this.data('args');
364    vincent_ajax_query_posts_this.removeClass('vincent_ajax_query_posts').addClass('vincent_ajax_query_posts_disabled');
365    if (vincent_ajax_query_posts_first_load == true) {
366        var vincent_ajax_query_posts_per_page = parseInt(vincent_ajax_query_posts_data_args['posts_first_load']);
367        var vincent_ajax_query_posts_per_page_old = vincent_ajax_query_posts_data_args['posts_per_page'];
368        vincent_ajax_query_posts_data_args['posts_per_page'] = vincent_ajax_query_posts_per_page;
369    } else {
370        var vincent_ajax_query_posts_per_page = parseInt(vincent_ajax_query_posts_data_args['posts_per_page']);
371    }
372
373    jQuery.post(vincent_ajaxurl, {
374        action: 'vincent_ajax_query_posts',
375        vincent_ajax_query_posts: '' + JSON.stringify(vincent_ajax_query_posts_data_args) + ''
376    }).done(function (data) {
377        jQuery('.' + vincent_return_to).append(data);
378        if (vincent_ajax_query_posts_first_load == true) {
379            vincent_ajax_query_posts_data_args['posts_per_page'] = vincent_ajax_query_posts_per_page_old;
380        }
381        vincent_ajax_query_posts_data_args['offset'] = parseInt(vincent_ajax_query_posts_data_args['offset']) + vincent_ajax_query_posts_per_page;
382        vincent_ajax_query_posts_this.attr('data-args', JSON.stringify(vincent_ajax_query_posts_data_args));
383        vincent_ajax_query_posts_this.addClass('vincent_ajax_query_posts').removeClass('vincent_ajax_query_posts_disabled');
384        if (vincent_ajax_query_posts_data_args['ajax_callback_function']) {
385            window[vincent_ajax_query_posts_data_args['ajax_callback_function']]();
386        }
387        if (data.length < 1) {
388            vincent_ajax_query_posts_this.fadeOut();
389        }
390        jQuery('.'+vincent_return_to).removeClass('vincent_ajax_query_posts_active_preloader');
391    });
392}
393
394
395function vincent_product_listing_ajax_loading(vincent_ajax_query_posts_this) {
396    var vincent_return_to = vincent_ajax_query_posts_this.attr('data-return-to');
397
398    jQuery(vincent_return_to).html('');
399    jQuery('.'+vincent_return_to).addClass('vincent_ajax_query_posts_active_preloader');
400
401    var vincent_ajax_query_posts_data_args = vincent_ajax_query_posts_this.data('args');
402
403    jQuery.post(vincent_ajaxurl, {
404        action: 'vincent_ajax_product_listing',
405        vincent_ajax_query_posts: '' + JSON.stringify(vincent_ajax_query_posts_data_args) + ''
406    }).done(function(data){
407        jQuery('.' + vincent_return_to).html(data).removeClass('vincent_ajax_query_posts_active_preloader');
408
409        var prod_cat_button = jQuery('.vincent_prod_cat_listing').find('.vincent_prod_cat_item');
410
411        jQuery(prod_cat_button).addClass('vincent_ajax_prod_list');
412    });
413}
414
415function vincent_404_page_centered(){
416    var container_404_height = jQuery(window).height() - jQuery('header').height() - jQuery('#wpadminbar').height(),
417        inner_container_404_height = jQuery('.vincent_404_content_inner').height();
418
419    if (inner_container_404_height < container_404_height) {
420        var white_space = container_404_height - inner_container_404_height;
421
422        jQuery('.vincent_404_content_wrapper').css({'padding-top': white_space / 2, 'padding-bottom': white_space / 2});
423    }
424}

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.