PageSourceSearch

https://www.lup-ag.de/wp-content/themes/consulting/lib/scripts/main-frontend.js?ver=1.5.0

js lup-ag.de collected 2026-10-05 19:17:44 UTC 29,804 bytes, 798 lines download raw bytes

1/**
2/**
3 * Wordpress Front End Enhancements.
4 *
5 * jQuery effects used in theme.
6 */
7
8/* ----------------------------------------------------------------------------------
9	FORMAT FOOTER LAYOUT
10---------------------------------------------------------------------------------- */
11jQuery(document).ready(function(){
12
13	jQuery('#footer-core .widget-area:last-child').addClass("last");
14
15	/* Footer - Footer Widgets Layout (Options 1 - 6) */
16	jQuery('#footer-core.option2 .widget-area').addClass("one_half");
17	jQuery('#footer-core.option3 .widget-area').addClass("one_third");
18	jQuery('#footer-core.option4 .widget-area').addClass("one_fourth");
19	jQuery('#footer-core.option5 .widget-area').addClass("one_fifth");
20	jQuery('#footer-core.option6 .widget-area').addClass("one_sixth");
21
22	/* Footer - Footer Widgets Layout (Option 7) */
23	jQuery('#footer-core.option7 #footer-col1.widget-area').addClass("one_third");
24	jQuery('#footer-core.option7 #footer-col2.widget-area').addClass("two_third");
25
26	/* Footer - Footer Widgets Layout (Option 8) */
27	jQuery('#footer-core.option8 #footer-col1.widget-area').addClass("two_third");
28	jQuery('#footer-core.option8 #footer-col2.widget-area').addClass("one_third");
29
30	/* Footer - Footer Widgets Layout (Option 9) */
31	jQuery('#footer-core.option9 #footer-col1.widget-area').addClass("one_fourth");
32	jQuery('#footer-core.option9 #footer-col2.widget-area').addClass("three_fourth");
33
34	/* Footer - Footer Widgets Layout (Option 10) */
35	jQuery('#footer-core.option10 #footer-col1.widget-area').addClass("three_fourth");
36	jQuery('#footer-core.option10 #footer-col2.widget-area').addClass("one_fourth");
37
38	/* Footer - Footer Widgets Layout (Option 11) */
39	jQuery('#footer-core.option11 #footer-col1.widget-area').addClass("one_fifth");
40	jQuery('#footer-core.option11 #footer-col2.widget-area').addClass("four_fifth");
41
42	/* Footer - Footer Widgets Layout (Option 12) */
43	jQuery('#footer-core.option12 #footer-col1.widget-area').addClass("four_fifth");
44	jQuery('#footer-core.option12 #footer-col2.widget-area').addClass("one_fifth");
45
46	/* Footer - Footer Widgets Layout (Option 13) */
47	jQuery('#footer-core.option13 #footer-col1.widget-area').addClass("one_sixth");
48	jQuery('#footer-core.option13 #footer-col2.widget-area').addClass("one_sixth");
49	jQuery('#footer-core.option13 #footer-col3.widget-area').addClass("one_sixth");
50	jQuery('#footer-core.option13 #footer-col4.widget-area').addClass("one_half");
51
52	/* Footer - Footer Widgets Layout (Option 14) */
53	jQuery('#footer-core.option14 #footer-col1.widget-area').addClass("one_half");
54	jQuery('#footer-core.option14 #footer-col2.widget-area').addClass("one_sixth");
55	jQuery('#footer-core.option14 #footer-col3.widget-area').addClass("one_sixth");
56	jQuery('#footer-core.option14 #footer-col4.widget-area').addClass("one_sixth");
57
58	/* Footer - Footer Widgets Layout (Option 15) */
59	jQuery('#footer-core.option15 #footer-col1.widget-area').addClass("one_sixth");
60	jQuery('#footer-core.option15 #footer-col2.widget-area').addClass("one_third");
61	jQuery('#footer-core.option15 #footer-col3.widget-area').addClass("one_half");
62
63	/* Footer - Footer Widgets Layout (Option 16) */
64	jQuery('#footer-core.option16 #footer-col1.widget-area').addClass("one_half");
65	jQuery('#footer-core.option16 #footer-col2.widget-area').addClass("one_third");
66	jQuery('#footer-core.option16 #footer-col3.widget-area').addClass("one_sixth");
67
68	/* Footer - Footer Widgets Layout (Option 17) */
69	jQuery('#footer-core.option17 #footer-col1.widget-area').addClass("one_fourth");
70	jQuery('#footer-core.option17 #footer-col2.widget-area').addClass("one_fourth");
71	jQuery('#footer-core.option17 #footer-col3.widget-area').addClass("one_sixth");
72	jQuery('#footer-core.option17 #footer-col4.widget-area').addClass("one_sixth");
73	jQuery('#footer-core.option17 #footer-col5.widget-area').addClass("one_sixth");
74
75	/* Footer - Footer Widgets Layout (Option 18) */
76	jQuery('#footer-core.option18 #footer-col1.widget-area').addClass("one_sixth");
77	jQuery('#footer-core.option18 #footer-col2.widget-area').addClass("one_sixth");
78	jQuery('#footer-core.option18 #footer-col3.widget-area').addClass("one_sixth");
79	jQuery('#footer-core.option18 #footer-col4.widget-area').addClass("one_fourth");
80	jQuery('#footer-core.option18 #footer-col5.widget-area').addClass("one_fourth");
81});
82
83
84/* ----------------------------------------------------------------------------------
85	FORMAT SUB-FOOTER LAYOUT
86---------------------------------------------------------------------------------- */
87jQuery(document).ready(function(){
88
89	jQuery('#sub-footer-widgets .widget-area:last-child').addClass("last");
90	jQuery('#sub-footer-widgets .widget-area:last-child').after( '<div class="clearboth"></div>' );
91
92	/* Footer - Footer Widgets Layout (Option 2) */
93	jQuery('#sub-footer-widgets.option2 .widget-area').addClass("one_half");
94
95	/* Footer - Footer Widgets Layout (Option 3) */
96	jQuery('#sub-footer-widgets.option3 #sub-footer-col1.widget-area').addClass("one_third");
97	jQuery('#sub-footer-widgets.option3 #sub-footer-col2.widget-area').addClass("two_third");
98
99	/* Footer - Footer Widgets Layout (Option 4) */
100	jQuery('#sub-footer-widgets.option4 #sub-footer-col1.widget-area').addClass("two_third");
101	jQuery('#sub-footer-widgets.option4 #sub-footer-col2.widget-area').addClass("one_third");
102
103	/* Footer - Footer Widgets Layout (Option 5) */
104	jQuery('#sub-footer-widgets.option5 #sub-footer-col1.widget-area').addClass("one_fourth");
105	jQuery('#sub-footer-widgets.option5 #sub-footer-col2.widget-area').addClass("three_fourth");
106
107	/* Footer - Footer Widgets Layout (Option 6) */
108	jQuery('#sub-footer-widgets.option6 #sub-footer-col1.widget-area').addClass("three_fourth");
109	jQuery('#sub-footer-widgets.option6 #sub-footer-col2.widget-area').addClass("one_fourth");
110
111	/* Footer - Footer Widgets Layout (Option 7) */
112	jQuery('#sub-footer-widgets.option7 #sub-footer-col1.widget-area').addClass("one_fifth");
113	jQuery('#sub-footer-widgets.option7 #sub-footer-col2.widget-area').addClass("four_fifth");
114
115	/* Footer - Footer Widgets Layout (Option 8) */
116	jQuery('#sub-footer-widgets.option8 #sub-footer-col1.widget-area').addClass("four_fifth");
117	jQuery('#sub-footer-widgets.option8 #sub-footer-col2.widget-area').addClass("one_fifth");
118});
119
120
121/* ----------------------------------------------------------------------------------
122	MASONRY - LOAD AFTER IMAGES HAVE LOADED
123---------------------------------------------------------------------------------- */
124
125jQuery(document).ready(function() {
126
127	// Call imagedLoaded for Masonry if imagedLoaded function is available
128	(function ( $ ) {
129		if ( $.isFunction($.fn.imagesLoaded) ) {
130
131			// Different target for masonry on portfolio pages than any other page
132			if ( $( '#container' ).hasClass( 'portfolio-wrapper' ) ) {
133				var $container = $('#container-inner');
134			} else if ( $( 'body' ).hasClass( 'woo-shop-grid' ) ) {
135				var $container = $('#main-core .products');
136			} else {
137				var $container = $('#container');
138			}
139
140			$container.imagesLoaded( function() {
141				if ( $.isFunction($.fn.masonry) ) {
142					$container.masonry();
143				}
144			});
145		}
146	}( jQuery ));
147});
148
149
150/* ----------------------------------------------------------------------------------
151	FORMAT MAIN HEADER MENU
152---------------------------------------------------------------------------------- */
153
154function mainmenu(){
155
156	// Add menu-hover class
157	jQuery("header .header-links ul.menu > li").hover(function(){
158		jQuery(this).find('ul.sub-menu:first').parent().addClass('menu-hover');
159	},function(){
160		jQuery(this).find('ul.sub-menu:first').parent().removeClass('menu-hover');
161	});
162
163	// Add menu-parent class
164	jQuery("header .header-links ul.menu > li").each(function(){
165		jQuery(this).find('ul.sub-menu').parent().addClass('menu-parent');
166	});
167
168	// Correct menu for below header when navigating down page.
169	if( jQuery( 'body' ).hasClass( 'header-below' ) ) {
170		jQuery('#header').waypoint(function(direction) {
171			if (direction === 'down') {
172				jQuery( 'body' ).addClass( 'header-below2' );
173				jQuery( 'body' ).removeClass( 'header-below1' );
174			}
175			else {
176				jQuery( 'body' ).removeClass( 'header-below2' );
177				jQuery( 'body' ).addClass( 'header-below1' );
178			}
179		}, {
180			offset: '50%'
181		});
182	}
183}
184jQuery(document).ready(function(){
185	mainmenu();
186});
187
188
189/* ----------------------------------------------------------------------------------
190	RESPONSIVE MENU - TOGGLE SUB MENUS & ACCESSIBILITY
191---------------------------------------------------------------------------------- */
192
193jQuery(document).ready(function (){
194
195	jQuery( '#header-responsive .menu-item-has-children > a' ).after( '<span class="sub-menu-toggle" tabindex="0"></span>' );
196
197	jQuery( '#header-responsive .menu-item-has-children .sub-menu-toggle' ).click(function(e){
198
199		var parentmenu = jQuery( this ).closest('.menu-item-has-children');
200
201		if( parentmenu.hasClass( 'sub-menu-show' ) ) {
202			jQuery( parentmenu ).removeClass('sub-menu-show');
203		} else {
204			jQuery( parentmenu ).addClass('sub-menu-show');
205		}
206
207	});
208
209	// Open navigation menu on enter when focused
210	jQuery( '#header-nav .btn-navbar, #header-responsive .menu-item-has-children .sub-menu-toggle' ).keyup(function(e){
211
212		// "Enter" button on keyboard has been pressed
213		if( e.keyCode == 13 ) {
214
215			// Trigger click event
216			jQuery( this ).trigger( 'click' );
217
218			// Add aria-expanded attribute
219			var valueAriaExpanded = jQuery( this ).attr( 'aria-expanded' );
220
221			// Toggle aria-expanded attribute value
222			if( ! valueAriaExpanded || valueAriaExpanded == 'false' ) {
223				jQuery( this ).attr( 'aria-expanded', 'true' )
224			} else {
225				jQuery( this ).attr( 'aria-expanded', 'false' )
226			}
227		}
228	});
229});
230
231
232/* ----------------------------------------------------------------------------------
233	STICKY HEADER - ONLY ON SCREENS SMALLER THAN 768px
234---------------------------------------------------------------------------------- */
235jQuery(window).load(function(){
236
237	// Trigger sticky header on devices wider than 768px
238	if ( jQuery(window).width() > 768 && jQuery( 'body' ).hasClass( 'header-sticky' ) ) {
239
240		// Resize on scroll
241		jQuery(window).scroll(function() {
242
243			// Assign header height and position variables
244			var siteheader_height    = jQuery( '#site-header' ).height();
245			var preheader_height     = jQuery( '#pre-header' ).height();
246			var header_height        = jQuery( '#header' ).height();
247			var header_sticky_offset = jQuery( '#header-sticky' ).offset();
248
249			// Activate sticky header 100px after header is cleared
250			if ( !jQuery( 'body' ).hasClass( 'header-below' ) ) {
251				if ( header_sticky_offset.top > preheader_height + header_height + 100 ) {
252					jQuery( 'body' ).addClass( 'header-sticky-active' );
253				} else {
254					jQuery( 'body' ).removeClass( 'header-sticky-active' );
255				}
256			} else {
257				if ( header_sticky_offset.top > siteheader_height + 100 ) {
258					jQuery( 'body' ).addClass( 'header-sticky-active' );
259				} else {
260					jQuery( 'body' ).removeClass( 'header-sticky-active' );
261				}	
262			}
263		});
264	}
265});
266
267
268/* ----------------------------------------------------------------------------------
269	FLUID MEDIA SIZES (Modified from http://bavotasan.com/2012/better-way-to-resize-video-using-jquery)
270---------------------------------------------------------------------------------- */
271
272/* Videos */
273jQuery(document).ready(function() {
274
275	/* Supported Platforms */
276	var all_videos = jQuery( 'iframe[src*="//player.vimeo.com"], iframe[src*="//www.youtube.com"], iframe[src*="//blip.tv"], iframe[src*="//www.slideshare.net"], iframe[src*="//www.scribd.com"], iframe[src*="//revision3.com"], iframe[src*="//www.hulu.com"], iframe[src*="//www.funnyordie.com"], iframe[src*="//www.dailymotion.com"], iframe[src*="//maps.google.com"], embed[src*="//v.wordpress.com"], object, embed' );
277
278	all_videos.each(function() {
279		var el = jQuery(this);
280		el
281			.attr( 'data-aspectRatio', 360 / 640 )
282			.attr( 'data-oldWidth', el.width() );
283	} );
284
285	jQuery(document).ready(function() {
286		all_videos.each( function() {
287		var el = jQuery(this),
288			newWidth    = el.parents().width(),
289			oldWidth    = el.attr( 'data-oldWidth' );
290			ratioHeight = el.height() / el.outerHeight(),
291
292			el
293				.removeAttr( 'height' )
294				.removeAttr( 'width' )
295				.width( newWidth * ratioHeight )
296				.outerHeight( newWidth * el.attr( 'data-aspectRatio' ) );
297		});
298	}).resize();
299
300	jQuery(window)
301		.resize( function() {
302			all_videos.each( function() {
303			var el = jQuery(this),
304				newWidth    = el.parents().width(),
305				oldWidth    = el.attr( 'data-oldWidth' );
306				ratioHeight = el.height() / el.outerHeight(),
307
308				el
309					.removeAttr( 'height' )
310					.removeAttr( 'width' )
311					.width( newWidth * ratioHeight )
312		    		.outerHeight( newWidth * el.attr( 'data-aspectRatio' ) );
313			});
314		}).resize();
315});
316
317/* SoundCloud */
318jQuery(document).ready(function() {
319
320	/* Supported Platforms */
321	var all_sounds = jQuery( 'iframe[src^="http://w.soundcloud.com"]' );
322
323	all_sounds.each(function() {
324		var el = jQuery(this);
325		el
326			.attr( 'data-aspectRatio', el.attr( 'height' ) / el.attr( 'width' )  )
327			.attr( 'data-oldWidth', el.width() );
328	});
329
330	jQuery(document).ready(function() {
331		all_sounds.each( function() {
332		var el = jQuery(this),
333			newWidth = el.parents().width(),
334			oldWidth = el.attr( 'data-oldWidth' );
335
336			el
337				.removeAttr( 'width' )
338				.width( newWidth )
339		});
340	}).resize();
341
342	jQuery(window)
343		.resize( function() {
344			all_sounds.each( function() {
345			var el = jQuery(this),
346				newWidth = el.parents().width(),
347				oldWidth = el.attr( 'data-oldWidth' );
348
349				el
350					.removeAttr( 'width' )
351					.width( newWidth )
352			});
353		}).resize();
354});
355
356
357/* ----------------------------------------------------------------------------------
358	ADD PRETTYPHOTO TO PORTFOLIO PAGE
359---------------------------------------------------------------------------------- */
360
361jQuery(document).ready(function() {
362	jQuery('#container.portfolio-wrapper a').has('img.hover-zoom').addClass('prettyPhoto');
363	jQuery('#container.portfolio-wrapper a').has('img.hover-zoom').attr('rel','portfolio[gallery]');
364	jQuery('a.prettyPhoto').has('img').attr('rel','portfolio[gallery]');
365	jQuery('a.prettyPhoto').prettyPhoto();
366});
367
368
369/* ----------------------------------------------------------------------------------
370	ADD PRETTYPHOTO TO POST IMAGE PAGE
371---------------------------------------------------------------------------------- */
372
373jQuery(document).ready(function() {
374	jQuery('body.attachment .entry-attachment .attachment a').has('img').addClass('prettyPhoto');
375	jQuery('a.prettyPhoto').prettyPhoto();
376});
377
378
379/* ----------------------------------------------------------------------------------
380	ADD _BLANK TO OUTGOING LINKS
381---------------------------------------------------------------------------------- */
382
383jQuery(document).ready(function(){
384	jQuery('.thinkup_widget_flickr a[href^="http://"], .thinkup_widget_flickr a[href^="https://"]').attr('target','_blank');
385	jQuery('.thinkup_widget_socialshare a[href^="http://"], .thinkup_widget_socialshare a[href^="https://"]').attr('target','_blank');
386	jQuery('.thinkup_widget_socialprofiles a[href^="http://"], .thinkup_widget_socialprofiles a[href^="https://"]').attr('target','_blank');
387	jQuery('#pre-header-social a[href^="http://"], #pre-header-social a[href^="https://"]').attr('target','_blank');
388	jQuery('#shareicons a[href^="http://"], #shareicons a[href^="https://"]').attr('target','_blank');
389});
390
391
392/* ----------------------------------------------------------------------------------
393	SHORTCODES
394---------------------------------------------------------------------------------- */
395
396jQuery(window).load(function() {
397
398	/* Accordion - Fix Bootstrap Toggle Issue */
399	jQuery('.accordion-toggle').click(function() {
400	    if(jQuery(this).hasClass('collapsed')) {
401	        jQuery(this).closest('.accordion').find('.accordion-toggle').not(this).addClass('collapsed');
402
403	        jQuery(this).closest('.accordion').find('.accordion-toggle').closest('.accordion-group').removeClass('accordion-open');
404	        jQuery(this).closest('.accordion-group').addClass('accordion-open');
405	    } else {
406	        jQuery(this).closest('.accordion').find('.accordion-toggle').closest('.accordion-group').removeClass('accordion-open');			
407		}
408	});
409
410	/* Divider - Scroll To Top */
411	jQuery('.backtotop').click(function(){
412		jQuery('html, body').animate({scrollTop:0}, 'slow');
413	});
414
415	/* Tooltip - Activate Bootstrap */
416	jQuery('[data-tip]').each( function() {jQuery(this).tooltip({ placement: jQuery(this).data('tip') }); });
417
418	/* Blog Post - Carousel (used for identifying if input variable is an integer */
419	function isNumber(n) {
420		return !isNaN(parseFloat(n)) && isFinite(n);
421	}
422
423	/* Blog Post - Activate CarouFredSel */
424	jQuery(window).bind( 'load resize', function() {
425		jQuery( '.sc-carousel' ).each( function(i) {
426
427			// Don't run caroufredsel code if the following classes are present.
428			if ( jQuery( this ).hasClass( 'sc-postitem' ) || 
429				 jQuery( this ).hasClass( 'sc-featured' ) || 
430				 jQuery( this ).hasClass( 'sc-image' ) ) {
431					return;
432			};
433
434			var instanceID = 'sc-carousel-' + i;
435
436			jQuery( this ).attr( 'id', instanceID );
437
438			jQuery( this ).children( 'ul').attr( 'id', instanceID + '-inner' );
439
440			var show   = jQuery( '#' + instanceID + '.sc-carousel' ).data( 'show' );
441			var scroll = jQuery( '#' + instanceID + '.sc-carousel' ).data( 'scroll' );
442			var speed  = jQuery( '#' + instanceID + '.sc-carousel' ).data( 'speed' );
443			var effect = jQuery( '#' + instanceID + '.sc-carousel' ).data( 'effect' );
444
445			if ( show == 0 || isNaN( show ) == true ) show = '3';
446			if ( scroll == 0 || isNaN( scroll ) == true ) scroll = '1';
447			if ( speed == 0 ) speed = '500';
448			if ( effect == 0 ) {
449				effect = '"scroll"'; 
450			} else {
451				effect = '"' + effect + '"';
452			}
453
454			var showItems = show;
455			var scrollItems = scroll;
456			var speedItems = speed;
457			var fxItems = effect;
458
459			var width = jQuery(window).width();
460
461			if ( jQuery( 'body' ).hasClass( 'layout-responsive' ) ) {
462				if(width <=685) {
463						showItems = 2;
464						if( scrollItems >= 2 ) {
465							scrollItems = 2;
466						}
467				}
468				if(width <=480) {
469					showItems = 1;
470					scrollItems = 1;
471				}
472			}
473
474				// Apply carousel code if needed				
475				if ( jQuery( this ).find( '#' + instanceID + '-inner' ).length ) {
476
477					jQuery( this ).find( '#' + instanceID + '-inner' ).carouFredSel({
478						width: '100%',
479						items			: {
480								visible         : showItems,
481								minimum         : 3,
482								minimum         : 3,
483								start: 0
484						},
485						scroll			: {
486								items           : scrollItems,
487								fx              : fxItems,
488								easing          : "swing",
489								duration        : speedItems,
490						},
491						responsive      : true,
492						circular        : true,
493						infinite        : false,
494						auto 	        : false,
495						prev	: {	
496							button	: '#' + instanceID + ' .prev',
497							key		: 'left'
498						},
499						next	: { 
500							button	: '#' + instanceID + ' .next',
501							key		: 'right'
502						},
503						pagination	: '#' + instanceID + ' .pagination',
504						onCreate: function () {
505							jQuery(window).bind("load resize", function() {
506							
507							// Set height to testimonial carousel elements - All
508							parentWidthTestimonial = jQuery( '#' + instanceID + '.carousel-testimonial li').outerHeight();
509							jQuery( '#' + instanceID + '.carousel-testimonial' ).height( 'auto' );
510							jQuery( '#' + instanceID + '.carousel-testimonial .caroufredsel_wrapper' ).css( { 'height': parentWidthTestimonial } );
511
512							// Set height to testimonial carousel elements - Fix Style 1
513							parentWidthTestimonial_1 = jQuery( '#' + instanceID + '.carousel-testimonial.style1 .caroufredsel_wrapper').outerHeight();
514							parentWidthTestimonial_2 = jQuery( '#' + instanceID + '.carousel-testimonial.style1 .sc-carousel-thumbs').outerHeight();
515
516							jQuery( '#' + instanceID + '.carousel-testimonial.style1' ).height( parentWidthTestimonial_1 + parentWidthTestimonial_2 );
517							jQuery( '#' + instanceID + '.carousel-testimonial.style1 .sc-carousel-thumbs' ).parent().height( parentWidthTestimonial_2 );
518							});
519						}
520					});
521				}
522
523				// Used for adding thumbnails to slider - Currently only for Testimonials slider
524				if ( jQuery( this ).find('.sc-carousel-thumbs').length ) {
525
526					jQuery( this ).find('.sc-carousel-thumbs').carouFredSel({
527						responsive: true,
528						circular: false,
529						infinite: false,
530						auto: false,
531						prev: '#prev',
532						next: '#next',
533						items: {
534							visible: {
535								min: 2,
536								max: 6
537							},
538							width: 150,
539							height: 70
540						}
541					});
542				}
543
544				jQuery( this ).find('.sc-carousel-thumbs a').click(function() {
545					jQuery('#' + instanceID + '-inner').trigger('slideTo', '#' + this.href.split('#').pop() );
546					jQuery('.sc-carousel-thumbs a').removeClass('selected');
547					jQuery( this ).addClass('selected');
548					return false;
549				});
550
551			// Set carousel container height
552			parentHeight = jQuery( '#' + instanceID + ' li').outerHeight();
553			jQuery( '#' + instanceID + ' li' ).each(function() {
554				var elementHeight = jQuery(this).height(); 
555				parentHeight = elementHeight > parentHeight ? elementHeight : parentHeight;
556			});
557
558			// Add addition height if carousel thumbnails are showing
559			if( jQuery( '#' + instanceID ).closest('.sc-carousel').find('.sc-carousel-thumbs').length > 0 ) {
560				parentHeightThumb = parentHeight + jQuery( '#' + instanceID ).closest('.sc-carousel').find('.sc-carousel-thumbs').outerHeight();
561			} else {
562				parentHeightThumb = parentHeight;
563			}
564
565			// Assign height to unique carousel ID (Max used to ensure thumbnail carousel displays correctly)
566			jQuery( '#' + instanceID ).height( Math.max( parentHeight, parentHeightThumb ) );
567			jQuery( '#' + instanceID + '-inner' ).height( parentHeight );
568			jQuery( '#' + instanceID + '-inner' ).parent().height( parentHeight );
569
570			// Set carousel container height to auto if iframe exists in featured images
571			if ( jQuery( '#' + instanceID + ' iframe').length > 0 ) {
572				jQuery( '#' + instanceID ).addClass('carousel-iframe');
573			}
574		});
575
576	}).resize();
577
578	/* Progress Bar - Animate Width */
579	jQuery('.progress').waypoint(
580		function(event, direction) {
581
582			var width = jQuery(this).children().attr('data-width');
583			var delay = jQuery(this).children().attr('data-delay');
584
585			jQuery(this).delay( delay ).queue(function(next){
586				jQuery(this).children().css( 'width', width + '%' );
587			});
588		}, {
589		offset: 'bottom-in-view'
590	});
591});
592
593jQuery(document).ready(function() {
594
595	/* Make slider full width if specified */
596	jQuery( '.rslides-sc' ).each(function( index, element ){
597
598		jQuery( element ).attr( 'id', 'thinkupbuilder-sliderimage-' + index );
599
600			// Collect slider parameter values
601			var wide = jQuery( element ).data( 'wide' );
602			
603			// Format row section for full-screen slider
604			if ( wide == 'on' ) {		
605				jQuery( element ).closest( '.panel-grid' ).css( 'padding', 0 );
606				jQuery( element ).closest( '.panel-grid-core' ).css( 'margin', 0 ).css( 'maxWidth', '100%' );
607				jQuery( element ).closest( '.panel-grid-cell' ).css( 'padding', 0 );
608			}
609	});
610
611	/* Make ThinkUpSlider shortcode full width if specified */
612	jQuery( '.thinkupslider-sc' ).each(function( index, element ){
613
614		jQuery( element ).attr( 'id', 'thinkupbuilder-thinkupsliderimage-' + index );
615
616			// Collect slider parameter values
617			var wide = jQuery( element ).data( 'wide' );
618			
619			// Format row section for full-screen slider
620			if ( wide == 'on' ) {		
621				jQuery( element ).closest( '.panel-grid' ).css( 'padding', 0 );
622				jQuery( element ).closest( '.panel-grid-core' ).css( 'margin', 0 ).css( 'maxWidth', '100%' );
623				jQuery( element ).closest( '.panel-grid-cell' ).css( 'padding', 0 );
624			}
625	});
626
627	/* Make image grid full width if specified */
628	jQuery( '.sc-grid ul' ).each(function( index, element ){
629
630			// Collect slider parameter values
631			var wide = jQuery( element ).data( 'wide' );
632			
633			// Format row section for full-screen slider
634			if ( wide == 'on' ) {		
635				jQuery( element ).closest( '.panel-grid' ).css( 'padding', 0 );
636				jQuery( element ).closest( '.panel-grid-core' ).css( 'margin', 0 ).css( 'maxWidth', '100%' );
637				jQuery( element ).closest( '.panel-grid-cell' ).css( 'padding', 0 );
638			}
639	});
640});
641
642
643/* ----------------------------------------------------------------------------------
644	SHORTCODES - WAYPOINTS ANIMATION
645---------------------------------------------------------------------------------- */
646
647jQuery(document).ready(function() {
648
649	jQuery('.anim-start-ltr').waypoint(
650		function(event, direction) {
651		var time = jQuery(this).parent().attr('title');
652
653			jQuery(this).delay( time ).queue(function(next){
654				jQuery(this).removeClass( 'anim-start-ltr' ).addClass( 'anim-end-ltr' );
655				jQuery(this).parent().removeAttr( 'title' );
656			});	
657		}, {	
658		offset: 'bottom-in-view'
659	});
660
661	jQuery('.anim-start-rtl').waypoint(
662		function(event, direction) {
663		var time = jQuery(this).parent().attr('title');
664
665			jQuery(this).delay( time ).queue(function(next){
666				jQuery(this).removeClass( 'anim-start-rtl' ).addClass( 'anim-end-rtl' );
667				jQuery(this).parent().removeAttr( 'title' );
668			});	
669		}, {
670		offset: 'bottom-in-view'
671	});
672
673	jQuery('.anim-start-btt').waypoint(
674		function(event, direction) {
675		var time = jQuery(this).parent().attr('title');
676
677			jQuery(this).delay( time ).queue(function(next){
678				jQuery(this).removeClass( 'anim-start-btt' ).addClass( 'anim-end-btt' );
679				jQuery(this).parent().removeAttr( 'title' );
680			});	
681		}, {
682		offset: 'bottom-in-view'
683	});
684
685	jQuery('.anim-start-ttb').waypoint(
686		function(event, direction) {
687		var time = jQuery(this).parent().attr('title');
688
689			jQuery(this).delay( time ).queue(function(next){
690				jQuery(this).removeClass( 'anim-start-ttb' ).addClass( 'anim-end-ttb' );
691				jQuery(this).parent().removeAttr( 'title' );
692			});
693		}, {
694		offset: 'bottom-in-view'
695	});
696
697	jQuery('.anim-start-stb').waypoint(
698		function(event, direction) {
699		var time = jQuery(this).parent().attr('title');
700
701			jQuery(this).delay( time ).queue(function(next){
702				jQuery(this).removeClass( 'anim-start-stb' ).addClass( 'anim-end-stb '+ time );
703				jQuery(this).parent().removeAttr( 'title' );
704			});
705		}, {
706		offset: 'bottom-in-view'
707	});
708
709});
710
711
712/* ----------------------------------------------------------------------------------
713	HEADER SEARCH
714---------------------------------------------------------------------------------- */
715
716jQuery(document).ready(function() {
717	jQuery('#header-search a').click(function() {	
718		if ( ! jQuery( '#header-search' ).hasClass( 'active' ) ) {
719			jQuery( '#header-search' ).addClass( 'active' );
720		} else { 
721			jQuery( '#header-search' ).removeClass( 'active' );	
722		}
723	});
724});
725
726
727/* ----------------------------------------------------------------------------------
728	SCROLL TO TOP BUTTON
729---------------------------------------------------------------------------------- */
730
731jQuery(document).ready(function() {
732	if ( jQuery( 'body' ).hasClass( 'scrollup-on' ) ) {
733		(function($) {
734			$(function () {
735				$.scrollUp({
736				scrollName: 'scrollUp', // Element ID
737				scrollText: '', // Text for element, can contain HTML
738			});
739		});
740		} (jQuery) );
741	}
742});
743
744
745/* ----------------------------------------------------------------------------------
746	SUB-FOOTER WIDGETS - CLOSE BUTTON
747---------------------------------------------------------------------------------- */
748
749// Sub-Footer Widget - Close Button
750jQuery('#sub-footer-close-core').click(function() {
751    if(jQuery( this ).hasClass('collapsed')) {
752        jQuery( this ).removeClass('collapsed');
753        jQuery( '#sub-footer-widgets' ).removeClass('collapsed');
754    } else {
755        jQuery( this ).addClass('collapsed');
756        jQuery( '#sub-footer-widgets' ).addClass('collapsed');
757	}
758});
759
760
761/* ----------------------------------------------------------------------------------
762	SLIDER ICON - SMOOTH SCROLL
763---------------------------------------------------------------------------------- */
764
765jQuery(document).ready(function (){
766
767	// Add #thinkupslider-after
768	if ( jQuery( '.featured-icon' ) ) {
769		jQuery( '#slider' ).after( '<div id="thinkupslider-after"></div>' );
770	}
771
772	// Scroll To #thinkupslider-after
773	jQuery('.featured-icon a').click(function(e){
774		e.preventDefault(); 
775		jQuery('html, body').animate( { scrollTop: jQuery( '#thinkupslider-after' ).offset().top },  1000 );
776	});
777});
778
779
780/* ----------------------------------------------------------------------------------
781	WOOCOMMERCE - SOCIAL SHARING
782---------------------------------------------------------------------------------- */
783
784jQuery(document).ready(function (){
785
786	// Add active class to social sharing button
787	jQuery('.woo-share').click(function(e){ 
788	
789		if ( jQuery( this ).hasClass( 'active' ) ) {
790			jQuery( this ).removeClass( 'active' );
791			jQuery( this ).closest( '.woo-meta' ).find( '.woo-meta-social' ).removeClass( 'active' );
792		} else {
793			jQuery( this ).addClass( 'active' );
794			jQuery( this ).closest( '.woo-meta' ).find( '.woo-meta-social' ).addClass( 'active' );
795		}
796	});
797});
798

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.