PageSourceSearch

https://welcomenashville.com/js/site.js

js welcomenashville.com collected 2026-10-06 18:23:20 UTC 3,691 bytes, 194 lines download raw bytes

1$(window).scroll(function (event) {
2    var scroll = $(window).scrollTop();
3	if (scroll > 0) {
4		$('body.home').addClass('scrolling');
5	} else {
6		$('body.home').removeClass('scrolling');
7	}
8	
9});
10
11$(document).ready(function() {
12
13
14	var bw = $(window).width();
15	var bh = $(window).height();
16	if (bw < 860) {
17		var mobile = true;
18		$('html').addClass('mobile').removeClass('desktop');
19	} else {
20		var mobile = false;
21		$('html').removeClass('mobile').addClass('desktop');
22	}
23
24	
25	$('.loadonly').imagesLoaded(function() {
26	
27		$('#slider').cycle({
28			timeout: 5500,
29			slides: '.slide'
30		});
31
32		$('#loader').fadeTo(500, 0, function() {
33			$(this).hide();
34		});
35		
36	});
37
38	var dpr = window.devicePixelRatio;
39	
40	function fluid() {
41	
42		var bw = $(window).width();
43		var bh = $(window).height();
44		if (bw < 860) {
45			var mobile = true;
46			$('html').addClass('mobile').removeClass('desktop');
47		} else {
48			var mobile = false;
49			$('html').removeClass('mobile').addClass('desktop');
50		}
51
52		// slideshow sizing
53		if (mobile) {
54			var sliderH = bw * .67;
55		} else {
56			var sliderH = bh;
57		}
58		
59		$('.home .section#slider').height(sliderH);
60		
61		// EQUAL GRID MARGINS
62		var gridMargin = $('.blog #grid .gutter-sizer').width();
63		$('.blog #grid li').css('margin-bottom', gridMargin);
64		
65		$('.bHeight').height(bh);
66		
67		var theWidth = $('.cell.sizer').width();
68		
69		$('.ratioSizeMasonry').each(function() {
70			
71			var theRatio = $(this).data('ratio');
72			var theHeight = Math.round(theWidth / theRatio);
73			if ($(this).hasClass('large')) {
74				var theHeight = theHeight * 2;
75			}
76			
77			$(this).height(theHeight);
78			
79		});
80		
81		$('.ratioSize').each(function() {
82			
83			var theWidth = $(this).width();
84			var theRatio = $(this).data('ratio');
85			var theHeight = Math.round(theWidth / theRatio);
86			
87			$(this).height(theHeight);
88			
89		});
90		
91	}
92	
93	fluid();
94	
95	/* NEWSLETTER CLICKS */
96	
97	$('.newsletter a').click(function(e){
98		e.preventDefault();
99		$('.email').focus();
100		$('body').addClass('signup');
101	});
102	
103	/* HEADER NAV CLICKS */
104	
105	$('.desktop .nav a').click(function(e){
106		
107		var href = $(this).attr('href');
108		
109		if (href.indexOf( "#" ) >= 0) {
110			
111			var target = href.replace("/", "");
112		
113			$('html, body').animate({
114				scrollTop: ($( target ).offset().top - 120)
115			}, 800);
116			return false;
117			
118		} else {
119			
120			return true;
121			
122		}
123	});
124
125
126	// Mobile menu open/close
127	$('.menuButton').click(function() {
128		$('body').toggleClass('menuOpen');
129		$('body, html').animate({scrollTop: 0}, 600);
130	});
131
132
133
134	
135	/* CYCLE FUNCTIONS */
136	
137	$('.arrowHolder img').click(function() {
138		
139		var bh = $(window).height();
140		$('html, body').animate({scrollTop: bh}, 800);
141		
142	});
143	
144	if ($( '#slider' ).length > 0) {
145		var theSlide = $('#slider .cycle-slide-active');
146		var theLogo = theSlide.data('logo');
147		$('#header .logo').attr('src', theLogo).fadeTo(300,1);
148	}
149	
150	$( '#slider' ).on( 'cycle-before', function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
151		var theSlide = $(incomingSlideEl);
152		var theLogo = theSlide.data('logo');
153		$('#header .logo').attr('src', theLogo);
154	});
155	
156	$(window).resize(function() {
157	
158		var bw = $(window).width();
159		var bh = $(window).height();
160		if (bw < 860) {
161			var mobile = true;
162			$('html').addClass('mobile').removeClass('desktop');
163		} else {
164			var mobile = false;
165			$('html').removeClass('mobile').addClass('desktop');
166		}
167
168		fluid();
169		
170		
171	});
172
173});
174
175$(window).load(function() {
176	
177	if ($('html').hasClass('no-touchevents')) {
178	
179		var s = skrollr.init();
180	
181	}
182	
183	if (window.location.hash) {
184		
185		var target = window.location.hash;
186
187		$('html, body').animate({
188			scrollTop: ($( target ).offset().top - 120)
189		}, 800);
190		return false;
191		
192	}
193	
194});

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.