PageSourceSearch

https://www.pescapesqueiros.com.br/catalog/view/javascript/soconfig/js/so.system.js

js pescapesqueiros.com.br collected 2026-10-06 12:52:36 UTC 12,834 bytes, 415 lines download raw bytes

1/* ------------------------------------------------------ /
2	Magentech jQuery
3	Created by Magentech
4	All rights reserved.
5	+----------------------------------------------------+
6		TABLE OF CONTENTS
7	+----------------------------------------------------+
8	
9	[1]		Quickview - jQuery elevateZoom
10	[2]		Quantity plus minus - Product Detail
11	[3]		Social Widgets Accounts - Slidebar
12	[4]		Back To Top - Slidebar
13	[5]		Language and Currency Dropdowns
14	[6]		Preloading Screen
15	[7]		Simple Blog - Magnific Popup
16	[8]		Preloader Function
17/ ---------------------------------------------------- */
18
19/* Preloading Screen
20 ========================================================*/
21$(window).load(function() {
22	// Animate loader off screen
23	setTimeout(function () {
24        $('body').addClass('loaded');
25    }, 1500);
26	
27});
28
29/* Quickview - jQuery elevateZoom
30 ========================================================*/
31$(function ($) {
32    $('.products-list').magnificPopup({
33        delegate: '.quickview',
34        preloader: true,
35        tLoading: '',
36        type: 'iframe',
37        mainClass: 'my-mfp-zoom-in',
38        removalDelay: 200,
39        gallery: {enabled: true},
40        callbacks: {
41        open: function() {
42          
43        },
44        beforeOpen: function() {
45
46            $('[data-toggle=\'tooltip\']').hover(
47                function() {
48                },
49                function(e) {
50                  $('[data-toggle=\'tooltip\']').tooltip('hide');
51                }
52            );
53        },
54        afterClose: function() {
55            $('[data-toggle=\'tooltip\']').tooltip('hide');
56        },
57        
58      }
59    });
60
61    $('.image-popup-sizechart').magnificPopup({
62        type: 'image',
63        closeOnContentClick: true,
64        mainClass: 'mfp-img-mobile',
65        image: {
66        verticalFit: true
67        }
68    });
69});
70
71/* Quantity plus minus - Product Detail
72 ========================================================*/
73$(function ($) {
74    "use strict";
75    $.initQuantity = function ($control) {
76        $control.each(function () {
77            var $this = $(this),
78                data = $this.data("inited-control"),
79                $plus = $(".input-group-addon:last", $this),
80                $minus = $(".input-group-addon:first", $this),
81                $value = $(".form-control", $this);
82            if (!data) {
83                $control.attr("unselectable", "on").css({
84                    "-moz-user-select": "none",
85                    "-o-user-select": "none",
86                    "-khtml-user-select": "none",
87                    "-webkit-user-select": "none",
88                    "-ms-user-select": "none",
89                    "user-select": "none"
90                }).bind("selectstart", function () {
91                    return false
92                });
93                $plus.click(function () {
94                    var val =
95                        parseInt($value.val()) + 1;
96                    $value.val(val);
97                    return false
98                });
99                $minus.click(function () {
100                    var val = parseInt($value.val()) - 1;
101                    $value.val(val > 0 ? val : 1);
102                    return false
103                });
104                $value.blur(function () {
105                    var val = parseInt($value.val());
106                    $value.val(val > 0 ? val : 1)
107                })
108            }
109        })
110    };
111    $.initQuantity($(".quantity-control"));
112    $.initSelect = function ($select) {
113        $select.each(function () {
114            var $this = $(this),
115                data = $this.data("inited-select"),
116                $value = $(".value", $this),
117                $hidden = $(".input-hidden", $this),
118                $items = $(".dropdown-menu li > a", $this);
119            if (!data) {
120                $items.click(function (e) {
121                    if ($(this).closest(".sort-isotope").length >
122                        0) e.preventDefault();
123                    var data = $(this).attr("data-value"),
124                        dataHTML = $(this).html();
125                    $this.trigger("change", {
126                        value: data,
127                        html: dataHTML
128                    });
129                    $value.html(dataHTML);
130                    if ($hidden.length) $hidden.val(data)
131                });
132                $this.data("inited-select", true)
133            }
134        })
135    };
136    $.initSelect($(".btn-select"))
137});
138
139/* Social Widgets Accounts - Slidebar
140 ========================================================*/
141$(function ($) {
142    "use strict";
143    var socialItems = $('.social-widgets .items .item');
144    var counter = 0;
145    socialItems.each(function () {
146        counter++;
147        var itemclass = "item-0" + counter;
148        $(this).addClass(itemclass)
149    });
150});
151
152$(function ($) {
153    "use strict";
154    $(".social-widgets .item").each(function () {
155        var $this = $(this),
156            timer;
157        $this.on("mouseenter", function () {
158            var $this = $(this);
159            if (timer) clearTimeout(timer);
160            timer = setTimeout(function () {
161                $this.addClass("active")
162            }, 200)
163        }).on("mouseleave", function () {
164            var $this = $(this);
165            if (timer) clearTimeout(timer);
166            timer = setTimeout(function () {
167                $this.removeClass("active")
168            }, 100)
169        }).on("click", function (e) {
170            e.preventDefault()
171        })
172    })
173});
174
175
176$(function ($) {
177    "use strict";
178    var loadmap = $(".social-widgets .item a");
179    loadmap.click(function (e) {
180        e.preventDefault()
181    });
182    loadmap.hover(function (e) {
183        if (!$(this).parent().hasClass("load")) {
184            var loadcontainer = $(this).parent().find(".loading");
185            $.ajax({
186                url: $(this).attr("href"),
187                cache: false,
188                success: function (data) {
189                    setTimeout(function () {
190                        loadcontainer.html(data)
191                    }, 1000)
192                }
193            });
194            $(this).parent().addClass("load")
195        }
196    })
197});
198
199/* Back To Top - Slidebar
200 ========================================================*/
201$(function ($) {
202    "use strict";
203    /*Back to top */
204	$(".back-to-top").addClass("hidden-top");
205		$(window).scroll(function () {
206		if ($(this).scrollTop() === 0) {
207			$(".back-to-top").addClass("hidden-top")
208		} else {
209			$(".back-to-top").removeClass("hidden-top")
210		}
211	});
212
213	$('.back-to-top').click(function () {
214		$('body,html').animate({scrollTop:0}, 1200);
215		return false;
216	});	
217	
218	// Hide tooltip when clicking on it
219   /* var hasTooltip = $("[data-toggle='tooltip']").tooltip();
220	hasTooltip.on('click', function () {
221		    $(this).tooltip('hide')
222	});*/
223});
224
225/* Language and Currency Dropdowns
226 ========================================================*/
227$(document).ready(function(){
228	$screensize = $(window).width();
229	if ($screensize > 1300) {
230		$('#form-currency, #form-language, #my_account').hover(
231			function(){$(this).find('.btn-group').toggleClass('open');}
232		)
233		$('#my_account,#cart').hover(
234			function(){$(this).toggleClass('open');}
235		)
236	}
237	
238	// Product detial reviews button
239	$(".reviews_button,.write_review_button").click(function (){
240        var tabTop = $(".producttab").offset().top;
241        $("html, body").animate({ scrollTop:tabTop }, 1000);
242    });
243   
244    // Resonsive Header Top
245    $(".collapsed-block .expander").click(function (e) {
246        var collapse_content_selector = $(this).attr("href");
247        var expander = $(this);
248		
249        if (!$(collapse_content_selector).hasClass("open")) {
250			expander.addClass("open").html("<i class='fa fa-angle-up'></i>") ;
251		}
252		else expander.removeClass("open").html("<i class='fa fa-angle-down'></i>");
253		
254		if (!$(collapse_content_selector).hasClass("open")) $(collapse_content_selector).addClass("open").slideDown("normal");
255        else $(collapse_content_selector).removeClass("open").slideUp("normal");
256        e.preventDefault()
257    })
258	
259	// Resonsive Sidebar aside
260	$(".open-sidebar").click(function(e){
261        e.preventDefault();
262        $(".sidebar-overlay").toggleClass("show");
263        $(".sidebar-offcanvas").toggleClass("active");
264    });
265      
266    $(".sidebar-overlay").click(function(e){
267        e.preventDefault();
268        $(".sidebar-overlay").toggleClass("show");
269        $(".sidebar-offcanvas").toggleClass("active");
270    });
271    $('#close-sidebar').click(function() {
272        $('.sidebar-overlay').removeClass('show');
273        $('.sidebar-offcanvas').removeClass('active');
274        
275    }); 
276});
277
278	
279	
280/* Simple Blog - Magnific Popup
281 ========================================================*/
282$(function ($) {
283	 $('.image-popup').magnificPopup({
284	  type: 'image',
285	  closeOnContentClick: true,
286	  image: {
287		verticalFit: false
288	  }
289	});
290	
291	$('.blog-listitem').magnificPopup({
292	  delegate: '.popup-gallery',
293	  type: 'image',
294	  tLoading: 'Loading image #%curr%...',
295	  mainClass: 'mfp-img-mobile',
296	  gallery: {
297		enabled: true,
298		navigateByImgClick: true,
299		preload: [0,1] // Will preload 0 - before current, and 1 after the current image
300	  },
301	  image: {
302		tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
303		titleSrc: function(item) {
304		  return item.el.attr('title') ;
305		}
306	  }
307	});
308});	
309
310/* preloader Function
311 ========================================================*/
312$(function ($) {
313	// Preloader
314    if (typeof so_preloader === 'undefined') {
315        so_preloader = '';
316    }
317    if (so_preloader.length == 0) {
318            if ($('#line-load').length > 0) {
319                move();
320            }
321            setTimeout(function () {
322              $('.so-pre-loader').fadeOut();
323            }, 2000);
324       
325    } // has preloader
326    //preloader Function
327	
328	function move() {
329		var elem = document.getElementById("line-load");
330		var width = 1;
331		var id = setInterval(frame, 10);
332
333		function frame() {
334			if (width >= 100) {
335				clearInterval(id);
336			} else {
337				width++;
338				elem.style.width = width + '%';
339				elem.style.height = '4px';
340			}
341		   //$('.so-pre-loader').find('.run-number').html(width);
342		}
343	}
344});	
345
346/* Slider Function
347 ========================================================*/
348
349$(function ($) {
350    "use strict";
351    $('.contentslider').each(function () {
352        var $slider = $(this),
353            $panels = $slider.children(),
354            data = $slider.data(),
355            $totalItem = $panels.length;
356			// Apply Owl Carousel
357		$slider.on("initialized.owl.carousel2", function () {
358			setTimeout(function() {
359			   $slider.parent().find('.loading-placeholder').hide();
360			}, 1000);
361
362		});
363        // Apply Owl Carousel
364        $slider.owlCarousel2({
365            responsiveClass: true,
366            mouseDrag: true,
367            video:true,
368            autoWidth: (data.autowidth == 'yes') ? true : false,
369            animateIn: data.transitionin,
370            animateOut: data.transitionout,
371            lazyLoad: (data.lazyload == 'yes') ? true : false,
372            autoplay: (data.autoplay == 'yes') ? true : false,
373            autoHeight: (data.autoheight == 'yes') ? true : false,
374            autoplayTimeout: data.delay * 1000,
375            smartSpeed: data.speed * 1000,
376            autoplayHoverPause: (data.hoverpause == 'yes') ? true : false,
377            center: (data.center == 'yes') ? true : false,
378            loop: (data.loop == 'yes') ? true : false,
379            dots: (data.pagination == 'yes') ? true : false,
380            rtl: (data.rtl == 'yes') ? true : false,
381            nav: true,
382            dotClass: "owl2-dot",
383            dotsClass: "owl2-dots",
384            margin: data.margin,
385            navText: ['',''],
386            navClass: ["owl2-prev", "owl2-next"],
387            responsive: {
388                0: {
389                    items   : data.items_column4,
390                    nav     : ($totalItem > data.items_column4 && data.arrows == 'yes') ? true : false
391                },
392                480: {
393                    items   : data.items_column3,
394                    nav     : ($totalItem > data.items_column3 && data.arrows == 'yes') ? true : false
395                },
396                768: {
397                    items   : data.items_column2,
398                    nav     : ($totalItem > data.items_column2 && data.arrows == 'yes') ? true : false
399                },
400                992: { 
401                    items   : data.items_column1,
402                    nav     : ($totalItem > data.items_column1 && data.arrows == 'yes') ? true : false
403                },
404                1200: {     
405                    items   : data.items_column0,
406                    nav     : ($totalItem > data.items_column0 && data.arrows == 'yes') ? true : false
407                }
408            }
409        });
410        
411
412    });
413});
414
415

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.