PageSourceSearch

https://deltacountycolorado.com/wp-content/themes/tourism-1/js/page_js.js?ver=7.1.2

js deltacountycolorado.com collected 2026-10-02 13:36:18 UTC 7,074 bytes, 276 lines download raw bytes

1// Site General JS Document�
2�
3function formatCurrency(num, dec) {�
4		var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);�
5		�
6		var result2 = result.toFixed(2);�
7			�
8		return result2;�
9	}�
10	�
11�
12function enableButtons() { �
13	�
14	/*�
15	 jQuery('#twitterBtn').click(function(){ �
16		window.open("https://www.twitter.com/");�
17 	 });*/�
18	 �
19	 footerToggled = 0;�
20	 favoritesToggled = 0;�
21	 �
22	 jQuery("#navMobileMenu").click(function(){ �
23	 	jQuery("#mobile-nav").toggle('slow');�
24	 });;�
25	 �
26	 jQuery("#mobileNavClose").click(function(){ �
27	 	jQuery("#mobile-nav").toggle('slow');�
28	 });�
29	 �
30	 jQuery("#topSearchClose a").click(function(){ �
31	 	jQuery("#topSearchBar").slideToggle('slow');�
32	 });�
33	 �
34	 jQuery("#topBarSearch a").click(function(){ �
35	 	jQuery("#topSearchBar").slideToggle('slow');�
36	 });�
37	 �
38	  jQuery("#favToggle").click(function(){ �
39	  	if(favoritesToggled == 0) {�
40			jQuery("#favoritesMenu").fadeIn(300, function() {�
41				favoritesToggled = 1;�
42			});�
43			�
44		} else {�
45			jQuery("#favoritesMenu").fadeOut(300, function() {�
46				favoritesToggled = 0;�
47			});	�
48		}�
49	 	�
50	 });�
51	 	 �
52	 jQuery(".submenu-toggle").click(function(){ �
53	    if(jQuery(this).find('i').hasClass('fa-caret-right')) {�
54			jQuery(this).parent().addClass('active');�
55			jQuery(this).find('i').removeClass('fa-caret-right');�
56			jQuery(this).find('i').addClass('fa-caret-down');�
57		} else {�
58			jQuery(this).find('i').removeClass('fa-caret-down');�
59			jQuery(this).find('i').addClass('fa-caret-right');�
60			jQuery(this).parent().removeClass('active');�
61		}�
62	    �
63	 	jQuery(this).parent().find('.sub-menu').slideToggle(300);�
64	 });�
65	 �
66	 jQuery("#siteMapToggle").click(function(){ �
67	  jQuery("#siteMap").slideToggle('slow');�
68	  jQuery("body, html").animate({scrollTop: jQuery("html").height()}, "slow");�
69	  jQuery("#siteMapToggle").toggleClass("active");�
70	  if ( jQuery("#siteMapToggle").text() === "[+] Site Map" ) {�
71		  jQuery("#siteMapToggle").text("[-] Hide Site Map");�
72	  } else if ( jQuery("#siteMapToggle").text() === "[-] Hide Site Map" ) {�
73		  jQuery("#siteMapToggle").text("[+] Site Map");�
74	  } �
75	  return false;�
76	 });�
77	 �
78	 �
79	 jQuery("#mapEmbedModuleToggle").click(function(){ �
80	 	jQuery(".mapEmbedModule .mapOverlay").fadeOut(500);�
81	 });�
82	 �
83	 jQuery(".mapClose").click(function(){ �
84	 	jQuery(".mapEmbedModule .mapOverlay").fadeIn(500);�
85	 });�
86	 �
87	 �
88	 jQuery("#propertiesModuleToggle").click(function(){ �
89	 	jQuery(".propertiesModule .propertiesOverlay").fadeOut(500);�
90	 });�
91	 �
92	 jQuery(".propertiesClose").click(function(){ �
93	 	jQuery(".propertiesModule .propertiesOverlay").fadeIn(500);�
94	 });�
95	 �
96	 �
97	 �
98	 �
99	 �
100	 �
101	�
102} �
103�
104function goTo(url, target) {�
105	if(target) {�
106		window.open(url);	�
107	} else {�
108		window.location.href = url;�
109	}�
110}�
111�
112function toggleObj(objID) {�
113	�
114	var obj = document.getElementById(objID);�
115		�
116	if(obj.style.display == '' || obj.style.display == 'none') {�
117		jQuery(obj).stop().fadeIn(300);�
118	} else {�
119		jQuery(obj).stop().fadeOut(300);�
120	}�
121		�
122}�
123�
124function initResizers() {�
125	�
126	 �
127  	// Resize Colorbox when resizing window or changing mobile device orientation�
128	jQuery(window).resize(resizeColorBox);�
129	jQuery(window).resize(resizeExperiences);�
130	window.addEventListener("orientationchange", resizeColorBox, false);�
131	window.addEventListener("orientationchange", resizeExperiences, false);  �
132	/* Colorbox resize function */�
133	var resizeTimer;�
134	function resizeColorBox() {�
135		if (resizeTimer){�
136			 clearTimeout(resizeTimer);�
137		}�
138		�
139		resizeTimer = setTimeout(function() {�
140				if (jQuery('#cboxOverlay').is(':visible')) {�
141						if(window.innerWidth < 450) {�
142							jQuery.colorbox.resize({width:'98%', height:'98%'});�
143						} else if(window.innerWidth < 1280) {�
144							jQuery.colorbox.resize({width:'80%', height:'90%'});�
145						} else {�
146							jQuery.colorbox.resize({width:'50%', height:'80%'}); �
147						}�
148				}�
149		}, 300)�
150	}�
151	�
152�
153	var resizeTimerEx;�
154	function resizeExperiences() {�
155		�
156		if (resizeTimerEx){�
157			 clearTimeout(resizeTimerEx);�
158		}�
159				�
160		resizeTimerEx = setTimeout(function() {�
161		  if(window.innerWidth > 1024) {�
162			jQuery("#mobile-nav").fadeOut(200);�
163			}�
164�
165		}, 300)�
166�
167		}�
168	�
169	jQuery(document).ready(function($) {	�
170		resizeExperiences();�
171	});�
172	�
173�
174}�
175�
176function smoothScroll() {�
177		//smooth anchor scroll�
178		jQuery("html, body").animate({ scrollTop: 0 }, 300);�
179		�
180		//auto smooth anchor scroll;�
181	�
182		  jQuery('a[href*=#]:not([href=#])').click(function() {�
183			if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {�
184			  var target = jQuery(this.hash);�
185			  target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');�
186			  if (target.length) {�
187				jQuery('html,body').animate({�
188				  scrollTop: target.offset().top�
189				}, 1000);�
190				return false;�
191			  }�
192			}�
193		  });�
194�
195}�
196�
197�
198�
199//sticky nav on scroll�
200function setNavScroll() {�
201    var pos = jQuery("#navigation").position();                   �
202    jQuery(window).scroll(function() {�
203			var windowpos = jQuery(window).scrollTop();�
204			if (windowpos >= parseInt(pos.top)) {�
205				jQuery("#navigation").addClass("stick"); �
206				jQuery("#content").addClass("stick");�
207			} else {�
208				jQuery("#navigation").removeClass("stick");�
209				jQuery("#content").removeClass("stick");�
210			}�
211�
212    });�
213}�
214�
215�
216function parallaxBackground(element) {�
217	  var yPos = -(jQuery(window).scrollTop() / 8); �
218	 // if(window.innerWidth > 650) {  �
219		 var coords = '50% '+ yPos + 'px';�
220	 // } else {�
221		//  var coords = '50% 0';�
222	 // }�
223	  jQuery(element).css({ backgroundPosition: coords });�
224  }�
225  �
226//post object parser�
227function forIn(obj, fn, thisObj){�
228  var key, i = 0;�
229  for (key in obj) {�
230    if (exec(fn, obj, key, thisObj) === false) {�
231      break;�
232    }�
233  }�
234  function exec(fn, obj, key, thisObj){�
235    return fn.call(thisObj, obj[key], key, obj);�
236  }�
237  return forIn;�
238}�
239  �
240//update list�
241function favorites_after_button_submit(favorites){�
242		 	�
243	if(favorites) {�
244		//strip out post IDs from keys�
245		var keys = [];�
246		var entries = '';�
247		�
248		forIn(favorites[1].posts, function(val, key, o){�
249		  keys.push(key);�
250		}); �
251		�
252		if(keys.length > 0) {�
253		�
254			for(k=0;k<keys.length;k++) {�
255				�
256				var ID = favorites[1].posts[keys[k]].post_id;�
257				var title = favorites[1].posts[keys[k]].title;�
258				var permalink = favorites[1].posts[keys[k]].permalink;�
259				�
260				entries += '<li data-postid="'+ID+'"><i class="fa fa-star" aria-hidden="true"></i> <a href="'+permalink+'">'+title+'</a></li>';�
261				�
262			}�
263			�
264			jQuery('#favoritesEntries').html(entries);�
265			�
266			if(favoritesToggled == 0) {�
267				jQuery("#favoritesMenu").fadeIn(300, function() {�
268					favoritesToggled = 1;�
269				});�
270			}�
271								�
272		}�
273	�
274	}�
275�
276}�

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.