PageSourceSearch

https://altremedia.com/sitezscripts/stackable.js?1508633230

js altremedia.com collected 2026-09-28 00:52:05 UTC 20,231 bytes, 505 lines download raw bytes

1//global variables
2	var windowWidth; //retrieve current window width
3var $SITECROPWIDTHS = 1000;
4	var windowHeight; //retrieve current window height
5	var $headerImageHeight;
6	var $headerImageHolderHeight;
7	var menuBarHeight = 10;
8	var subBuffer = 5;
9	var templatesSubHeight;
10	var webpresenceSubHeight;
11	var newLocation;
12	var controller;
13    var headerImageScene;
14	var $SCROLLHEIGHT;	
15	var headerTween;	 
16	var $grid;
17	var $carousel=[];
18    var $SLIDESHOWS=[];
19	var $CURRENTIMAGE=[];
20	var $topMargin =[];
21    var $SLIDESHOWIMAGEHEIGHT=[];
22	var $SLIDESHOWIMAGEINDHEIGHT=[];
23	var $SLIDESHOWTAGLINE=[];
24	var $SLIDESHOWIMAGEALT=[];
25	var $SLIDESHOWURL=[];
26	var $CURRIMAGEINDEX=[];
27	var $TAGX=[];
28	var $TAGY=[];
29	var $TAGYIMG=[];
30	var $SLIDESHOWVIEW = 'none';
31	var $THUMBBUFFER = 10;
32	var flkty=[];
33	var $RESETTINGIMAGE = false;
34	var $ANIMATING = false;
35	var $OPTIONSEXPANDED = false;
36	var $WM;
37	var isoOptions = {
38		  itemSelector: '.grid-item',
39		  percentPosition: true,
40		  masonry: {
41			columnWidth: '.grid-sizer',
42		  }
43		};
44
45
46if($GLOBALWatermarkOnSlideshow == 'true') {
47	$WM = 'p'
48} else {
49	$WM = "";
50}
51
52
53
54$( window ).resize( debouncer( function ( e ) {
55 //reset all the animations and content
56	$SITEWIDTH = document.documentElement.clientWidth;
57	resetSlideshowCs();
58	resetSlideshows();
59	//initializePages();
60} ) );
61
62
63//--------------------- set section specific colors for stackable page
64if($GLOBALHeaderHolderChangeColor == "true") {
65	$(".headerBreak").each(function() {
66		$( this ).css("background-color", $(this).attr("data-color"));
67	});
68	$(".headerBorder").each(function() {
69		$( this ).css("background-color", $(this).attr("data-color"));
70	});
71}
72if($GLOBALHeaderChangeColor == "true") {
73	$(".pageHeader").addClass("sectionColor");
74	$(".pageHeader").addClass("sectionSideBorder");
75	$(".pageHeader").each(function() {
76		$( this ).css("color", $(this).attr("data-color"));
77		$( this ).css("border-left-color", $(this).attr("data-color"));
78	});
79}
80	
81
82function debouncer( func , timeout ) {
83   var timeoutID , timeout = timeout || 200;
84   return function () {
85      var scope = this , args = arguments;
86      clearTimeout( timeoutID );
87      timeoutID = setTimeout( function () {
88          func.apply( scope , Array.prototype.slice.call( args ) );
89      } , timeout );
90   }
91}
92
93
94
95
96
97
98//-----------------------------------------------------------------------
99//=================================== SET THE CONTENT SLIDESHOW FUNCTIONS
100//-----------------------------------------------------------------------
101function resetSlideshowCs(){
102	$(".SlideshowBackgroundImage").each(function() {
103		var $CURRSLIDESHOW = $(this).attr("data-slideshowID");
104		resetSlideshowCImage($CURRSLIDESHOW);
105	});
106}
107										
108function loadImageSlideshowC($CURRSLIDESHOW, $CURRENTIMAGE){
109	$("#SlideshowBackgroundImage"+$CURRSLIDESHOW).off().finish();
110	$("#SlideshowBackgroundImage"+$CURRSLIDESHOW).unbind('mouseenter mouseleave hover click');
111	$("#SlideshowBackgroundImage"+$CURRSLIDESHOW).on("load", function() {
112			resetSlideshowCImage($CURRSLIDESHOW);
113    	}).attr("src", $("#SlideshowImageC"+$CURRSLIDESHOW + $CURRENTIMAGE).attr("data-background"));
114}
115	
116function resetSlideshowCImage($CURRSLIDESHOW){
117		if($GLOBALSlideshowStackHeight > 0) {
118			if($SITEWIDTH < $SITECROPWIDTHS) {
119				$SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] = $GLOBALSlideshowStackHeight-100;
120			} else {
121				$SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] = $GLOBALSlideshowStackHeight;
122			}
123		} else {
124			$SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] = $(window.top).height() - $('#topMenu').height();
125			var $positionVert = (($SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] + 350)/2);
126			$(".MAINPAGESlideshowC").css("bottom", $positionVert);
127			
128		}
129
130		$("#SlideshowBackgroundImage"+$CURRSLIDESHOW).height($SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] );
131	TweenLite.to($("#SlideshowImageMain"+$CURRSLIDESHOW), 1, {autoAlpha: 1, display: 'block', height: ($SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] ), ease:Expo.easeOut});
132
133
134		//for cropped images
135		$SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW]  = $SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW];
136		$("#SlideshowBackgroundImage"+$CURRSLIDESHOW).height($SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW]);
137		//now check it isn't too wide
138		if($("#SlideshowBackgroundImage"+$CURRSLIDESHOW).width() < $('#topMenu').width()) {
139			var ratio = ($('#topMenu').width() / $("#SlideshowBackgroundImage"+$CURRSLIDESHOW).width());   // get ratio for scaling image
140			$SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW] = $SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW] * ratio;
141			$("#SlideshowBackgroundImage"+$CURRSLIDESHOW).height($SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW]);
142		} 
143		//set the height the tagline should use to the holder height since the image will be cropped and larger then the image holder. 
144		$TAGYIMG[$CURRSLIDESHOW] = $SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW];
145
146	//set whether the background image shows or not
147	if($GLOBALSlideshowShowBackground == 'true') {
148		TweenLite.to($("#SlideshowBackgroundImage"+$CURRSLIDESHOW), .6 , {autoAlpha: 1, x:0, display: 'block', ease:Expo.easeOut, onComplete: function () {$RESETTINGIMAGE = false;}});
149	} else {
150		TweenLite.to($("#SlideshowBackgroundImage"+$CURRSLIDESHOW), .6 , {autoAlpha: 0, x:0, display: 'none', ease:Expo.easeOut, onComplete: function () {$RESETTINGIMAGE = false;}});
151	}
152	
153	
154	TweenLite.to($("#SlideshowImageMain"+$CURRSLIDESHOW), .6 , {autoAlpha: 1, width: $('#topMenu').width(), x:0, ease:Expo.easeOut});
155	
156};
157
158function changeSlideshowContentC($CURRSLIDESHOW, $CURRENTIMAGE) {
159	TweenLite.to($("#SlideshowBackgroundImage"+$CURRSLIDESHOW), .6 , {autoAlpha: 0, ease:Expo.easeOut, onComplete: function () {loadImageSlideshowC($CURRSLIDESHOW, $CURRENTIMAGE);}});
160	$("#SlideshowImageC"+$CURRSLIDESHOW+$CURRENTIMAGE+ " .optionsS").width($("#SlideshowImageC"+$CURRSLIDESHOW+$CURRENTIMAGE+ " .SlideshowImageC").width());
161	$("#SlideshowImageC"+$CURRSLIDESHOW+$CURRENTIMAGE+ " .optionsS").height($("#SlideshowImageC"+$CURRSLIDESHOW+$CURRENTIMAGE+ " .SlideshowImageC").height());
162	var $infoTop = ($("#SlideshowImageC"+$CURRSLIDESHOW+$CURRENTIMAGE+ " .optionsS").height()/2) - ($("#SlideshowImageC"+$CURRSLIDESHOW+$CURRENTIMAGE+ " .optionsInfoC").height()/2)-10;
163	$("#SlideshowImageC"+$CURRSLIDESHOW+$CURRENTIMAGE+ " .optionsInfoC").css({ top: $infoTop });
164	$("#SlideshowImageC"+$CURRSLIDESHOW+$CURRENTIMAGE+ " .optionsNextC").css({ top: $infoTop });
165
166}
167
168function generateContentSlides($CURRSLIDESHOW) {
169	//make the thumbs swipeable
170		$carousel[$CURRSLIDESHOW]  = $("#SlideshowContentImageHolder"+$CURRSLIDESHOW).flickity({
171	  // options
172		freeScroll: false,
173		contain: true,
174		imagesLoaded: true,
175		prevNextButtons: false,
176		pageDots: true,
177		autoPlay: 4500,
178		dragThreshold: 10
179		});
180		
181	flkty[$CURRSLIDESHOW] = $carousel[$CURRSLIDESHOW].data('flickity');
182	
183		//---------------------- FOR IS CLICKED
184		$carousel[$CURRSLIDESHOW].on( 'staticClick.flickity', function( event, pointer, cellElement, cellIndex ) {
185		   if (cellElement) {
186			  $carousel[$CURRSLIDESHOW].flickity( 'selectCell', cellIndex);
187			   $CURRENTIMAGE[$CURRSLIDESHOW] = flkty[$CURRSLIDESHOW].selectedIndex;
188			   changeSlideshowContentC($CURRSLIDESHOW, $CURRENTIMAGE[$CURRSLIDESHOW]);
189		  }
190	});
191	//---------------------- FOR IS SELECTED
192		$carousel[$CURRSLIDESHOW].on( 'select.flickity', function() {
193		if(flkty[$CURRSLIDESHOW].selectedIndex > -1 ) {
194			$carousel[$CURRSLIDESHOW].find('.is-clickedS').removeClass('is-clickedS');
195			$CURRENTIMAGE[$CURRSLIDESHOW] = flkty[$CURRSLIDESHOW].selectedIndex;
196			$(flkty[$CURRSLIDESHOW].selectedElement).addClass('is-clickedS');
197			changeSlideshowContentC($CURRSLIDESHOW, $CURRENTIMAGE[$CURRSLIDESHOW]);
198		}
199	});
200
201	//-------------------- set the initial image
202		changeSlideshowContentC($CURRSLIDESHOW, $CURRENTIMAGE[$CURRSLIDESHOW]);
203		resetSlideshowCImage($CURRSLIDESHOW);
204		loadImageSlideshowC($CURRSLIDESHOW, $CURRENTIMAGE[$CURRSLIDESHOW]);
205		
206};
207//------------------------------------------------------ END SLIDESHOWC
208	
209
210
211
212
213
214
215
216
217
218
219
220//-----------------------------------------------------------------------
221//=================================== SET THE CLASSIC SLIDESHOW FUNCTIONS
222//-----------------------------------------------------------------------
223function resetSlideshows(){
224	
225	$(".SlideshowImageClassic").each(function() {
226		TweenLite.to($(this), 0 , {autoAlpha: 0,  display: 'none'});
227	});
228	
229	$(".SlideshowImageMainClassic").each(function() {
230		var $CURRSLIDESHOW = $(this).attr("data-slideshowID");
231		var $CURRSLIDESHOWIMAGE = $(this).attr("data-slideshowImage");
232		resetImageSlideshow($CURRSLIDESHOW, $CURRSLIDESHOWIMAGE);
233	});
234}
235
236
237function resetImageSlideshow($CURRSLIDESHOW, currImageIndex){
238		var $CURRIMAGEINDEX = currImageIndex;
239		var $currImgWidth = 0;
240	
241	//reset the current image in case the screen is resized
242	$("#SlideshowImageMain"+$CURRSLIDESHOW).attr("data-slideshowImage", currImageIndex);
243	
244	//set the data itself
245		$SLIDESHOWTAGLINE[$CURRSLIDESHOW] = $SLIDESHOWVARS[$CURRSLIDESHOW][$CURRIMAGEINDEX]["TagLineL"+$LANGUAGENUM];
246		$SLIDESHOWURL[$CURRSLIDESHOW] = $SLIDESHOWVARS[$CURRSLIDESHOW][$CURRIMAGEINDEX]["URL"];
247	
248	//set the slideshow height
249		if($GLOBALSlideshowClassicStackHeight > 0) {
250			$SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] = $GLOBALSlideshowClassicStackHeight;
251		} else {
252			$SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] = $(window.top).height() - $('#topMenu').height();
253		}
254	//$("#SlideshowImageMain"+$CURRSLIDESHOW).height($SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW]);
255	
256	//if viewed on small screen device, set the crop to not true
257	var $SlideshowCropM;
258	if($SITEWIDTH < $SITECROPWIDTHS) {
259		$SlideshowCropM = false;
260	} else {
261		$SlideshowCropM = $SlideshowCrop;
262	}
263	
264	
265//!!!!!!!!!!!!!!!!!!!!!!!!  for non-cropped images
266	if($SlideshowCropM != true) {
267	//set the individual image height to match the main image height setting
268		$SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW] = $SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW];
269		
270	//set the image height of the new image to the individual image height
271		$("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height($SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW]);
272			
273	//now check it isn't too wide
274		if($("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).width() > $SITEWIDTH) {
275		//get ratio for scaling image
276			var ratio = ($SITEWIDTH / $("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).width());
277		//reset the individual image height to be shorter so the width of the image fits
278			$SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW] = $SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW] * ratio;
279		//create the top margin so it centers the image
280			$topMargin[$CURRSLIDESHOW] = Math.round(($SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] - $SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW])/2)-$GLOBALGalleryImageBorder;
281		//reset the image height to the shorter height
282			$("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height($SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW]);
283					
284		//continue with settings the imageHolder as usual so it has the topMargin and the height 	
285			$("#SlideshowImageHolder"+$CURRSLIDESHOW).removeClass('imageSideBorder').addClass('imageTopBorder').css("margin-top", $topMargin[$CURRSLIDESHOW]+"px").height($("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height());
286			
287	//if its NOT TOO WIDE
288		} else { 
289			$topMargin[$CURRSLIDESHOW] = 0;
290			$("#SlideshowImageHolder"+$CURRSLIDESHOW).removeClass('imageTopBorder').addClass('imageSideBorder').css("margin-top", "0px").height($("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height());
291		}
292		
293	//set the current image width as well as the height for use to position tag lines 	
294		$TAGYIMG[$CURRSLIDESHOW] = $("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height();
295		$currImgWidth = $("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).width();
296
297//!!!!!!!!!!!!!!!!!!!!!  for cropped images		
298	} else {
299		$SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW] = $SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW];
300		$("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height($SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW]);	$("#SlideshowImageHolder"+$CURRSLIDESHOW).removeClass('imageTopBorder').removeClass('imageSideBorder').height($SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW]);
301		
302		
303		
304		//now check it isn't too wide
305		if($("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).width() < $SITEWIDTH) {
306			var ratio = ($SITEWIDTH / $("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).width());   // get ratio for scaling image
307			$SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW] = $SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW] * ratio;
308
309			$("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height($SLIDESHOWIMAGEINDHEIGHT[$CURRSLIDESHOW]);
310		} 
311
312
313		//set the height the tagline should use to the holder height since the image will be cropped and larger then the image holder. 
314		$TAGYIMG[$CURRSLIDESHOW] = $SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW];
315		$currImgWidth = $SITEWIDTH;
316	}
317	
318	
319	
320	
321//!!!-------------- run the check for a small viewing screen ---------------!!!
322	if($SITEWIDTH < $SITECROPWIDTHS) {
323	//reset the image holder height to the image height with 0px margin
324		$SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW] = $("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height();
325		$("#SlideshowImageHolder"+$CURRSLIDESHOW).removeClass('imageSideBorder').removeClass('imageTopBorder').css("margin-top", "0px")
326		TweenLite.to($("#SlideshowImageMain"+$CURRSLIDESHOW), 1, {autoAlpha: 1, display: 'block', height: ($("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).height()), ease:Expo.easeOut});
327	} else {
328	//animate the image holder to the appropriate height
329		TweenLite.to($("#SlideshowImageMain"+$CURRSLIDESHOW), 1, {autoAlpha: 1, display: 'block', height: ($SLIDESHOWIMAGEHEIGHT[$CURRSLIDESHOW]), ease:Expo.easeOut});
330	}
331		//set the margin for the image holder
332	var marginLeft;
333	var newMarginWidth;
334	if($("#SlideshowImageHolder"+$CURRSLIDESHOW).hasClass('imageSideBorder')) {
335		marginLeft = $GLOBALGalleryImageBorder;
336	} else {
337		marginLeft = 0;
338	}
339	
340	if($("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).width() < $SITEWIDTH) {
341		newMarginWidth = ($SITEWIDTH-$("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).width())/2-(marginLeft);
342	} else {
343		newMarginWidth = -marginLeft;
344	}
345	$("#SlideshowImageHolder"+$CURRSLIDESHOW).css("margin-left", newMarginWidth+"px");	
346	
347	//fade image in 
348		TweenLite.to($("#SlideshowImageHolder"+$CURRSLIDESHOW), .6 , {autoAlpha: 1, width: $("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX).width(), x:0, ease:Expo.easeOut});
349		TweenLite.to($("#SlideshowImage"+$CURRSLIDESHOW+$CURRIMAGEINDEX), .6 , {autoAlpha: 1, x:0, display: 'block', ease:Expo.easeOut, onComplete: function () {$RESETTINGIMAGE = false;}});
350
351	//set the tag line location
352	if($SLIDESHOWTAGLINE[$CURRSLIDESHOW] != "") {
353		$("#SlideshowTagLine"+$CURRSLIDESHOW).show();
354		$("#SlideshowTagLine"+$CURRSLIDESHOW+" .tag").html($SLIDESHOWTAGLINE[$CURRSLIDESHOW]);
355		if($SLIDESHOWURL[$CURRSLIDESHOW] != "") {
356			$("#SlideshowTagLine"+$CURRSLIDESHOW+" .link").unbind('click', false);
357			$("#SlideshowTagLine"+$CURRSLIDESHOW+" .link").attr("href", $SLIDESHOWURL[$CURRSLIDESHOW]);
358			$("#SlideshowTagLine"+$CURRSLIDESHOW+" .link").removeClass("nolink");
359		} else {
360			$("#SlideshowTagLine"+$CURRSLIDESHOW+" .link").bind('click', false);
361			$("#SlideshowTagLine"+$CURRSLIDESHOW+" .link").attr("href", "");
362			$("#SlideshowTagLine"+$CURRSLIDESHOW+" .link").addClass("nolink");
363		}
364	} else {
365		$("#SlideshowTagLine"+$CURRSLIDESHOW+" .tag").html("");
366		$("#SlideshowTagLine"+$CURRSLIDESHOW+"").hide();
367	}
368	//reset the location including a -20 for the padding
369	if($SITEWIDTH < $SITECROPWIDTHS) {
370		$("#SlideshowTagLine"+$CURRSLIDESHOW).width($SITEWIDTH-40);
371	} else {
372		$SlideshowCropM = $SlideshowCrop;
373		$("#SlideshowTagLine"+$CURRSLIDESHOW).width(700);
374	}
375	
376	$TAGY[$CURRSLIDESHOW] = $TAGYIMG[$CURRSLIDESHOW]/2 - $("#SlideshowTagLine"+$CURRSLIDESHOW).height()/2-15;
377	$TAGX[$CURRSLIDESHOW] = Math.round((($currImgWidth - $("#SlideshowTagLine"+$CURRSLIDESHOW).width())/2)-2);
378	
379	$("#SlideshowTagLine"+$CURRSLIDESHOW).css('top', 0).css('left', 0);
380	$("#SlideshowTagLine"+$CURRSLIDESHOW).css('top', $TAGY[$CURRSLIDESHOW]).css('left', $TAGX[$CURRSLIDESHOW]);
381};
382
383	
384	
385function displaySlideshowImage($OLDIMAGE, currImageIndex, $CURRSLIDESHOW){
386	//fade out SlideshowImage
387	TweenLite.to($("#SlideshowImage"+$CURRSLIDESHOW+ $OLDIMAGE), .6 , {autoAlpha: 0,  display: 'none', ease:Expo.easeOut, x: 100, onComplete: fadeInSlideshowImage, onCompleteParams:[$CURRSLIDESHOW, currImageIndex]});
388	TweenLite.to($("#SlideshowImageHolder"+$CURRSLIDESHOW), .6 , {autoAlpha: 0, x:-50, ease:Expo.easeOut});
389	//TweenLite.to($("#SlideshowImageHolder"+$CURRSLIDESHOW+" .SlideshowImageClassic"), 0 , {autoAlpha: 0,  display: 'none'});
390	TweenLite.to($("#SlideshowImageMain"+$CURRSLIDESHOW), .6 , {backgroundColor: $SLIDESHOWVARS[$CURRSLIDESHOW][currImageIndex]["ImageColor"], ease:Expo.easeOut});
391
392};
393
394
395
396function fadeInSlideshowImage($CURRSLIDESHOW, currImageIndex){
397	resetImageSlideshow($CURRSLIDESHOW, currImageIndex);
398}
399
400
401function endAnimation(){
402	$ANIMATING = false;
403}
404
405	
406//-----------------------------------------------------------------------
407//=============================================== IMAGE DIVIDER FUNCTIONS
408//-----------------------------------------------------------------------
409function resetDividers(){
410	$(".dividerImageHolder").each(function() {
411		var $dividerImage = $(this).attr("data-backgroundImage");
412		$(this).css('background-image', 'url(' + $dividerImage + ')');
413	});
414}
415
416	
417//-----------------------------------------------------------------------
418//========================================== GENERAL STACK PAGE FUNCTIONS
419//-----------------------------------------------------------------------
420//function to re-work menu based on browser resize
421$(document).ready(function() {
422	initializePage();
423	$SITEWIDTH = document.documentElement.clientWidth;
424	
425	
426	//set the form functions
427	
428	
429	
430function adjust_textarea(h) {
431    h.style.height = "20px";
432    h.style.height = (h.scrollHeight)+"px";
433}
434
435function getHeaderScroll() {
436		return $("#headerImage").height() - $("#headerImageHolder").height();	
437}
438
439function getHeaderHeight() {
440		return $("#headerImageHolder").height()*.8;	
441}
442
443	$(function() {
444	 var el, newPoint, newPlace, offset;
445
446	 // Select all range inputs, watch for change
447	 $("input[type='range']").change(function() {
448	 // Cache this for efficiency
449	   el = $(this);
450		 $id = $(this).attr("data-id");
451		$("#rangeValue"+$id).html(el.val());
452		});
453	});	
454
455
456		$('.mailform').submit(function(e){	
457			e.preventDefault();
458			var data = $(this).serializeArray();
459			var $curr = $(this).parent();
460			//data.push({name: 'tienn2t', value: 'love'});
461			$.ajax({
462			  type: "POST",
463			  url: '../form-process.php',
464			  data: data,
465			  dataType: "json",
466			  success: function(response) {
467				  var $nextdiv = $curr.next('div');
468				  console.log($curr.attr("id"));
469				  $curr.fadeOut(300, function(){ $curr.remove();});
470				  //console.log($nextdiv.attr("class"));
471				  $nextdiv.fadeIn(300); 
472			 },
473			error: function() {
474				alert('error handing here');
475			}
476		});
477	});
478	
479});
480		
481
482function initializePage(){
483	//------- run through all slideshowCs
484	$.each($SLIDESHOWC, function( key, value ) {
485	  generateContentSlides(value);
486	});
487	resetSlideshowCs();
488	
489	
490	//------  run through all classic slideshows
491	$.each($SLIDESHOW, function( key, value ) {
492		var $CURRSLIDESHOW = value;
493		//start slideshow at first image
494		$CURRIMAGEINDEX[$CURRSLIDESHOW] = 0;
495		displaySlideshowImage(-1, $CURRIMAGEINDEX[$CURRSLIDESHOW], $CURRSLIDESHOW );
496	 	var timer = setInterval(function() {
497				var $OLDIMAGE = $CURRIMAGEINDEX[$CURRSLIDESHOW];
498				$CURRIMAGEINDEX[$CURRSLIDESHOW] ++;
499				if($CURRIMAGEINDEX[$CURRSLIDESHOW] > $MAXIMAGES[$CURRSLIDESHOW]) {
500					$CURRIMAGEINDEX[$CURRSLIDESHOW] = 0;
501				}
502			displaySlideshowImage($OLDIMAGE, $CURRIMAGEINDEX[$CURRSLIDESHOW], $CURRSLIDESHOW );
503		}, ($GLOBALSlideshowSpeed*1000));
504	});
505}	

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.