PageSourceSearch

https://vegaswokstl.com/js/scripts.js

js vegaswokstl.com collected 2026-10-08 03:59:05 UTC 10,961 bytes, 346 lines download raw bytes

1jQuery(document).ready(function () {
2
3
4    /************** Navigation Scripts **************/
5
6    // Shrink nav on scroll
7	
8	// Place the sub-nav items appropriately to the top and left of their current item
9	/*
10    jQuery('.subnav').each(function () {
11        var subNavOffsetTop = jQuery('.top-bar').height() - 32;
12        jQuery(this).css('top', subNavOffsetTop);
13    });
14	*/
15	
16    // Mobile Toggle Control
17
18    jQuery('.mobile-toggle').click(function () {
19        jQuery('nav').toggleClass('open-nav');
20    });
21
22    jQuery('.has-dropdown a').click(function () {
23        if (jQuery('.mobile-toggle').is(":visible")) {
24            if (jQuery(this).children('.subnav').hasClass('open-nav')) {
25                jQuery(this).children('.subnav').removeClass('open-nav');
26            } else {
27                jQuery('.subnav').removeClass('open-nav');
28                jQuery(this).children('.subnav').addClass('open-nav');
29            }
30        }
31    });
32
33	/* For overlay menu logo center borrowed from Barossa */
34	// Mobile Menu Toggle
35    jQuery('.open-menu').click(function(){
36    
37    	if(jQuery('.nav-overlay').hasClass('open-nav')){
38    		jQuery('.nav-overlay').removeClass('open-nav');
39    	}else{
40    		jQuery('.nav-overlay').addClass('open-nav');
41    	}
42		
43		if(jQuery('.top-bar').hasClass('open-nav')){
44    		jQuery('.top-bar').removeClass('open-nav');
45    	}else{
46    		jQuery('.top-bar').addClass('open-nav');
47    	}
48    
49    });
50
51	// mobile menu item click
52	jQuery('.nav-overlay .scroll').click(function(){
53		if(jQuery('.nav-overlay').hasClass('open-nav')){
54    		jQuery('.nav-overlay').removeClass('open-nav');
55    	} else {
56			jQuery(this).addClass('open-nav');
57		}
58	});
59	/* End Barossa menu style */
60	
61    // Inner links
62
63    if (jQuery('.off-screen').length) {
64        jQuery('.inner-link').smoothScroll({
65            speed: 900
66        });
67    } else {
68        jQuery('.inner-link').smoothScroll({
69            speed: 900,
70            offset: -68
71        });
72    }
73
74
75
76    // Disable default behaviour on href='#' links
77
78    jQuery('a').click(function () {
79        if (jQuery(this).attr('href') === '#') {
80            return false;
81        }
82    });
83
84    // Fix nav to top
85
86    jQuery(window).scroll(function () {
87        if (window.scrollY > 500) {
88            jQuery('.nav-overlay').addClass('fixed-nav');
89            jQuery('.top-bar').addClass('fixed-nav');
90        } else {
91            jQuery('.nav-overlay').removeClass('fixed-nav');
92            jQuery('.top-bar').removeClass('fixed-nav');
93        }
94
95        if (window.scrollY > jQuery('nav').outerHeight()) {
96            jQuery('.nav-overlay').css('top', -200);
97            jQuery('.top-bar').css('top', -200);
98        } else {
99            jQuery('.nav-overlay').css('top', 0);
100            jQuery('.top-bar').css('top', 0);
101        }
102    });
103
104    // Offscreen nav
105
106    jQuery('.off-screen .nav-toggle').click(function () {
107        jQuery('.off-screen').toggleClass('reveal-nav');
108        jQuery('.main-container').toggleClass('move-content');
109        jQuery('.footer-container').toggleClass('move-content');
110    });
111
112    jQuery('.main-container').click(function () {
113        if (jQuery(this).hasClass('move-content')) {
114            jQuery(this).removeClass('move-content');
115            jQuery('.off-screen').removeClass('reveal-nav');
116            jQuery('.footer-container').toggleClass('move-content');
117        }
118    });
119
120    // Logo center nav on mobile
121
122    jQuery('.logo-center .nav-toggle').click(function () {
123        jQuery('.logo-center').toggleClass('open-nav');
124    });
125
126	
127
128	
129    /************** Slider Scripts **************/
130
131    // Initialize Sliders
132
133    jQuery('.hero-slider').flexslider({
134        slideshow: false
135    });
136
137    jQuery('.testimonials-slider').flexslider({
138        directionNav: false,
139        controlNav: false
140    });
141
142    jQuery('.gallery-slider').flexslider({});
143
144    jQuery('.slider').flexslider({
145        directionNav: false
146    });
147
148
149
150    // Adjust slide height for .slider-fullscreen sliders
151
152    jQuery('.slider-fullscreen .slides li').each(function () {
153        if (jQuery('.top-bar').is(':visible')) {
154            var slideHeight = jQuery(window).height() - jQuery('.top-bar').outerHeight() + 10;
155            jQuery(this).css('height', slideHeight);
156
157
158        } else {
159            jQuery(this).css('height', jQuery(window).height());
160        }
161    });
162
163    jQuery(window).resize(function () {
164        jQuery('.slider-fullscreen .slides li').each(function () {
165            if (jQuery('.top-bar').is(':visible')) {
166                var slideHeight = jQuery(window).height() - jQuery('.top-bar').outerHeight();
167                //console.log(slideHeight);
168                jQuery(this).css('height', slideHeight + '!important');
169
170
171            } else {
172                jQuery(this).css('height', jQuery(window).height());
173            }
174        });
175    });
176
177    jQuery('.slides li').each(function () {
178
179        // Append background-image <img>'s as li item CSS background for better responsive performance
180
181        if (jQuery(this).children('.background-image').length) {
182            var imgSrc = jQuery(this).children('.background-image').attr('src');
183            jQuery(this).css('background', 'url("' + imgSrc + '")');
184            jQuery(this).children('.background-image').hide();
185            jQuery(this).css('background-position', '50% 0%');
186            // Check if the slider has a color scheme attached, if so, apply it to the slider nav
187
188        }
189
190        // Center Slide Content vertically
191
192        if (jQuery('.overlay-nav').length && !jQuery('nav').hasClass('nav-transparent')) {
193            jQuery(this).children('.slide-content').css('padding-top', (jQuery(this).height() / 2) - (jQuery(this).children('.slide-content').height() / 2) + jQuery('.overlay-nav').height());
194        } else {
195            jQuery(this).children('.slide-content').css('padding-top', (jQuery(this).height() / 2) - (jQuery(this).children('.slide-content').height() / 2));
196        }
197
198    });
199
200    jQuery(window).resize(function () {
201
202        jQuery('.slides li').each(function () {
203            if (jQuery('.overlay-nav').length && !jQuery('nav').hasClass('nav-transparent')) {
204                jQuery(this).children('.slide-content').css('padding-top', (jQuery(this).height() / 2) - (jQuery(this).children('.slide-content').height() / 2) + jQuery('.overlay-nav').height());
205            } else {
206                jQuery(this).children('.slide-content').css('padding-top', (jQuery(this).height() / 2) - (jQuery(this).children('.slide-content').height() / 2));
207            }
208
209        });
210    });
211
212
213    /************** Divider Scripts **************/
214
215    jQuery('.background-image-holder').each(function () {
216
217        // Append background-image <img>'s as li item CSS background for better responsive performance
218        var imgSrc = jQuery(this).children('.background-image').attr('src');
219        jQuery(this).css('background', 'url("' + imgSrc + '")');
220        jQuery(this).children('.background-image').hide();
221        jQuery(this).css('background-position', '50% 0%');
222        // Check if the slider has a color scheme attached, if so, apply it to the slider nav
223    });
224
225    /************** Video Dividers Scripts **************/
226
227    // Set the videos height at the wrappers width so it takes up the whole space of the divider
228
229    jQuery('.video-wrapper').each(function () {
230        var height = jQuery(this).width();
231        jQuery(this).css('height', height);
232
233        if (jQuery(this).width() < jQuery('.row').width()) {
234            jQuery(this).css('width', height * 2);
235        }
236
237        if (jQuery(this).width() > jQuery('.row').width()) {
238            jQuery(this).css('width', height * 1.5);
239        }
240    });
241
242    // and do this on resize!
243
244    jQuery(window).resize(function () {
245        jQuery('.video-wrapper').each(function () {
246            var height = jQuery(this).width();
247            jQuery(this).css('height', height);
248        });
249    });
250
251
252    /************** Parallax Scripts **************/
253    
254    var isFirefox = typeof InstallTrigger !== 'undefined';
255    var isIE = /*@cc_on!@*/ false || !!document.documentMode;
256    var isChrome = !!window.chrome;
257    var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
258    var prefix;
259
260    if (isFirefox) {
261        prefix = '-moz-';
262    } else if (isIE) {
263        prefix = '';
264    } else if (isChrome || isSafari) {
265        prefix = '-webkit-';
266    }
267
268    jQuery('.main-container section:first-child').addClass('first-child');
269
270    
271    jQuery('.parallax-background').each(function () {
272
273        if (jQuery(this).closest('section').hasClass('first-child') && !jQuery(this).closest('section').hasClass('slider-fullscreen')) {
274            jQuery(this).attr('data-top', prefix + 'transform: translate3d(0px,0px, 0px)');
275            jQuery(this).attr('data-top-bottom', prefix + 'transform: translate3d(0px,200px, 0px)');
276
277        } else {
278
279            jQuery(this).attr('data-bottom-top', prefix + 'transform: translate3d(0px,-200px, 0px)');
280            jQuery(this).attr('data-center', prefix + 'transform: translate3d(0px,0px, 0px)');
281            jQuery(this).attr('data-top-bottom', prefix + 'transform: translate3d(0px,200px, 0px)');
282
283        }
284
285    });
286
287    if (!(/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent || navigator.vendor || window.opera)) {
288        skrollr.init({
289            forceHeight: false
290        });
291    }
292    
293
294    /************** Tabbed Menu Scripts **************/
295
296    jQuery('.menu-filters li').click(function () {
297        jQuery('.menu-filters li').removeClass('active');
298        jQuery(this).addClass('active');
299        var menuType = jQuery(this).attr('data-menu-type');
300
301        jQuery(this).closest('.tabbed-menu').find('.narrow-menu').removeClass('active');
302        jQuery(this).closest('.tabbed-menu').find("[data-menu-type='" + menuType + "']").addClass('active');
303
304    });
305
306    
307
308
309    /************** Map Scripts **************/
310
311    jQuery('.map .overlay').click(function () {
312        jQuery(this).hide();
313    });
314
315    jQuery(window).scroll(function () {
316        jQuery('.map .overlay').show();
317    });
318
319    /************** Video Dividers Scripts **************/
320
321    // Set the videos height at the wrappers width so it takes up the whole space of the divider
322
323    jQuery('.video-wrapper').each(function () {
324        var height = jQuery(this).width();
325        jQuery(this).css('height', height);
326
327        if (jQuery(this).width() < jQuery('.row').width()) {
328            jQuery(this).css('width', height * 2);
329        }
330
331        if (jQuery(this).width() > jQuery('.row').width()) {
332            jQuery(this).css('width', height * 1.5);
333        }
334    });
335
336    // and do this on resize!
337
338    jQuery(window).resize(function () {
339        jQuery('.video-wrapper').each(function () {
340            var height = jQuery(this).width();
341            jQuery(this).css('height', height);
342        });
343    });
344
345
346});

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.