PageSourceSearch

https://secondavenuesagas.com/wp-content/themes/soledad/js/main.js?ver=7.2.3

js secondavenuesagas.com collected 2026-10-02 02:45:13 UTC 43,753 bytes, 1,452 lines download raw bytes

1/* global PENCILOCALIZE */
2
3(function($) {
4	"use strict";
5	var PENCI = PENCI || {};
6
7	/* General functions
8	 ---------------------------------------------------------------*/
9	PENCI.general = function () {
10		// Top search
11		$( '#top-search a.search-click' ).on( 'click', function () {
12			$( '.show-search' ).fadeToggle();
13			$( '.show-search input.search-input' ).focus();
14		} );
15
16		// Go to top
17		$( '.go-to-top, .penci-go-to-top-floating' ).on( 'click', function () {
18			$( 'html, body' ).animate( { scrollTop: 0 }, 700 );
19			return false;
20		} );
21
22		// Lazyload
23		$('.penci-lazy').Lazy({
24			effect: 'fadeIn',
25			effectTime: 300,
26			scrollDirection: 'both'
27		});
28
29		// Go to top button
30		var $goto_button = $( '.penci-go-to-top-floating' );
31		if ( $goto_button.length ) {
32			$(document).scroll(function() {
33				var y = $(this).scrollTop();
34				if ( y > 300) {
35					$goto_button.addClass('show-up');
36				} else {
37					$goto_button.removeClass('show-up');
38				}
39			} );
40		}
41		
42		// Call back fitvid when click load more button on buddypress
43		$( 'body.buddypress .activity .load-more a' ).on( 'click', function () {
44			$(document).ajaxStop(function() {
45			  $( ".container" ).fitVids();
46			});
47		} );
48	}
49	
50	/* Cookie Law
51	 ---------------------------------------------------------------*/
52	PENCI.cookie = function () {
53		var wrapCookie = '.penci-wrap-gprd-law',
54			$wrapCookie = $( wrapCookie ),
55			classAction = 'penci-wrap-gprd-law-close',
56			penciCookieName = 'penci_law_footer_new';
57
58		if( ! $wrapCookie.length ){
59			return false;
60		}
61
62		var penciCookie = {
63			set: function ( name, value ) {
64				var date = new Date();
65				date.setTime( date.getTime() + (31536000000) );
66				var expires = "; expires=" + date.toGMTString();
67				document.cookie = name + "=" + value + expires + "; path=/";
68			},
69			read: function ( name ) {
70				var namePre = name + "=";
71				var cookieSplit = document.cookie.split( ';' );
72				for ( var i = 0; i < cookieSplit.length; i ++ ) {
73					var cookie = cookieSplit[i];
74					while ( cookie.charAt( 0 ) == ' ' ) {
75						cookie = cookie.substring( 1, cookie.length );
76					}
77					if ( cookie.indexOf( namePre ) === 0 ) {
78						return cookie.substring( namePre.length, cookie.length );
79					}
80				}
81				return null;
82			},
83			erase: function ( name ) {
84				this.set( name, "", - 1 );
85			},
86			exists: function ( name ) {
87				return (
88					this.read( name ) !== null
89				);
90			}
91		};
92
93		$wrapCookie.removeClass( 'penci-close-all' );
94		if (! penciCookie.exists(penciCookieName) || ( penciCookie.exists(penciCookieName) && 1 == penciCookie.read(penciCookieName) ) ) {
95			$wrapCookie.removeClass( classAction );
96		}else {
97			$wrapCookie.addClass( classAction );
98		}
99
100		$( '.penci-gprd-accept, .penci-gdrd-show' ).on( 'click', function ( e ) {
101			e.preventDefault();
102
103			var $this = $(this),
104				$parent_law = $this.closest( wrapCookie );
105
106			$parent_law.toggleClass(classAction);
107
108			if ( $parent_law.hasClass( classAction ) ) {
109				penciCookie.set( penciCookieName, '2' );
110			}else {
111				penciCookie.set( penciCookieName, '1' );
112			}
113
114			return false;
115		} );
116	}
117
118	/* Sticky main navigation
119	 ---------------------------------------------------------------*/
120	PENCI.main_sticky = function () {
121		if ( $().sticky && ! $( "nav#navigation" ).hasClass( 'penci-disable-sticky-nav' ) ) {
122			var spaceTop = 0;
123			if ( $( 'body' ).hasClass( 'admin-bar' ) ) {
124				spaceTop = 32;
125			}
126			$( "nav#navigation" ).each( function () {
127				$( this ).sticky( { topSpacing: spaceTop } );
128			} );
129		} // sticky
130	}
131
132	/* Fix margin headline
133	 ----------------------------------------------------------------*/
134	PENCI.fixheadline = function () {
135		var $headline_title = $( '.penci-headline .headline-title' );
136		if ( $headline_title.length ) {
137			var headline_w = $headline_title.outerWidth() + 70;
138			$('.penci-headline-posts' ).css( 'margin-left', headline_w + 'px' );
139			$('.rtl .penci-headline-posts' ).css( 'margin-left', 0 + 'px' );
140			$('.rtl .penci-headline-posts' ).css( 'margin-right', headline_w + 'px' );
141		}
142	}
143
144	/* Homepage Featured Slider
145	 ---------------------------------------------------------------*/
146	PENCI.featured_slider = function () {
147		if ( $().owlCarousel ) {
148			$( '.featured-area .penci-owl-featured-area' ).each( function () {
149				var $this = $( this ),
150					$style = $this.data( 'style' ),
151					$auto = false,
152					$autotime = $this.data( 'autotime' ),
153					$speed = $this.data( 'speed' ),
154					$loop = $this.data('loop'),
155					$item = 1,
156					$nav = true,
157					$dots = false,
158					$rtl = false,
159					$items_desktop = 1,
160					$items_tablet = 1,
161					$items_tabsmall = 1;
162
163				if( $style === 'style-2' ) {
164					$item = 2;
165				} else if( $style === 'style-28' ) {
166					$loop = true;
167				}
168
169				if( $('html').attr('dir') === 'rtl' ) {
170					$rtl = true;
171				}
172				if ( $this.attr('data-auto') === 'true' ) {
173					$auto = true;
174				}
175				if ( $this.attr('data-nav') === 'false' ) {
176					$nav = false;
177				}
178				if ( $this.attr('data-dots') === 'true' ) {
179					$dots = true;
180				}
181				if ( $this.attr('data-item') ) {
182					$item = parseInt( $this.data('item') );
183				}
184				if ( $this.attr('data-desktop') ) {
185					$items_desktop = parseInt( $this.data('desktop') );
186				}
187				if ( $this.attr('data-tablet') ) {
188					$items_tablet = parseInt( $this.data('tablet') );
189				}
190				if ( $this.attr('data-tabsmall') ) {
191					$items_tabsmall = parseInt( $this.data('tabsmall') );
192				}
193
194				var owl_args = {
195					rtl               : $rtl,
196					loop              : $loop,
197					margin            : 0,
198					items             : $item,
199					navSpeed          : $speed,
200					dotsSpeed         : $speed,
201					nav               : $nav,
202					slideBy           : $item,
203					mouseDrag         : false,
204					lazyLoad          : true,
205					dots              : $dots,
206					navText           : ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
207					autoplay          : $auto,
208					autoplayTimeout   : $autotime,
209					autoplayHoverPause: true,
210					autoplaySpeed     : $speed,
211					responsive        : {
212						0   : {
213							items: 1
214						},
215						480 : {
216							items  : $items_tabsmall,
217							slideBy: $items_tabsmall
218						},
219						768 : {
220							items  : $items_tablet,
221							slideBy: $items_tablet
222						},
223						1170: {
224							items  : $items_desktop,
225							slideBy: $items_desktop
226						}
227					}
228				}
229
230				if( $style === 'style-2' ) {
231					owl_args['center'] = true;
232					owl_args['margin'] = 10;
233					owl_args['autoWidth'] = true;
234				} else if( $style === 'style-28' ) {
235					owl_args['margin'] = 4;
236					owl_args['items'] = 6;
237					owl_args['autoWidth'] = true;
238				} else if( $style === 'style-38' ) {
239					owl_args['center'] = true;
240					owl_args['margin'] = 5;
241					owl_args['autoWidth'] = true;
242				}
243
244				$this.imagesLoaded( function() { $this.owlCarousel( owl_args ); } );
245				
246				$this.on('initialize.owl.carousel', function(event) {
247					$this.closest('.featured-area').addClass('penci-featured-loaded');
248				});
249
250				if( $style === 'style-2' || $style === 'style-38' || $style === 'style-5' || $style === 'style-28' || $style === 'style-29' ) {
251					$this.on( 'changed.owl.carousel', function ( event ) {
252						$this.find( '.penci-lazy' ).Lazy( {
253							effect: 'fadeIn',
254							effectTime: 300,
255							scrollDirection: 'both'
256						} );
257					} );
258				}
259			} );
260		}	// if owlcarousel
261	}
262
263	/* Owl Slider General
264	 ---------------------------------------------------------------*/
265	PENCI.owl_slider = function () {
266		if ( $().owlCarousel ) {
267			$( '.penci-owl-carousel-slider' ).each( function () {
268				var $this = $( this ),
269					$auto = true,
270					$dots = false,
271					$nav = true,
272					$loop = true,
273					$rtl = false,
274					$dataauto = $this.data( 'auto' ),
275					$items_desktop = 1,
276					$items_tablet = 1,
277					$items_tabsmall = 1,
278					$speed = 600,
279					$item = 1,
280					$margin = 0,
281					$autotime = 5000,
282					$datalazy = false;
283
284				if( $('html').attr('dir') === 'rtl' ) {
285					$rtl = true;
286				}
287				if ( $this.attr('data-dots') ) {
288					$dots = true;
289				}
290				if ( $this.attr('data-loop') ) {
291					$loop = false;
292				}
293				if ( $this.attr('data-nav') ) {
294					$nav = false;
295				}
296
297				if ( $this.attr('data-margin') ) {
298					$margin = parseInt( $this.data('margin') );
299				}
300				if ( $this.attr('data-desktop') ) {
301					$items_desktop = parseInt( $this.data('desktop') );
302				}
303				if ( $this.attr('data-tablet') ) {
304					$items_tablet = parseInt( $this.data('tablet') );
305				}
306				if ( $this.attr('data-tabsmall') ) {
307					$items_tabsmall = parseInt( $this.data('tabsmall') );
308				}
309				if ( $this.attr('data-speed') ) {
310					$speed = parseInt( $this.data('speed') );
311				}
312				if ( $this.attr('data-autotime') ) {
313					$autotime = parseInt( $this.data('autotime') );
314				}
315				if ( $this.attr('data-item') ) {
316					$item = parseInt( $this.data('item') );
317				}
318				if ( $this.attr('data-lazy') ) {
319					$datalazy = true;
320				}
321
322				var owl_args = {
323					loop              : $loop,
324					rtl               : $rtl,
325					margin            : $margin,
326					items             : $item,
327					slideBy           : $item,
328					lazyLoad          : $datalazy,
329					navSpeed          : $speed,
330					dotsSpeed         : $speed,
331					nav               : $nav,
332					dots              : $dots,
333					navText           : ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
334					autoplay          : $dataauto,
335					autoplayTimeout   : $autotime,
336					autoHeight        : true,
337					autoplayHoverPause: true,
338					autoplaySpeed     : $speed,
339					responsive        : {
340						0   : {
341							items  : 1,
342							slideBy: 1
343						},
344						480 : {
345							items  : $items_tabsmall,
346							slideBy: $items_tabsmall
347						},
348						768 : {
349							items  : $items_tablet,
350							slideBy: $items_tablet
351						},
352						1170: {
353							items  : $items_desktop,
354							slideBy: $items_desktop
355						}
356					}
357				};
358
359				if ( $this.hasClass( 'penci-headline-posts' ) ) {
360					owl_args['animateOut'] = 'slideOutUp';
361					owl_args['animateIn'] = 'slideInUp';
362				}
363
364				$this.imagesLoaded( function() { $this.owlCarousel( owl_args ); } );
365
366				$this.on('changed.owl.carousel', function(event) {
367					$this.find( '.penci-lazy' ).Lazy( {
368						effect: 'fadeIn',
369						effectTime: 300,
370						scrollDirection: 'both'
371					} );
372				});
373			} );
374		}	// if owlcarousel
375	}
376
377	/* Fitvids
378	 ---------------------------------------------------------------*/
379	PENCI.fitvids = function() {
380		// Target your .container, .wrapper, .post, etc.
381		$( ".container" ).fitVids();
382	}
383
384	/* Sticky sidebar
385	 ----------------------------------------------------------------*/
386	PENCI.sticky_sidebar = function() {
387		if ( $().theiaStickySidebar ) {
388			var top_margin = 90;
389			if( $('body' ).hasClass('admin-bar') && $('body' ).hasClass('penci-vernav-enable') ){
390				top_margin = 62;
391			} else if( ! $('body' ).hasClass('admin-bar') && $('body' ).hasClass('penci-vernav-enable') ) {
392				top_margin = 30;
393			} else if( $('body' ).hasClass('admin-bar') && ! $('body' ).hasClass('penci-vernav-enable') ){
394				top_margin = 122;
395			}
396
397			if( $( '.penci-vc-sticky-sidebar > .penci-vc-row > .penci-vc-column' ).length ){
398				$( '.penci-vc-sticky-sidebar > .penci-vc-row > .penci-vc-column' ).theiaStickySidebar( {
399					additionalMarginTop: top_margin,
400				} );
401			}
402
403			if ( $( '.penci-enSticky .penci-sticky-sb' ).length ) {
404				$( '.penci-enSticky .penci-sticky-sb,.penci-enSticky .penci-sticky-ct' ).the
404iaStickySidebar( {
405					additionalMarginTop: top_margin,
406				} );
407			}
408			$('#main.penci-main-sticky-sidebar, #sidebar.penci-sticky-sidebar' ).theiaStickySidebar({
409				// settings
410				additionalMarginTop: top_margin
411			});
412		} // if sticky
413	}
414
415	/* Mega menu
416	 ----------------------------------------------------------------*/
417	PENCI.mega_menu = function () {
418		$( '#navigation .penci-mega-child-categories a' ).mouseenter( function () {
419			if ( !$( this ).hasClass( 'cat-active' ) ) {
420				var $this = $( this ),
421					$row_active = $this.data( 'id' ),
422					$parentA = $this.parent().children( 'a' ),
423					$parent = $this.closest( '.penci-megamenu' ),
424					$rows = $this.closest( '.penci-megamenu' ).find( '.penci-mega-latest-posts' ).children( '.penci-mega-row' );
425				$parentA.removeClass( 'cat-active' );
426				$this.addClass( 'cat-active' );
427				$rows.hide();
428				$parent.find( '.' + $row_active ).fadeIn( '300' ).css( 'display', 'inline-block' );
429			}
430		} );
431	}
432
433	/* Mobile menu responsive
434	 ----------------------------------------------------------------*/
435	PENCI.mobile_menu = function () {
436		// Add indicator
437		$( '#sidebar-nav .menu li.menu-item-has-children > a' ).append( '<u class="indicator"><i class="fa fa-angle-down"></i></u>' );
438		$( '#sidebar-nav .penci-mega-child-categories' ).closest('li.penci-mega-menu' ).children('a').append( '<u class="indicator"><i class="fa fa-angle-down"></i></u>' );
439
440		// Toggle menu when click show/hide menu
441		$( '#navigation .button-menu-mobile' ).on( 'click', function () {
442			$( 'body' ).addClass( 'open-sidebar-nav' );
443		} );
444
445		// indicator click
446		$( '#sidebar-nav .menu li a .indicator' ).on( 'click', function ( e ) {
447			var $this = $( this );
448			e.preventDefault();
449			$this.children().toggleClass( 'fa-angle-up' );
450			$this.parent().next().slideToggle( 'fast' );
451		} );
452
453		// Close sidebar nav
454		$( '#close-sidebar-nav' ).on( 'click', function () {
455			$( 'body' ).removeClass( 'open-sidebar-nav' );
456		} );
457	}
458	
459	PENCI.toggleMenuHumburger = function () {
460		var $menuhumburger = $( '.penci-menu-hbg' );
461		if ( $menuhumburger.length ) {
462			var $body = $( 'body' ),
463			$button = $( '.penci-vernav-toggle,.penci-menuhbg-toggle,#penci-close-hbg,.penci-menu-hbg
463-overlay' ),
464			sidebarClass = 'penci-menuhbg-open';
465
466			// Add indicator
467			$( '.penci-menu-hbg .menu li.menu-item-has-children > a' ).append( '<u class="indicator"><i class="fa fa-angle-down"></i></u>' );
468			$( '.penci-menu-hbg .penci-mega-child-categories' ).closest('li.penci-mega-menu' ).children('a').append( '<u class="indicator"><i class="fa fa-angle-down"></i></u>' );
469
470			// indicator click
471			$( '.penci-menu-hbg .menu li a .indicator' ).on( 'click', function ( e ) {
472				var $this = $( this );
473				e.preventDefault();
474				$this.children().toggleClass( 'fa-angle-up' );
475				$this.parent().next().slideToggle( 'fast' );
476			} );
477
478			// Click to show mobile menu
479			$button.on( 'click', function ( e ) {
480				e.preventDefault();
481
482				if ( $body.hasClass( sidebarClass ) ) {
483					$body.removeClass( sidebarClass );
484					$button.removeClass( 'active' );
485
486					return;
487				}
488				e.stopPropagation(); // Do not trigger click event on '.site' below
489				$body.addClass( sidebarClass );
490				$button.addClass( 'active' );
491			} );
492			
493			// Scroll menu hamburger and callback lazyload
494			$menuhumburger.on('scroll', function() {
495				$('.penci-menu-hbg .penci-lazy').Lazy({
496					effect: 'fadeIn',
497					effectTime: 300,
498					scrollDirection: 'both'
499				});
500			} );
501		}
502	}
503
504	/* Light box
505	 ----------------------------------------------------------------*/
506	PENCI.lightbox = function () {
507		if ( $().magnificPopup) {
508			$( 'a[data-rel^="penci-gallery-image-content"], .penci-enable-lightbox .gallery-item a' ).magnificPopup( {
509				type               : 'image',
510				closeOnContentClick: true,
511				closeBtnInside     : false,
512				fixedContentPos    : true,
513				image              : {
514					verticalFit: true,
515					titleSrc: 'data-cap'
516				},
517				gallery : {
518					enabled: true
519				},
520				zoom               : {
521					enabled : true,
522					duration: 300
523				}
524			} );
525
526			$( 'a[data-rel^="penci-gallery-bground-content"]' ).magnificPopup( {
527				type               : 'image',
528				closeOnContentClick: true,
529				closeBtnInside     : false,
530				fixedContentPos    : true,
531				image              : {
532					verticalFit: true,
533				},
534				gallery : {
535					enabled: true
536				}
537			} );
538
539
540			// Enable lightbox videos
541			$('.penci-other-layouts-lighbox').magnificPopup( {
542				type: 'iframe',
543				mainClass: 'mfp-fade',
544				fixedContentPos    : true,
545				closeBtnInside     : false,
546				closeOnContentClick: true
547			} );
548
549			if ( $( '.penci-image-gallery' ).length ) {
550				$( '.penci-image-gallery' ).each( function () {
551					var $this = $( this ),
552						id = $this.attr( 'id' );
553
554					$( '#' + id + ' a' ).magnificPopup( {
555						type               : 'image',
556						closeOnContentClick: true,
557						closeBtnInside     : false,
558						fixedContentPos    : true,
559						image              : {
560							verticalFit: true,
561							titleSrc: 'data-cap'
562						},
563						gallery : {
564							enabled: true
565						}
566					} );
567				} );
568			}
569
570			if ( $( '.penci-post-gallery-container' ).length ) {
571				$( '.penci-post-gallery-container' ).each( function () {
572					var $this = $( this ),
573						id = $this.attr( 'id' );
574
575					$( '#' + id + ' a' ).magnificPopup( {
576						type               : 'image',
577						closeOnContentClick: true,
578						closeBtnInside     : false,
579						fixedContentPos    : true,
580						image              : {
581							verticalFit: true,
582							titleSrc: 'data-cap'
583						},
584						gallery : {
585							enabled: true
586						}
587					} );
588				} );
589			}
590
591		} // if magnificPopup exists
592	}
593
594	/* Masonry layout
595	 ----------------------------------------------------------------*/
596	PENCI.masonry = function() {
597		$(window).load(function() {
598			var $masonry_container = $( '.penci-masonry' );
599			if ( $masonry_container.length ) {
600				$masonry_container.each( function () {
601					var $this = $( this );
602					// initialize isotope
603					$this.isotope( {
604						itemSelector      : '.item-masonry',
605						transitionDuration: '.55s',
606						layoutMode        : 'masonry'
607					} );
608				} );
609			}
610		});
611	}
612
613	/* Video Background
614	 ----------------------------------------------------------------*/
615	PENCI.video_background = function() {
616		var $penci_videobg = $( '#penci-featured-video-bg' );
617		if ( $().mb_YTPlayer && $penci_videobg.length ) {
618			$(window ).load( function() {
619				$("#penci-featured-video-bg").mb_YTPlayer();
620				setTimeout(function(){
621					$('.featured-area').addClass( 'loaded-wait' ).append('<div class="overlay-video-click"></div>');
622					$('.overlay-video-click').on( 'click', function () {
623						var $this = $(this);
624						if( !$this.hasClass( 'pause-video' ) ) {
625							$this.addClass('pause-video');
626							jQuery('#penci-featured-video-bg').pauseYTP();
627						} else {
628							$this.removeClass('pause-video');
629							jQuery('#penci-featured-video-bg').playYTP();
630						}
631					});
632				}, 4000);
633			} );
634		}
635	}
636
637	/* Portfolio
638	 ----------------------------------------------------------------*/
639	PENCI.portfolio = function () {
640		var $penci_portfolio = $( '.penci-portfolio' );
641
642
643		if ( $().isotope && $penci_portfolio.length ) {
644			$( '.penci-portfolio' ).each( function () {
645				var $this = $( this ),
646					unique_id = $( this ).attr( 'id' ),
647					DataFilter = null;
648
649				if( typeof(portfolioDataJs) != "undefined" && portfolioDataJs !== null) {
650					for ( var e in portfolioDataJs ) {
651
652						if ( portfolioDataJs[e].instanceId == unique_id ) {
653							var DataFilter = portfolioDataJs[e];
654						}
655					}
656				}
657
658				$( window ).load( function () {
659					$this.isotope( {
660						itemSelector    : '.portfolio-item',
661						animationEngine : 'best-available',
662						animationOptions: {
663							duration: 250,
664							queue   : false
665						}
666					} ); // isotope
667
668					$this.addClass( 'loaded' );
669
670					$('.portfolio-item .inner-item-portfolio').each( function () {
671						var $this = $( this );
672						$this.one( 'inview', function ( event, isInView, visiblePartX, visiblePartY ) {
673							$this.addClass( 'animated' );
674						} ); // inview
675					} ); // each
676
677					var location = window.location.hash.toString();
678					if ( location.length ) {
679						location = location.replace( '#', '' );
680						location.match( /:/ );
681						var Mlocation = location.match( /^([^:]+)/ )[1];
682						location = location.replace( Mlocation + ":", "" );
683
684						if ( location.length > 1 ) {
685
686							var $termActive = $afilter.filter( '[data-term="' + location + '"]' ),
687							    portfolioItem = $this.find( '.portfolio-item' ),
688								$buttonLoadMore = $this.parent().find( '.penci-pagenavi-shortcode' );
689
690							if ( $termActive.length ) {
691
692								liFilter.removeClass( 'active' );
693								$termActive.parent().addClass( 'active' );
694								$this.isotope( { filter: '.penci-' + location } );
695
696								var dataTerm = $termActive.data( "term" ),
697									p = {};
698
699								DataFilter.currentTerm = dataTerm;
700								$.each( DataFilter.countByTerms, function ( t, e ) {
701									p[t] = 0
702								} );
703
704								portfolioItem.each( function ( t, e ) {
705									$.each( ($( e ).data( "terms" ) + "").split( " " ), function ( t, e ) {
706										p[e] ++;
707									} )
708								} );
709
710								var show_button = 'number' == typeof p[dataTerm] && p[dataTerm] == DataFilter.countByTerms[dataTerm];
711								if ( $buttonLoadMore.length ){
712									if ( portfolioItem.length !== DataFilter.count && ! show_button ) {
713										$buttonLoadMore.show();
714									}else{
715										$buttonLoadMore.hide();
716									}
717								}
718							}
719						}
720					}
721				} ); // load
722
723				// Filter items when filter link is clicked
724				var $filter = $this.parent().find( '.penci-portfolio-filter' ),
725					$afilter = $filter.find( 'a' ),
726					liFilter = $filter.find( 'li' );
727
728				liFilter.on( 'click', function () {
729
730					var self = $( this ),
731						term = self.find( 'a' ).data( "term" ),
732						selector = self.find( "a" ).attr( 'data-filter' ),
733						$e_dataTerm = $filter.find( 'a' ).filter( '[data-term="' + term + '"]' ),
734						portfolioItem = $this.find( '.portfolio-item' ),
735						$buttonLoadMore = $this.parent().find( '.penci-pagenavi-shortcode' ),
736						scrollTop = $( window ).scrollTop();
737
738					liFilter.removeClass( 'active' );
739					self.addClass( 'active' );
740
741					$this.parent().find( '.penci-ajax-more-button' ).attr( 'data-cat', term );
742
743					$this.isotope( { filter: selector } );
744
745					if ( $e_dataTerm.length ) {
746						window.location.hash = "*" == term ? "" : term;
747
748						$( window ).scrollTop( scrollTop );
749					}
750
751					var p = {};
752					DataFilter.currentTerm = term;
753					$.each( DataFilter.countByTerms, function ( t, e ) {
754						p[t] = 0
755					} );
756
757					portfolioItem.each( function ( t, e ) {
758						$.each( ($( e ).data( "terms" ) + "").split( " " ), function ( t, e ) {
759							p[e] ++;
760						} )
761					} );
762
763					var show_button = 'number' == typeof p[term] && p[term] == DataFilter.countByTerms[term];
764					if ( $buttonLoadMore.length ){
765						if ( portfolioItem.length !== DataFilter.count && ! show_button ) {
766							$buttonLoadMore.show();
767						}else{
768							$buttonLoadMore.hide();
769						}
770					}
771
772					return false;
773				} );
774
775				PENCI.portfolioLoadMore.loadMore( $this, DataFilter );
776				PENCI.portfolioLoadMore.infinityScroll( DataFilter );
777
778			} ); // each .penci-portfolio
779
780		}	// end if isotope & portfolio
781
782
783		var $btnLoadMore = $( '.penci-plf-loadmore' );
784		if ( ! $().isotope || ! $btnLoadMore.length ) {
785			return false;
786		}
787	}
788
789	PENCI.portfolioLoadMore = {
790		btnLoadMore : $( '.penci-plf-loadmore' ),
791		loadMore: function( $pfl_wapper, DataFilter ){
792			var self = this;
793			$( 'body' ).on( 'click', '.penci-ajax-more-button', function ( event ) {
794				self.actionLoadMore( $( this ),$pfl_wapper, DataFilter );
795			} );
796		},
797		infinityScroll: function( DataFilter ){
798			var self = this,
799				$handle = $( '.penci-plf-loadmore' ),
800				$button_load = $handle.find( '.penci-ajax-more-button' );
801
802			if ( $handle.hasClass( 'penci-infinite-scroll' ) ) {
803				$( window ).on( 'scroll', function () {
804
805					var hT = $button_load.offset().top,
806						hH = $button_load.outerHeight(),
807						wH = $( window ).height(),
808						wS = $( this ).scrollTop();
809
810					if ( ( wS > ( hT + hH - wH ) ) && $button_load.length ) {
811						var $pfl_wapper = $button_load.closest( '.penci-portfolio' );
812						self.actionLoadMore( $button_load,$pfl_wapper, DataFilter );
813					}
814				} ).scroll();
815			}
816		},
817		actionLoadMore: function ( $button_load, $pfl_wapper, DataFilter ) {
818			if ( $button_load.hasClass( 'loading-portfolios' ) ) {
819				return false;
820			}
821
822			$button_load.addClass( 'loading-portfolios' );
823
824			var mesNoMore = $button_load.data( 'mes_no_more' ),
825				mes = $button_load.data( 'mes' );
826
827			DataFilter.pflShowIds = [];
828
829			$button_load.closest('.wrapper-penci-portfolio').find( '.portfolio-item' ).each( function ( t, e ) {
830				DataFilter.pflShowIds.push( $( e ).data( 'pflid' ) );
831			} );
832
833			var data = {
834				action: 'penci_pfl_more_post_ajax',
835				datafilter: DataFilter,
836				nonce: ajax_var_more.nonce
837			};
838			$.post( ajax_var_more.url, data, function ( response ) {
839				if ( ! response.data.items ) {
840					$button_load.find( '.ajax-more-text' ).html( mesNoMore );
841					$button_load.removeClass( 'loading-portfolios' );
842
843					$button_load.closest( '.wrapper-penci-portfolio' ).find( '.penci-portfolio-filter li.active' ).addClass( 'loadmore-finish' );
844
845					setTimeout( function () {
846						$button_load.parent().parent().hide();
847						$button_load.find( '.ajax-more-text' ).html( mes );
848					}, 1200 );
849
850					return false;
851				}
852
853				var $wrap_content = $button_load.closest( '.wrapper-penci-portfolio' ).find( '.penci-portfolio' ),
854					$data = $( response.data.items );
855
856				$wrap_content.find( '.inner-portfolio-posts' ).append( $data );
857				$wrap_content.isotope( 'appended', $data ).imagesLoaded( function () {
858					$wrap_content.isotope( 'layout' );
859				} );
860
861				$('.penci-lazy').Lazy({
862					effect: 'fadeIn',
863					effectTime: 300,
864					scrollDirection: 'both'
865				});
866
867				$( ".container" ).fitVids();
868				
869				$( 'a[data-rel^="penci-gallery-image-content"]' ).magnificPopup( {
870					type               : 'image',
871					closeOnContentClick: true,
872					closeBtnInside     : false,
873					fixedContentPos    : true,
874					image              : {
875						verticalFit: true
876					},
877					gallery : {
878						enabled: true
879					},
880					zoom               : {
881						enabled : true,
882						duration: 300
883					}
884				} );
885
886				$wrap_content.addClass( 'loaded' );
887
888				$('.portfolio-item .inner-item-portfolio').each( function () {
889					var $this = $( this );
890					$this.one( 'inview', function ( event, isInView, visiblePartX, visiblePartY ) {
891						$this.addClass( 'animated' );
892					} ); // inview
893				} ); // each
894
895				$button_load.removeClass( 'loading-portfolios' );
896			} );
897
898			$.ajax( {
899				type: 'POST',
900				dataType: 'html',
901				url: ajax_var_more.url,
902				data: 'datafilter=' + DataFilter + '&action=penci_pfl_more_post_ajax&nonce=' + ajax_var_more.nonce,
903				success: function ( data ) {
904
905
906				},
907				error: function ( jqXHR, textStatus, errorThrown ) {
908				}
909
910			} );
911
912		}
913	}
914
915	/* Gallery
916	 ----------------------------------------------------------------*/
917	PENCI.gallery = function () {
918		var $justified_gallery = $( '.penci-post-gallery-container.justified' );
919		var $masonry_gallery = $( '.penci-post-gallery-container.masonry' );
920		if ( $().justifiedGallery && $justified_gallery.length ) {
921			$( '.penci-post-gallery-container.justified' ).each( function () {
922				var $this = $( this );
923				$this.justifiedGallery( {
924					rowHeight: $this.data( 'height' ),
925					lastRow  : 'nojustify',
926					margins  : $this.data( 'margin' ),
927					randomize: false
928				} );
929			} ); // each .penci-post-gallery-container
930		}
931
932		if ( $().isotope && $masonry_gallery.length ) {
933
934			$('.penci-post-gallery-container.masonry .item-gallery-masonry').each(function () {
935				var $this = $(this).children();
936				if ($this.attr('data-cap') && ! $this.hasClass( 'added-caption' ) ) {
937					var $title = $this.attr('data-cap');
938					if( $title !== 'undefined' ){
939						$this.children().append('<div class="caption">' + $title + '</div>');
940						$this.addClass('added-caption');
941					}
942
943				}
944			});
945		}
946
947		$(window).load(function() {
948			if ( $masonry_gallery.length ) {
949				$masonry_gallery.each( function () {
950					var $this = $( this );
951					// initialize isotope
952					$this.isotope( {
953						itemSelector      : '.item-gallery-masonry',
954						transitionDuration: '.55s',
955						layoutMode        : 'masonry'
956					} );
957
958					$this.addClass( 'loaded' );
959
960					$('.penci-post-gallery-container.masonry .item-gallery-masonry').each( function () {
961						var $this = $( this );
962						$this.one( 'inview', function ( event, isInView, visiblePartX, visiblePartY ) {
963							$this.children().addClass( 'animated' );
964						} ); // inview
965					} ); // each
966
967				} );
968			}
969		});
970	},
971	
972	/* Jarallax
973	 ----------------------------------------------------------------*/
974	PENCI.Jarallax = function () {
975		if ( ! $.fn.jarallax || ! $( '.penci-jarallax' ).length ) {
976			return false;
977		}
978		$( '.penci-jarallax' ).each( function () {
979			var $this = $( this ),
980				$jarallaxArgs = {};
981
982			$this.imagesLoaded( { background: true }, function () {
983				jarallax( $this, $jarallaxArgs );
984			} );
985
986
987		} );
988	},
989	
990	/* Related Popup
991	 ----------------------------------------------------------------*/
992	PENCI.RelatedPopup = function () {
993		if ( $( '.penci-rlt-popup' ).length ) {
994			var rltpopup = $('.penci-rlt-popup'),
995				rltclose = $('.penci-rlt-popup .penci-close-rltpopup');
996			$(window).load(function() {
997				$('.penci-flag-rlt-popup').bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
998					if ( ! rltpopup.hasClass( 'rltpopup-notshow-again' ) && isInView ) {
999						rltpopup.addClass('rltpopup-show-up');
1000						
1001						rltclose.click(function(e) {
1002							e.preventDefault();
1003							rltpopup.removeClass('rltpopup-show-up').addClass('rltpopup-notshow-again');
1004						});
1005					}
1006				});
1007				rltclose.click(function(e) {
1008					e.preventDefault();
1009					rltpopup.removeClass('rltpopup-show-up').addClass('rltpopup-notshow-again');
1010				});
1011			});
1012		}
1013	},
1014
1015	PENCI.extraFunction = {
1016		init: function () {
1017			this.counterUp();
1018			this.progressBar();
1019			this.login();
1020			this.register();
1021			this.map();
1022		},
1023		progressBar: function (){
1024			if ( $( '.penci-review-process' ).length ) {
1025				$( '.penci-review-process' ).each( function () {
1026					var $this = $( this ),
1027						$bar = $this.children(),
1028						$bar_w = $bar.data( 'width' ) * 10;
1029					$this.one( 'inview', function ( event, isInView, visiblePartX, visiblePartY ) {
1030						$bar.animate( {width: $bar_w + '%'}, 1000 );
1031					} ); // bind inview
1032				} ); // each
1033			}
1034
1035			if ( $.fn.easyPieChart && $( '.penci-piechart' ).length ) {
1036				$( '.penci-piechart' ).each( function () {
1037					var $this = $( this );
1038					$this.one( 'inview', function ( event, isInView, visiblePartX, visiblePartY ) {
1039						var chart_args = {
1040							barColor: $this.data( 'color' ),
1041							trackColor: $this.data( 'trackcolor' ),
1042							scaleColor: false,
1043							lineWidth: $this.data( 'thickness' ),
1044							size: $this.data( 'size' ),
1045							animate: 1000
1046						};
1047						$this.easyPieChart( chart_args );
1048					} ); // bind inview
1049				} ); // each
1050			}
1051		},
1052		counterUp: function () {
1053			var $counterup = $( '.penci-counterup-number' );
1054
1055			if ( ! $.fn.counterUp || ! $counterup.length ) {
1056				return false;
1057			}
1058
1059			$counterup.each( function () {
1060				var $this = $( this );
1061
1062				$this.one( 'inview', function ( event, isInView, visiblePartX, visiblePartY ) {
1063					setTimeout( function () {
1064						$( {countNum: $this.text()} ).animate(
1065							{
1066								countNum: $this.attr( 'data-count' )
1067							},
1068
1069							{
1070								duration: 2000,
1071								easing: 'linear',
1072								step: function () {
1073									$this.text( Math.floor( this.countNum ) );
1074								},
1075								complete: function () {
1076									$this.text( this.countNum );
1077								}
1078							}
1079						);
1080					}, $this.attr( 'data-delay' ) );
1081
1082
1083				} ); // bind inview
1084			} );
1085		},
1086		login: function () {
1087			var $body = $( 'body' ),
1088				$loginform = $( '#penci-loginform' ),
1089				$loginContainer = $loginform.parent( '.penci-login-wrap' );
1090
1091			if( ! $loginform.length ) {
1092				return false;
1093			}
1094
1095			$body.on( 'click', '.penci-user-register', function ( e ) {
1096				e.preventDefault();
1097
1098				var $this = $( this ),
1099					$parent = $this.closest( '.penci-login-register' );
1100
1101				$parent.find( '.penci-login-wrap' ).addClass( 'hidden' );
1102				$parent.find( '.penci-register-wrap' ).removeClass( 'hidden' );
1103			} );
1104
1105			$( '#penci-user-login,#penci-user-pass' ).on( 'focus', function () {
1106				$( this ).removeClass( 'invalid' );
1107			} );
1108
1109			$loginform.submit( function ( e ) {
1110				var $this = $( this ),
1111					inputUsername = $this.find( '#penci-user-login' ),
1112					inputPass = $this.find( '#penci-user-pass' ),
1113					valUsername = inputUsername.val(),
1114					valPass = inputPass.val(),
1115					captcha = $this.find( '.g-recaptcha-response' ).val();
1116
1117				if ( inputUsername.length > 0 && valUsername == '' ) {
1118					inputUsername.addClass( 'invalid' );
1119					e.preventDefault();
1120				}
1121
1122				if ( inputPass.length > 0 && valPass == '' ) {
1123					inputPass.addClass( 'invalid' );
1124					e.preventDefault();
1125				}
1126
1127				if ( valUsername == '' || valPass == '' ) {
1128					return false;
1129				}
1130
1131				$loginContainer.parent().addClass( 'ajax-loading' );
1132				$loginContainer.find( '.message' ).slideDown().remove();
1133
1134				var data = {
1135					action: 'penci_login_ajax',
1136					username: valUsername,
1137					password: valPass,
1138					captcha: captcha,
1139					remember: $loginContainer.find( '#rememberme' ).val()
1140				};
1141
1142				$.post( ajax_var_more.url, data, function ( response ) {
1143					$loginContainer.parent().removeClass( 'ajax-loading' );
1144					$loginContainer.append( response.data );
1145					if ( ! response.success ) {
1146						return;
1147					}
1148
1149					window.location = window.location;
1150				} );
1151
1152				e.preventDefault();
1153				return false;
1154			} );
1155		},
1156		register: function () {
1157			var $body = $( 'body' ),
1158				$registerform = $( '#penci-registration-form' ),
1159				$registerContainer = $registerform.closest( '.penci-register-wrap' );
1160
1161			if( ! $registerform.length ) {
1162				return false;
1163			}
1164
1165			$body.on( 'click', '.penci-user-login-here', function ( e ) {
1166				e.preventDefault();
1167
1168				var $this = $( this ),
1169					$parent = $this.closest( '.penci-login-register' );
1170
1171				$parent.find( '.penci-login-wrap' ).removeClass( 'hidden' );
1172				$parent.find( '.penci-register-wrap' ).addClass( 'hidden' );
1173
1174				return false;
1175			} );
1176
1177			var $allInput = $( '.penci_user_name,.penci_user_name,.penci_user_email,.penci_user_pass,.penci_user_pass_confirm' );
1178			$allInput.on( 'focus', function () {
1179				$( this ).removeClass( 'invalid' );
1180			} );
1181
1182			$registerform.submit( function ( e ) {
1183				e.preventDefault();
1184
1185				var $this = $( this ),
1186					inputUsername = $this.find( '.penci_user_name' ),
1187					inputEmail = $this.find( '.penci_user_email' ),
1188					$inputPass = $this.find( '.penci_user_pass' ),
1189					$inputPassConfirm = $this.find( '.penci_user_pass_confirm' ),
1190					valUsername = inputUsername.val(),
1191					valEmail = inputEmail.val(),
1192					valPass = $inputPass.val(),
1193					valPassConfirm = $inputPassConfirm.val(),
1194					captcha = $this.find( '.g-recaptcha-response' ).val();
1195
1196				$allInput.removeClass( 'invalid' );
1197
1198				if ( inputUsername.length > 0 && valUsername == '' ) {
1199					inputUsername.addClass( 'invalid' );
1200					event.preventDefault();
1201				}
1202
1203				if ( inputEmail.length > 0 && valEmail == '' ) {
1204					inputEmail.addClass( 'invalid' );
1205					event.preventDefault();
1206				}
1207
1208				if ( $inputPass.length > 0 && valPass == '' ) {
1209					$inputPass.addClass( 'invalid' );
1210					event.preventDefault();
1211				}
1212
1213				if ( $inputPassConfirm.length > 0 && valPassConfirm == '' ) {
1214					$inputPassConfirm.addClass( 'invalid' );
1215					event.preventDefault();
1216				}
1217				if ( valUsername == '' || valEmail == '' || valPass == '' || valPassConfirm == '' ) {
1218					return false;
1219				}
1220
1221				// Password does not match the confirm password
1222				if ( valPassConfirm !== valPass ) {
1223					$inputPass.addClass( 'invalid' );
1224					$inputPassConfirm.addClass( 'invalid' );
1225					$registerContainer.append( ajax_var_more.errorPass );
1226					event.preventDefault();
1227
1228					return false;
1229				}
1230				$registerContainer.parent().addClass( 'ajax-loading' );
1231				$registerContainer.find( '.message' ).slideDown().remove();
1232
1233				var data = {
1234					action: 'penci_register_ajax',
1235					fistName: $this.find( '.penci_first_name' ).val(),
1236					lastName: $this.find( '.penci_last_name' ).val(),
1237					username: valUsername,
1238					password: valPass,
1239					confirmPass: valPassConfirm,
1240					email: valEmail,
1241					captcha : captcha
1242				};
1243
1244				$.post( ajax_var_more.url, data, function ( response ) {
1245					$registerContainer.parent().removeClass( 'ajax-loading' );
1246					$registerContainer.append( response.data );
1247					if ( ! response.success ) {
1248						return;
1249					}
1250					window.location = window.location;
1251				} );
1252
1253				event.preventDefault();
1254				return false;
1255			} );
1256
1257			return false;
1258		},
1259		map: function () {
1260			if ( ! $( '.penci-google-map' ).length ) {
1261				return false;
1262			}
1263			$( '.penci-google-map' ).each( function () {
1264
1265				var map = $( this ),
1266					Option = map.data( "map_options" ),
1267					mapID = map.attr( 'id' );
1268
1269
1270				var mapTypePre = google.maps.MapTypeId.ROADMAP;
1271				switch ( Option.map_type ) {
1272					case"satellite":
1273						mapTypePre = google.maps.MapTypeId.SATELLITE;
1274						break;
1275					case"hybrid":
1276						mapTypePre = google.maps.MapTypeId.HYBRID;
1277						break;
1278					case"terrain":
1279						mapTypePre = google.maps.MapTypeId.TERRAIN
1280				}
1281				var latLng = new google.maps.LatLng( - 34.397, 150.644 );
1282				var map = new google.maps.Map( document.getElementById( mapID ), {
1283					zoom: parseInt( Option.map_zoom ),
1284					center: latLng,
1285					mapTypeId: mapTypePre,
1286					panControl: Option.map_pan,
1287					zoomControl: Option.map_is_zoom,
1288					mapTypeControl: true,
1289					scaleControl: Option.map_scale,
1290					streetViewControl: Option.map_street_view,
1291					rotateControl: Option.map_rotate,
1292					overviewMapControl: Option.map_overview,
1293					scrollwheel: Option.map_scrollwheel
1294				} );
1295				var marker = new google.maps.Marker( {
1296					position: latLng,
1297					map: map,
1298					title: Option.marker_title,
1299					icon: Option.marker_img
1300				} );
1301
1302				if ( Option.info_window ) {
1303					var infoWindow = new google.maps.InfoWindow( {
1304						content: Option.info_window
1305					} );
1306
1307					google.maps.event.addListener( marker, "click", function () {
1308						infoWindow.open( map, marker );
1309					} );
1310				}
1311
1312				if ( 'coordinates' == Option.map_using && Option.latitude && Option.longtitude ) {
1313					latLng = new google.maps.LatLng( Option.latitude, Option.longtitude );
1314					map.setCenter( latLng );
1315					marker.setPosition( latLng );
1316				} else {
1317					var geocoder = new google.maps.Geocoder();
1318					geocoder.geocode( {
1319						address: Option.address
1320					}, function ( results ) {
1321						var loc = results[0].geometry.location;
1322						latLng = new google.maps.LatLng( loc.lat(), loc.lng() );
1323						map.setCenter( latLng );
1324						marker.setPosition( latLng );
1325					} );
1326				}
1327			} );
1328		},
1329	},
1330
1331	PENCI.VideosList = {
1332		// Init the module
1333		init: function () {
1334			PENCI.VideosList.play();
1335		},
1336		play: function () {
1337			if ( ! $( '.penci-video_playlist' ).length ) {
1338				return false;
1339			}
1340			$( '.penci-video_playlist' ).each( function ( idx, item ) {
1341				var $blockVideo = $( this ),
1342					$VideoF = $blockVideo.find( '.penci-video-frame' );
1343
1344				var $height = $blockVideo.find( '.penci-video-nav' ).height(),
1345					$heightTitle = $blockVideo.find( '.penci-video-nav .penci-playlist-title' ).height()
1346
1347				$blockVideo.find( '.penci-video-playlist-nav' ).css( 'height', $height - $heightTitle );
1348				// Init
1349				$VideoF.video();
1350				PENCI.VideosList.updateStatus( $blockVideo );
1351
1352				// Show First video and remove the loader icon
1353				$VideoF.addVideoEvent( 'ready', function () {
1354					$VideoF.css( 'visibility', 'visible' ).fadeIn();
1355					$blockVideo.find( '.loader-overlay' ).remove();
1356				} );
1357				// Play videos
1358				$blockVideo.on( 'click', '.penci-video-playlist-item', function () {
1359					var $thisVideo = $( this ),
1360						frameID = $thisVideo.data( 'name' ),
1361						$thisFrame = $( '#' + frameID ),
1362						videoSrc = $thisVideo.data( 'src' ),
1363						videoNum = $thisVideo.find( '.penci-video-number' ).text();
1364
1365					if ( $thisVideo.hasClass( 'is-playing' ) ) {
1366						$thisFrame.pauseVideo();
1367						return;
1368					}
1369
1370					// Update the number of the playing video in the title section
1371					$blockVideo.find( '.penci-video-playing' ).text( videoNum );
1372
1373					// Pause all Videos
1374					$blockVideo.find( '.penci-video-frame' ).each( function () {
1375						$( this ).pauseVideo().hide();
1376					} )
1377
1378					// If the iframe not loaded before, add it
1379					if ( ! $thisFrame.length ) {
1380						// Add the loader icon
1381						$blockVideo.find( '.fluid-width-video-wrapper' ).prepend( '' );
1382
1383						$blockVideo.find( '.fluid-width-video-wrapper' ).append( '<iframe class="penci-video-frame" id="' + frameID + '" src="' + videoSrc + '" frameborder="0" width="100%"" height="434" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>' );
1384						$thisFrame = $( '#' + frameID );
1385
1386						$thisFrame.video(); // reinit
1387
1388						$thisFrame.addVideoEvent( 'ready', function ( e, $thisFrame, video_type ) {
1389							$thisFrame.playVideo();
1390							$blockVideo.find( '.loader-overlay' ).remove();
1391						} );
1392					} else {
1393						$thisFrame.playVideo();
1394					}
1395
1396					$thisFrame.css( 'visibility', 'visible' ).fadeIn();
1397
1398					PENCI.VideosList.updateStatus( $blockVideo );
1399
1400				} );
1401			} );
1402		},
1403		updateStatus: function ( $blockVideo ) {
1404			$blockVideo.find( '.penci-video-frame' ).each( function () {
1405				var $this = $( this ),
1406					$videoItem = $( "[data-name='" + $this.attr( 'id' ) + "']" );
1407
1408				$this.addVideoEvent( 'play', function () {
1409					$videoItem.removeClass( 'is-paused' ).addClass( 'is-playing' );
1410				} );
1411
1412				$this.addVideoEvent( 'pause', function () {
1413					$videoItem.removeClass( 'is-playing' ).addClass( 'is-paused' );
1414				} );
1415
1416				$this.addVideoEvent( 'finish', function () {
1417					$videoItem.removeClass( 'is-paused is-playing' );
1418				} );
1419			} );
1420		}
1421	};
1422
1423
1424	/* Init functions
1425	 ---------------------------------------------------------------*/
1426
1427
1428
1429	$(document).ready(function() {
1430		PENCI.general();
1431		PENCI.cookie();
1432		PENCI.main_sticky();
1433		PENCI.fixheadline();
1434		PENCI.featured_slider();
1435		PENCI.owl_slider();
1436		PENCI.fitvids();
1437		PENCI.sticky_sidebar();
1438		PENCI.mega_menu();
1439		PENCI.mobile_menu();
1440		PENCI.toggleMenuHumburger();
1441		PENCI.lightbox();
1442		PENCI.masonry();
1443		PENCI.video_background();
1444		PENCI.portfolio();
1445		PENCI.gallery();
1446		PENCI.Jarallax();
1447		PENCI.RelatedPopup();
1448		PENCI.extraFunction.init();
1449		PENCI.VideosList.init();
1450		$(window ).resize( function(){ PENCI.sticky_sidebar(); } );
1451	});
1452})(jQuery);	// EOF

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.