PageSourceSearch

https://www.beavercreekreserve.org/js/home.js?v=1493761174

js beavercreekreserve.org collected 2026-10-04 00:26:02 UTC 4,494 bytes, 166 lines download raw bytes

1/**************************************
2   Control the Homepage Banner size
3**************************************/
4
5function homeBannerSize() {
6  bannerHeight = $(window).height() - $('#header').outerHeight();
7  $('section.banner').css('height', bannerHeight+'px');
8}
9
10$(document).ready(function() {
11
12	if ($(window).width() > 480) {
13	
14	  homeBannerSize();
15	  
16	  $(window).resize(function() {
17	    homeBannerSize();
18	  });
19	  
20  	}
21  	
22});
23
24$(document).ready(function() { // start sllider controls
25
26/**************************************
27   Banner Slider Control Area
28**************************************/
29  
30  banners = $('.banners').unslider({
31    arrows:true,
32    nav:false,
33    speed:1000,
34    delay:8000,
35    autoplay:true,
36    infinite: true 
37  });
38  
39/**************************************
40   Home info slider control area
41**************************************/
42  
43  info = $('.welcome-design').unslider({
44    arrows:false,
45    nav:false,
46    speed:500,
47    delay:4000,
48    autoplay:false,
49    infinite: true 
50  });
51  
52/**************************************
53   Homepage seasonal content slider
54**************************************/
55  
56  seasonal = $('.seasonal-section').unslider({
57    arrows:false,
58    nav:false,
59    speed:750,
60    delay:7000,
61    autoplay:false,
62/*     infinite: true, */
63/*
64    selectors: {
65    	container: '.seasonal-section article',
66    	slides: 'div.seasonal-content'
67    }
68*/
69  });
70  
71	// seasonal.on('unslider.ready', function() {
72		var curIndex = 0;
73		$('.featur-list li').each(function(i) {
74		  if($(this).hasClass('sel')) {
75			  curIndex = i;
76			}
77		});
78// 		seasonal.unslider('animate:'+curIndex); 
79			seasonal.unslider('animate:' + 0);	//Temp space set to static number until client wants to change to current season - KO
80
81	// });
82	
83	seasonal.on('unslider.change', function(event, index, slide) {
84		classSelect($('.featur-list li').eq(index),'sel');
85		updateTotalWays()
86	});
87	
88	// Custom slider nav
89	$('.featur-list li').click(function() {
90		classSelect($(this), 'sel');
91		seasonal.data('unslider').animate( $(this).index() );
92	});
93
94}); // end slider controls
95
96// Slide buttons function for info area
97function slidePosition(slideNum) {
98  info.unslider('animate:'+slideNum);
99}
100
101function updateTotalWays() {
102  var $num = $('.enjoy-beaver h2 i');
103  var totalWays = $('.seasonal-section .unslider-active .place-desc > ul > li').length;
104  totalWays = (totalWays == '' || totalWays === undefined) ? 0 : totalWays;
105  $num.html(totalWays);
106}
107
108$(document).ready(function() {
109  updateTotalWays();
110});
111
112// Info area slide button select
113$(document).ready(function() { 
114
115  $('.navigation-tabs a').click(function() {
116  
117    $target = $(this).parent();
118    if(!$target.hasClass('sel')) {
119      $('.navigation-tabs a').parent().not($target).removeClass('sel');
120      $target.addClass('sel');
121      getPosition('welcome');
122    }
123    
124  });
125  
126  // Handle tab clicking for monthly/upcoming events section  
127  $('.upcoming-tabs li').click(function(e) {
128		e.preventDefault();
129  	classSelect( $(this), 'sel');
130	  classSelect( $('div.upcoming-event-content').eq( $(this).index() ), 'active');
131  });
132  
133  // Handle tab clicking for seasonal content
134  $('.featur-list li').click(function(e) {
135		e.preventDefault();
136  	classSelect( $(this), 'sel');
137	  classSelect( $('.seasonal-content').eq( $(this).index() ), 'active');
138  });
139  
140  // Content switching for individual events within seasonal sections
141  $('.place-desc ul.activity li').click(function(e) {
142		e.preventDefault();
143		indexNum = $(this).index();
144		classSelect($(this), 'active');
145		parentSelector = $(this).closest('.seasonal-content');
146		classSelect(parentSelector.find('.place-imges .bg-img').eq(indexNum), 'active');
147		classSelect(parentSelector.find('.place-details .place-details-inner').eq(indexNum), 'active');
148  });
149  
150});
151
152  function classSelect(elSelector, className, sibFilter) {
153  	// If sibFilter is undefined, set to empty string
154  	var sibFilter = (typeof sibFilter !== 'undefined') ? sibFilter : '';
155  	
156  	// If a simple selector string is passed in, wrap it in jQuery object
157  	var $selectorWrap;
158  	if (elSelector instanceof jQuery) {
159  		$selectorWrap = elSelector;
160  	} else {
161  		$selectorWrap = $(elSelector);
162  	}
163  
164  	$selectorWrap.siblings(sibFilter).removeClass(className);
165  	$selectorWrap.addClass(className);
166  }

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.