PageSourceSearch

https://www.motorna-vozila.com/wp-content/themes/melos/lib/scripts/main-frontend.js?ver=1.6.0

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

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.