PageSourceSearch

https://1powerconsulting.com/wp-content/themes/unos-premium/premium/js/hoot.theme.premium.js?ver=2.12.1

js 1powerconsulting.com collected 2026-10-08 07:13:11 UTC 4,501 bytes, 109 lines download raw bytes

1jQuery(document).ready(function($) {
2	"use strict";
3
4	if( 'undefined' == typeof hootData )
5		window.hootData = {};
6
7	/*** Lightbox ***/
8
9	if( 'undefined' == typeof hootData.lightbox || 'enable' == hootData.lightbox ) {
10		if (typeof $.fn.lightGallery != 'undefined') {
11
12			// Add lightbox to Images
13			if ( 'undefined' == typeof hootData.lightboxImg || 'enable' == hootData.lightboxImg ) {
14
15				$('.woocommerce .entry.product > .images a').addClass('no-lightbox'); // Remove lightbox from woocommerce images, and let woo's lightbox take over
16				$('a[href]').filter(function() {
17					var href = $(this).attr('href'),
18						islb = href.match(/\.(jpg|gif|png|webp)\/?(\?+[^\s]*)*$/);
19					if ( !islb ) islb = /\/\/(?:www\.)?youtu(?:\.be\/|be\.com\/(?:watch\?v=|embed\/)+)/i.test(href);
20					if ( !islb ) islb = /\/\/(?:www\.)?vimeo.com\/(\d+)(?:\/[0-9a-z]+)?/i.test(href);
21					if ( !islb ) islb = /\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i.test(href);
22					if ( !islb ) islb =  /\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i.test(href);
23					return islb;
24					}).each(function(i){
25					var self    = $(this),
26						href    = self.attr('href'),
27						caption = '',
28						child   = self.children('img'),
29						alt     = self.attr('data-alt'),
30						title   = self.attr('title');
31					if ( !title ) title = self.attr('data-title');
32					if ( !title ) title = child.attr('data-title');
33					if ( !alt ) alt = child.attr('alt');
34
35					self.attr('data-src', href).attr('data-lightbox','yes');
36					if(title)   caption += '<h4>'+title+'</h4>';
37					if(alt)     caption += '<p>'+alt+'</p>';
38					if(caption) caption = '<div class="customHtml">'+caption+'</div>';
39					if(caption) self.attr('data-sub-html', caption);
40
41					// Add lightbox if this is not a WordPress Gallery image, not a Jetpack Tiled Gallery or explicitly told not to use lightbox
42					if(
43						!self.parent('.gallery-icon').length &&
44						!self.parent('.tiled-gallery-item').length &&
45						!self.is('.no-lightbox') &&
46						!(self.closest('.lightGallery').length) &&
47						!(self.closest('.wp-block-gallery').length)
48					) {
49						$(self.parent()).addClass('apply-lightbox');
50					}
51				});
52				$('.apply-lightbox').lightGallery({
53					selector : "a[data-lightbox='yes']" // this
54				});
55
56			}
57
58			// Add lightbox to WordPress Gallery and Jetpack Tiled Gallery
59			if ( 'undefined' == typeof hootData.lightboxWpGal || 'enable' == hootData.lightboxWpGal ) {
60				$(".gallery").each(function(i){
61					var galID = $(this).attr('id');
62					$(this).lightGallery({
63						selector : "#"+galID+" .gallery-icon > a[href$='.jpg'], #"+galID+" .gallery-icon > a[href$='.png'], #"+galID+" .gallery-icon > a[href$='.jpeg'], #"+galID+" .gallery-icon > a[href$='.gif'], #"+galID+" .gallery-icon > a[href$='.webp']"
64					});
65				});
66				$(".wp-block-gallery").each(function(i){
67					var galID = 'hoot-block-gallery-' + i;
68					$(this).addClass( galID );
69					$(this).lightGallery({
70						selector : "."+galID+" figure > a[href$='.jpg'], ."+galID+" figure > a[href$='.png'], ."+galID+" figure > a[href$='.jpeg'], ."+galID+" figure > a[href$='.gif'], ."+galID+" figure > a[href$='.webp']"
71					});
72				});
73				$(".tiled-gallery").each(function(i){
74					var galID = 'hoot-tiled-gallery-' + i;
75					$(this).addClass( galID );
76					$(this).lightGallery({
77						selector : "."+galID+" .tiled-gallery-item > a[href$='.jpg'], ."+galID+" .tiled-gallery-item > a[href$='.png'], ."+galID+" .tiled-gallery-item > a[href$='.jpeg'], ."+galID+" .tiled-gallery-item > a[href$='.gif'], ."+galID+" .tiled-gallery-item > a[href$='.webp']"
78					});
79				});
80			}
81
82		}
83	}
84
85	/*** LightGallery (for brevity) ***/
86
87	if( 'undefined' == typeof hootData.lightGallery || 'enable' == hootData.lightGallery ) {
88		if (typeof $.fn.lightGallery != 'undefined') {
89			$(".lightGallery").lightGallery({
90				selector : 'a'
91			});
92		}
93	}
94
95	/*** Isotope for Archive Mosaic Type ***/
96
97	if( 'undefined' == typeof hootData.isotope || 'enable' == hootData.isotope ) {
98		if (typeof $.fn.isotope != 'undefined') {
99			var $mosaic = $(".archive-mosaic").first().parent(),
100				mosaic_relayout = function() { $mosaic.isotope( 'layout' ); };
101			$mosaic.isotope({
102				itemSelector: '.archive-mosaic'
103			});
104			//$(window).load(function() { $mosaic.isotope( 'layout' ); });
105			$(window).load(mosaic_relayout); // bug fix for cases when images are without width/height atts
106		}
107	}
108
109});

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.