PageSourceSearch

https://primaveradasletras.gal/js/script.js?20260626_5

js primaveradasletras.gal collected 2026-10-02 13:01:46 UTC 13,566 bytes, 515 lines download raw bytes

1;(function($){
2
3	'use strict';
4
5	$(function(){
6
7		/* ---------------------------------------------------- */
8		/*	Sticky spacer										*/
9		/* ---------------------------------------------------- */
10
11		$('#header').after('<div class="sticky-spacer"></div>');
12
13		if ($('.sticky-spacer').length){
14
15			$(window).on("load resize",function(){
16
17				$('.sticky-spacer').css({'height': $('#header').outerHeight()});
18
19				$('.sticky-spacer').hide();
20
21			});
22
23		}
24
25
26		$(window).on('resize', function () {
27			clearTimeout(_swapDebounce);
28			_swapDebounce = setTimeout(swapSlideImagesForMobile, 150);
29		});
30
31		/* ---------------------------------------------------- */
32        /*	Gallery carousel									*/
33        /* ---------------------------------------------------- */
34
35	  	var pageCarousel = $('.owl-carousel');
36
37		if (pageCarousel.length) {
38            $('.owl-carousel').not('#thumbnails').each(function(){
39                var $self = $(this);
40
41                var max_items = $self.data('max-items');
42                var tablet_items = max_items;
43                if(max_items > 1){
44                    tablet_items = max_items - 1;
45                }
46                var mobile_items = 1;
47
48                var autoplay_carousel = $self.data('autoplay');
49
50                var center_carousel = $self.data('center');
51
52                var item_margin = $self.data('item-margin');
53
54                /* Install Owl Carousel */
55                var owlCarousel = $self.owlCarousel({
56                    smartSpeed : 450,
57                    nav : true,
58                    loop  : true,
59                    autoplay : autoplay_carousel,
60                    center: center_carousel,
61                    autoplayTimeout: 3000,
62                    navText : false,
63                    margin: item_margin,
64                    lazyLoad: true,
65                    rtl: $.mad_core.SUPPORT.ISRTL ? true : false,
66                    responsiveClass:true,
67                    responsive : {
68                        0:{
69                            items:mobile_items
70                        },
71                        481:{
72                            items:tablet_items
73                        },
74                        992:{
75                            items:max_items
76                        }
77                    }
78                });
79
80                $self.parent().find('.custom-owl-prev').on('click',function() {
81                    owlCarousel.trigger('prev.owl.carousel');
82
83                    return false;
84                })
85
86                $self.parent().find('.custom-owl-next').on('click',function() {
87                    owlCarousel.trigger('next.owl.carousel');
88
89                    return false;
90
91                });
92            });
93
94			if($('#thumbnails').length){
95				$('#thumbnails').each(function(){
96
97					$(this).owlCarousel({
98						items : 4,
99						URLhashListener : false,
100						navSpeed : 800,
101						margin: 10,
102						dots: false,
103						nav : true,
104						loop : true,
105						rtl: $.mad_core.SUPPORT.ISRTL ? true : false,
106						navText:false,
107						responsive : {
108					        0:{
109					            items:2
110					        },
111					        481:{
112					            items:4
113					        }
114					    }
115				    });
116				});
117
118			}
119		}
120
121		/* ---------------------------------------------------- */
122		/*	Elevate zoom										*/
123		/* ---------------------------------------------------- */
124
125		if($('[data-zoom-image]').length){
126
127			var button = $('.fancybox');
128
129			$("#zoom-image").elevateZoom({
130				gallery:'thumbnails',
131				galleryActiveClass: 'active',
132				zoomType: "inner",
133				cursor: "crosshair",
134				responsive:true,
135			    zoomWindowFadeIn: 500,
136				zoomWindowFadeOut: 500,
137				easing:true,
138				lensFadeIn: 500,
139				lensFadeOut: 500
140			});
141
142			button.on("click", function(e){
143			    var ez = $('#zoom-image').data('elevateZoom');
144				$.fancybox(ez.getGalleryList());
145			  	e.preventDefault();
146			});
147
148		}
149
150		/* ---------------------------------------------------- */
151        /*	SmoothScroll										*/
152        /* ---------------------------------------------------- */
153
154		try {
155			$.browserSelector();
156			var $html = $('html');
157			if ( $html.hasClass('chrome') || $html.hasClass('ie11') || $html.hasClass('ie10') ) {
158				$.smoothScroll();
159			}
160		} catch(err) {}
161
162		/* ---------------------------------------------------- */
163        /*	Custom Select										*/
164        /* ---------------------------------------------------- */
165
166		if ($('.custom-select').length) {
167			$('.custom-select').madCustomSelect();
168		}
169
170		/* ---------------------------------------------------- */
171        /*	Tabs												*/
172        /* ---------------------------------------------------- */
173
174        $(window).on("load",function(){
175
176        	var tabs = $('.tabs-section');
177			if(tabs.length){
178				tabs.tabs({
179					beforeActivate: function(event, ui) {
180				        var hash = ui.newTab.children("li a").attr("href");
181				   	},
182					hide : {
183						effect : "fadeOut",
184						duration : 450
185					},
186					show : {
187						effect : "fadeIn",
188						duration : 450
189					},
190					updateHash : false
191				});
192			}
193
194			if($('ul.smooth_tabs').length){
195				$('ul.smooth_tabs li:first').addClass('ui-tabs-active');
196
197				$('ul.smooth_tabs li a').on("click", function(){
198				   $('ul.smooth_tabs').find('li').removeClass('ui-tabs-active');
199				   $(this).parent('li').addClass("ui-tabs-active");
200
201				   var x = $(this).attr('href');
202				   $(".smooth_item").removeClass('current_catalog_item');
203				   $(".tabs_content ").children('h3').removeClass('current_catalog_item');
204				   $(x).addClass('current_catalog_item');
205				});
206			}
207
208        });
209
210		/* ---------------------------------------------------- */
211        /*	Loader												*/
212        /* ---------------------------------------------------- */
213
214		$("body").queryLoader2({
215	        backgroundColor: '#fff',
216	        barColor : '#f05a21',
217	        barHeight: 4,
218	        deepSearch:true,
219	        minimumTime:1000,
220	        onComplete: function(){
221	        	$(".loader").fadeOut('200');
222	        }
223      	});
224
225		/* ---------------------------------------------------- */
226        /*	Sticky menu											*/
227        /* ---------------------------------------------------- */
228
229		/*$('body').Temp({
230			sticky: true
231		});*/
232
233		/* ---------------------------------------------------- */
234        /*	SmoothScroll										*/
235        /* ---------------------------------------------------- */
236
237		try {
238			$.browserSelector();
239			var $html = $('html');
240			if ( $html.hasClass('chrome') || $html.hasClass('ie11') || $html.hasClass('ie10') ) {
241				$.smoothScroll();
242			}
243		} catch(err) {}
244
245		/* ---------------------------------------------------- */
246        /*	Fancybox											*/
247        /* ---------------------------------------------------- */
248
249        if($('.portfolio-holder').length){
250
251        	if($.fancybox){
252
253	        	$.fancybox.defaults.beforeShow = function () {
254
255					var className = '';
256
257			        if (this.title) {
258			            // New line
259			            this.title += '<br />';
260			            this.title += '<div class="fancybox-share-buttons">';
261
262			        }
263			        else{
264			        	this.title += '<div class="fancybox-share-buttons only">';
265			        }
266
267	    			this.title += '<a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="' + this.href + '">Tweet</a> ';
268
269	        		// Add FaceBook like button
270	    			this.title += '<iframe src="//www.facebook.com/plugins/like.php?href=http://fancyapps.com/fancybox/demo/1_b.jpg&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:23px;" allowtransparency="true"></iframe>';
271
272	    			this.title += '</div>';
273
274				};
275
276				$.fancybox.defaults.afterShow = function(){
277					// Render tweet button
278					twttr.widgets.load();
279				};
280
281				$.fancybox.defaults.helpers.title = {
282					type: 'inside'
283				}
284
285	        }
286
287	        if($.fancybox){
288
289				var $fancyBox = $('.fancybox');
290
291				$.fancybox.defaults.padding = 0;
292				$.fancybox.defaults.wrapCSS = 'custom-lightbox';
293
294				$.fancybox.defaults.helpers.thumbs = {
295					width: 80,
296					height: 80
297				}
298
299				if($fancyBox.length){
300					$fancyBox.fancybox();
301				}
302
303				var fancyboxMedia = $('.fancybox-media');
304
305				if(fancyboxMedia.length){
306
307					fancyboxMedia.fancybox({
308						openEffect  : 'none',
309						closeEffect : 'none',
310						helpers : {
311							media : {}
312						}
313					});
314
315				}
316
317			}
318
319        }
320
321		/* ------------------------------------------------
322		Instagram Feed
323		------------------------------------------------ */
324
325	    if($('.instagram-feed').length){
326
327	    	$('#instafeed').each(function(){
328
329	    		var insta_items = $(this).data('instagram');
330
331	    		var feed = new Instafeed({
332			      target: 'instafeed',
333			      tagName: 'living',
334			      limit: insta_items,
335			      get: 'user',
336			      userId: 7499264607,
337			      accessToken: '7499264607.1677ed0.8a2b237a3c1846929de61f96b5686736',
338			      resolution: 'standard_resolution',
339			      clientId: 'aac3d94ae42546aca486902209e30fdb',
340			      template: '<li class="nv-instafeed-item"><a class="fancybox" rel="instagram" href="{{image}}" title="{{location}}"><img src="{{image}}" /></a></li>',
341			      after: function(){
342			       $('#' + this.options.target).find('.fancybox').fancybox();
343			      }
344			    });
345
346			    feed.run();
347
348	    	});
349
350	    }
351
352	    /* ------------------------------------------------
353		Twitter Feed
354		------------------------------------------------ */
355
356	    if($("#twitter").length){
357
358			var twitter_items = $(this).attr('data-twitter-items');
359
360    		$('#twitter').tweet({
361
362			    modpath: 'plugins/twitter/',
363			    username: "fanfbmltemplate",
364			    count: twitter_items,
365			    loading_text: 'loading twitter feed...'
366			    /* etc... */
367
368			});
369
370		}
371
372		/* ---------------------------------------------------- */
373        /*	Price Scale										    */
374        /* ---------------------------------------------------- */
375
376		var slider;
377		if($('#price').length){
378			slider = $('#price').slider({
379		 		animate: true,
380				range: true,
381				values: [ 1, 99],
382				min: 0,
383				max: 100,
384				slide : function(event ,ui){
385					$('.range-values').find('.first-limit').val('$' + ui.values[0] + ',000');
386					$('.range-values').find('.last-limit').val('$' + ui.values[1] + ',000');
387				}
388			});
389		}
390
391
392		/* ---------------------------------------------------- */
393        /*	Accordion & Toggle									*/
394        /* ---------------------------------------------------- */
395
396		var aItem = $('.accordion:not(.toggle) .accordion-item'),
397			link = aItem.find('.a-title'),
398			$label = aItem.find('label'),
399			aToggleItem = $('.accordion.toggle .accordion-item'),
400			tLink = aToggleItem.find('.a-title');
401
402			aItem.add(aToggleItem).children('.a-title').not('.active').next().hide();
403
404		function triggerAccordeon($item) {
405			$item
406			.addClass('active')
407			.next().stop().slideDown()
408			.parent().siblings()
409			.children('.a-title')
410			.removeClass('active')
411			.next().stop().slideUp();
412		}
413
414
415		if ($label.length) {
416			$label.on('click',function(){
417				triggerAccordeon($(this).closest('.a-title'))
418			});
419		} else {
420			link.on('click',function(){
421				triggerAccordeon($(this))
422			});
423		}
424
425		tLink.on('click',function(){
426			$(this).toggleClass('active')
427			.next().stop().slideToggle();
428
429		});
430
431		/* ---------------------------------------------------- */
432        /*	Isotope												*/
433        /* ---------------------------------------------------- */
434
435		$( window ).on('load', function() {
436
437		  	var $container = $('.isotope');
438		    // filter buttons
439		    $('#filters button').on('click', function(){
440		    	var $this = $(this);
441		        // don't proceed if already selected
442		        if ( !$this.hasClass('is-checked') ) {
443		          $this.parents('#options').find('.is-checked').removeClass('is-checked');
444		          $this.addClass('is-checked');
445		        }
446				var selector = $this.attr('data-filter');
447				$container.isotope({  itemSelector: '.item', filter: selector });
448				return false;
449		    });
450
451		    $.mad_core.isotope();
452
453		});
454
455		/* ---------------------------------------------------- */
456        /*	Quantity											*/
457        /* ---------------------------------------------------- */
458
459		var q = $('.quantity');
460
461		q.each(function(){
462			var $this = $(this),
463				button = $this.children('button'),
464				input = $this.children('input[type="text"]'),
465				val = +input.val();
466
467			button.on('click',function(){
468				if($(this).hasClass('qty-minus')){
469					if(val === 1) return false;
470					input.val(--val);
471				}
472				else{
473					input.val(++val);
474				}
475			});
476		});
477
478		/* ---------------------------------------------------- */
479		/*	Animate a regular anchor navigation					*/
480		/* ---------------------------------------------------- */
481
482	    if ($('a.animated').length) {
483
484	    	$('body').localScroll({
485	           hash: true,
486	           filter: '.animated',
487	           onBefore: function(){
488                 this.offset = 0;
489               }
490	        });
491
492	    }
493
494		/* ---------------------------------------------------- */
495		/*	Sticky footer										*/
496		/* ---------------------------------------------------- */
497
498		$(window).on("load resize",function(){
499
500			var BoxeeBox = $('#footer'); /* cache the selector */
501
502		    if ($(window).width() > 1281) {
503
504		        $('#content').css({ 'margin-bottom': BoxeeBox.outerHeight() });
505
506		    } else{
507
508		    	$('#content').css({ "margin-bottom": "0" });
509
510		    }
511
512		});
513	});
514
515})(jQuery);

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.