PageSourceSearch

https://vinarstvi-vaclav.cz/wp-content/themes/villenoir-child/js/crs.js?ver=238867442

js vinarstvi-vaclav.cz collected 2026-10-06 12:44:17 UTC 6,051 bytes, 220 lines download raw bytes

1/* Add your JavaScript code here.
2
3If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows:
4
5jQuery(document).ready(function( $ ){
6    // Your code in here
7});
8
9--
10
11If you want to link a JavaScript file that resides on another server (similar to
12<script src="https://example.com/your-js-file.js"></script>), then please use
13the "Add HTML Code" page, as this is a HTML code that links a JavaScript file.
14
15End of comment */ 
16$ = jQuery;
17$(document).ready(function(){
18    crs.resizeBlock();
19    crs.resizeTerrior();
20    crs.boxHeight();
21    crs.btnInstagrmWidget();
22    crs.correctMainpageFooter();
23    crs.fixSliderHeight();
24    
25    crs.animateHeaderTextBeforeLoad();
26    crs.slideToId();
27});
28
29$(window).load(function(){
30    crs.resizeBlock();
31    crs.resizeTerrior();
32    crs.boxHeight();
33    crs.fixSliderHeight();
34    
35    crs_Review_carousel();
36    
37    try {
38        crs_Logo_carousel();
39    } catch {}
40    
41    crs.animateHeaderTextAfterLoad();
42    crs.alignBlocksHeight();
43    crs.slideToIHash();
44    crs.addIconScroll();
45});
46
47$(window).resize(function(){
48    crs.resizeBlock();
49    crs.resizeTerrior();
50    crs.boxHeight();
51});
52
53$(window).scroll(function () {
54    crs.iconScrollDisplay();
55})
56
57function crs_Review_carousel() {
58    if ($(".crc_review_carousel_wrapper").length > 0) {
59        var hand = false;
60        var bullets = true;
61        var number = 2;
62        var slideAlign = true;
63        var autoTimer = 16000;
64        
65        if ( $(window).width() < 768 ){
66            hand = true;
67            bullets = true;
68            number = 1;
69            slideAlign = false;
70            autoTimer = 10000;
71        }
72        
73        $(".crc_review_carousel_wrapper").fiveCarousel({
74            animateTime: 500,
75            hand:hand,
76            autoTimer: autoTimer,
77            bullets: bullets,
78            index: number,
79            slider:'crc_review_carousel',
80            slideAlign: slideAlign,
81            margin:40,
82            auto:true,
83            number: number,
84            carousel:true,
85        })
86    }
87}
88
89
90
91var crs = new CRS();
92
93function CRS() {
94    var self = this;
95    
96    this.resizeBlock = function() {
97        var padding = $(".example").css("padding-left");
98        $(".vine-left-padding").css({"padding-left": padding});
99        $(".vine-right-padding").css({"padding-right": padding});
100    }
101    
102    this.resizeTerrior = function() {
103        var padding = 0; 
104        var width = $(window).width();
105        
106        if ( width >= 1920 ) {
107            padding = 150;
108        } else if ( width <= 1100 ) {
109            padding = 0;
110        } else {
111            padding = ( $(window).width() - 1020 ) / 4.5;
112        }
113        
114        $(".p-terrior").css({"padding-left": padding, "padding-right": padding});
115    }
116    
117    this.boxHeight = function() {
118        var height = $(".row-with-image").height();
119        
120        $(".row-without-image").height(height);
121    }
122    
123    this.btnInstagrmWidget = function() {
124        if ($(".widget-instagram").length > 0) {
125            $(".widget-instagram").find(".btn").addClass('mt-40');
126        }
127    }
128    
129    this.correctMainpageFooter = function() {
130        if ( $(".front-footer").length > 0 ) {
131            $(".front-footer").appendTo( $("#content") );
132        }
133    }
134    
135    this.fixSliderHeight = function() {
136        if ($(".flexslider").length > 0) {
137            var h = $(".flexslider").find(".slides").height();
138            $(".flexslider").height(h);
139        }
140    }
141    
142    this.animateHeaderTextBeforeLoad = function() {
143        $(".h_title").addClass("h_hide");
144        $(".h_subtitle").addClass("h_hide");
145        $(".h_description ").hide();
146    }
147    
148    this.animateHeaderTextAfterLoad = function() {
149        setTimeout(function() {
150            $(".h_title").removeClass("h_hide");
151            $(".h_subtitle").removeClass("h_hide");
152        },500)
153        
154        setTimeout(function() {
155            $(".h_description ").fadeIn(500);
156        },1000)
157    }
158    
159    this.slideToId = function() {
160        $('.flowing-scroll').on( 'click', function(){ 
161            var el = $(this);
162            var dest = el.find("a").attr('href'); // получаем направление
163            window.location.hash = ''
164            
165            if(dest !== undefined && dest !== '') { // проверяем существование
166                $('html').animate({ 
167            	    scrollTop: $(dest).offset().top - 120
168                }, 1000);
169            }
170            return false;
171        });
172    }
173    
174    this.slideToIHash = function() {
175        var hash = window.location.hash;
176        
177        if (hash != '') {
178            window.location.hash = '';
179            
180            $('html').animate({ 
181        	    scrollTop: $(hash).offset().top + 60
182            }, 1000);
183        }
184    }
185    
186    this.alignBlocksHeight = function() {
187        var h = 0;
188        
189        $(".icon-wrapper").each(function() {
190            var block_h = $(this).height();
191            
192            if ( block_h > h ) {
193                h = block_h;
194            }
195        })
196        
197        $(".icon-wrapper").height(h);
198    }
199    
200    this.addIconScroll = function() {
201        if ($(".custom-header").length > 0) {
202            var iconScrollWrapper = $("<div />")
203                .addClass("icon-scroll-wrapper")
204                .appendTo($(".custom-header"));
205                
206            var iconScroll = $("<div />")
207                .addClass("icon-scroll")
208                .appendTo(iconScrollWrapper);
209        }
210    }
211    
212    this.iconScrollDisplay = function() {
213        var threshold = $(window).height() / 2;
214        if ($(window).scrollTop() > threshold) {
215            $(".icon-scroll").fadeOut(800);
216        } else {
217            $(".icon-scroll").fadeIn(800);
218        }
219    }
220}

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.