PageSourceSearch

https://ivcbrasil.org.br/assets/js/site.js?v=1790957895344

js ivcbrasil.org.br collected 2026-10-02 16:21:12 UTC 9,439 bytes, 315 lines download raw bytes

1var Site = function () {
2	// We extend jQuery by method hasAttr
3	$.fn.hasAttr = function(name) {
4	  return this.attr(name) !== undefined;
5	};
6	
7	// Fixed Header
8	function handleHeader() {
9		jQuery(window).scroll(function() {
10		  if (jQuery(window).scrollTop() > 100) {
11			jQuery('.header-fixed .header-sticky').addClass('header-fixed-shrink');
12		  } else {
13			jQuery('.header-fixed .header-sticky').removeClass('header-fixed-shrink');
14		  }
15		});
16	}
17
18	// Header Mega Menu
19	function handleMegaMenu() {
20		jQuery(document).on('click', '.mega-menu .dropdown-menu', function(e) {
21			e.stopPropagation();
22		})
23	}
24
25	// Search Box (Header)
26	function handleSearch() {
27		jQuery('.search').on("click", function () {
28			if(jQuery('.search-btn').hasClass('fa-search')){
29				jQuery('.search-open').fadeIn(500);
30				jQuery('.search-btn').removeClass('fa-search');
31				jQuery('.search-btn').addClass('fa-times');
32			} else {
33				jQuery('.search-open').fadeOut(500);
34				jQuery('.search-btn').addClass('fa-search');
35				jQuery('.search-btn').removeClass('fa-times');
36			}
37		});
38	}
39
40	// Search Box v1 (Header v5)
41	function handleSearchV1() {
42		jQuery('.header-v5 .search-button').click(function () {
43			jQuery('.header-v5 .search-open').slideDown();
44		});
45
46		jQuery('.header-v5 .search-close').click(function () {
47			jQuery('.header-v5 .search-open').slideUp();
48		});
49
50		jQuery(window).scroll(function(){
51		  if(jQuery(this).scrollTop() > 1) jQuery('.header-v5 .search-open').fadeOut('fast');
52		});
53	}
54
55	// Search Box v2 (Header v8)
56	function handleSearchV2() {
57		$(".blog-topbar .search-btn").on("click", function() {
58		  if (jQuery(".topbar-search-block").hasClass("topbar-search-visible")) {
59			jQuery(".topbar-search-block").slideUp();
60			jQuery(".topbar-search-block").removeClass("topbar-search-visible");
61		  } else {
62			jQuery(".topbar-search-block").slideDown();
63			jQuery(".topbar-search-block").addClass("topbar-search-visible");
64		  }
65		});
66		$(".blog-topbar .search-close").on("click", function() {
67		  jQuery(".topbar-search-block").slideUp();
68		  jQuery(".topbar-search-block").removeClass("topbar-search-visible");
69		});
70		jQuery(window).scroll(function() {
71		  jQuery(".topbar-search-block").slideUp();
72		  jQuery(".topbar-search-block").removeClass("topbar-search-visible");
73		});
74	}
75
76	// TopBar (Header v8)
77	function handleTopBar() {
78		$(".topbar-toggler").on("click", function() {
79		  if (jQuery(".topbar-toggler").hasClass("topbar-list-visible")) {
80			jQuery(".topbar-menu").slideUp();
81			jQuery(this).removeClass("topbar-list-visible");
82		  } else {
83			jQuery(".topbar-menu").slideDown();
84			jQuery(this).addClass("topbar-list-visible");
85		  }
86		});
87	}
88
89	// TopBar SubMenu (Header v8)
90	function handleTopBarSubMenu() {
91		$(".topbar-list > li").on("click", function(e) {
92		  if (jQuery(this).children("ul").hasClass("topbar-dropdown")) {
93			if (jQuery(this).children("ul").hasClass("topbar-dropdown-visible")) {
94			  jQuery(this).children(".topbar-dropdown").slideUp();
95			  jQuery(this).children(".topbar-dropdown").removeClass("topbar-dropdown-visible");
96			} else {
97			  jQuery(this).children(".topbar-dropdown").slideDown();
98			  jQuery(this).children(".topbar-dropdown").addClass("topbar-dropdown-visible");
99			}
100		  }
101		  //e.preventDefault();
102		});
103	}
104
105	// Sidebar Navigation Toggle
106	function handleToggle() {
107		jQuery('.list-toggle').on('click', function() {
108			jQuery(this).toggleClass('active');
109		});
110	}
111
112	// Equal Height Columns
113	function handleEqualHeightColumns() {
114		var EqualHeightColumns = function () {
115			$(".equal-height-columns").each(function() {
116				heights = [];
117				$(".equal-height-column", this).each(function() {
118					$(this).removeAttr("style");
119					heights.push($(this).height()); // write column's heights to the array
120				});
121				$(".equal-height-column", this).height(Math.max.apply(Math, heights)); //find and set max
122			});
123		}
124
125		EqualHeightColumns();
126		$(window).resize(function() {
127			EqualHeightColumns();
128		});
129		$(window).load(function() {
130			EqualHeightColumns();
131		});
132	}
133
134	// Equal Height Image-Columns
135	function handleEqualHeightColumns__Images() {
136		var EqualHeightColumns__Images = function () {
137			$('.equal-height-columns-v2').each(function() {
138				var heights = [];
139				$('.equal-height-column-v2', this).each(function() {
140					$(this).removeAttr('style');
141					heights.push($(this).height()); // Write column's heights to the array
142				});
143				$('.equal-height-column-v2', this).height(Math.max.apply(Math, heights)); // Find and set max
144
145				$('.equal-height-column-v2', this).each(function() {
146					if ($(this).hasAttr('data-image-src')) {
147						$(this).css('background', 'url('+$(this).attr('data-image-src')+') no-repeat scroll 50% 0 / cover');
148					}
149				});
150			});
151		}
152    $('.equal-height-columns-v2').ready(function() {
153      EqualHeightColumns__Images();
154    });
155		$(window).resize(function() {
156			EqualHeightColumns__Images();
157		});
158	}
159
160	// Full Screen
161	var handleFullscreen = function() {
162		var WindowHeight = $(window).height();
163		var HeaderHeight = 0;
164
165		if ($(document.body).hasClass("promo-padding-top")) {
166		  HeaderHeight = $(".header").height();
167		} else {
168		  HeaderHeight = 0;
169		}
170
171		$(".fullheight").css("height", WindowHeight - HeaderHeight);
172
173		$(window).resize(function() {
174		  var WindowHeight = $(window).height();
175		  $(".fullheight").css("height", WindowHeight - HeaderHeight);
176		});
177	}
178
179	// Align Middle
180	var handleValignMiddle = function() {
181		$(".valign__middle").each(function() {
182		  $(this).css("padding-top", $(this).parent().height() / 2 - $(this).height() / 2);
183		});
184		$(window).resize(function() {
185		  $(".valign__middle").each(function() {
186			$(this).css("padding-top", $(this).parent().height() / 2 - $(this).height() / 2);
187		  });
188		});
189	}
190
191	// Hover Selector
192	function handleHoverSelector() {
193		// $('.hoverSelector').on('hover', function(e) {
194		// 	$('.hoverSelectorBlock', this).toggleClass('show');
195		// 	e.stopPropagation();
196		// });
197	    $('.hoverSelector').on('click', function(e) {
198	      if (jQuery(this).children('ul').hasClass('languages')) {
199	        if (jQuery(this).children('ul').hasClass('languages-visible')) {
200	          jQuery(this).children('.languages').slideUp();
201	          jQuery(this).children('.languages').removeClass('languages-visible');
202	        } else {
203	          jQuery(this).children('.languages').slideDown();
204	          jQuery(this).children('.languages').addClass('languages-visible');
205	        }
206	      }
207	      //e.preventDefault();
208	    });
209	}
210
211	// Bootstrap Tooltips and Popovers
212	function handleBootstrap() {
213		/* Bootstrap Carousel */
214		jQuery('.carousel').carousel({
215			interval: 15000,
216			pause: 'hover'
217		});
218
219		/* Tooltips */
220		jQuery('.tooltips').tooltip();
221		jQuery('.tooltips-show').tooltip('show');
222		jQuery('.tooltips-hide').tooltip('hide');
223		jQuery('.tooltips-toggle').tooltip('toggle');
224		jQuery('.tooltips-destroy').tooltip('destroy');
225
226		/* Popovers */
227		jQuery('.popovers').popover();
228		jQuery('.popovers-show').popover('show');
229		jQuery('.popovers-hide').popover('hide');
230		jQuery('.popovers-toggle').popover('toggle');
231		jQuery('.popovers-destroy').popover('destroy');
232	}
233
234	return {
235		init: function () {
236			handleBootstrap();
237			handleSearch();
238			handleSearchV1();
239			handleSearchV2();
240			handleTopBar();
241			handleTopBarSubMenu();
242			handleToggle();
243			handleHeader();
244			handleMegaMenu();
245			handleHoverSelector();
246			handleFullscreen();
247			handleValignMiddle();
248			handleEqualHeightColumns();
249			handleEqualHeightColumns__Images();
250		},
251
252		// Counters
253		initCounter: function () {
254			jQuery('.counter').counterUp({
255				delay: 10,
256				time: 1000
257			});
258		},
259
260		// Parallax Backgrounds
261		initParallaxBg: function () {
262			jQuery(window).load(function() {
263				jQuery('.parallaxBg').parallax("50%", 0.2);
264				jQuery('.parallaxBg1').parallax("50%", 0.4);
265			});
266		},
267
268		// Scroll Bar
269		initScrollBar: function () {
270			jQuery('.mCustomScrollbar').mCustomScrollbar({
271				theme:"minimal",
272				scrollInertia: 200,
273				scrollEasing: "linear"
274			});
275		},
276
277		// Sidebar Menu Dropdown
278		initSidebarMenuDropdown: function() {
279		  function SidebarMenuDropdown() {
280			jQuery('.header-v7 .dropdown-toggle').on('click', function() {
281			  jQuery('.header-v7 .dropdown-menu').stop(true, false).slideUp();
282			  jQuery('.header-v7 .dropdown').removeClass('open');
283
284			  if (jQuery(this).siblings('.dropdown-menu').is(":hidden") == true) {
285				jQuery(this).siblings('.dropdown-menu').stop(true, false).slideDown();
286				jQuery(this).parents('.dropdown').addClass('open');
287			  }
288			});
289		  }
290		  SidebarMenuDropdown();
291		},
292
293		// Animate Dropdown
294		initAnimateDropdown: function() {
295		  function MenuMode() {
296			jQuery('.dropdown').on('show.bs.dropdown', function() {
297			  jQuery(this).find('.dropdown-menu').first().stop(true, true).slideDown();
298			});
299			jQuery('.dropdown').on('hide.bs.dropdown', function() {
300			  jQuery(this).find('.dropdown-menu').first().stop(true, true).slide
300Up();
301			});
302		  }
303
304		  jQuery(window).resize(function() {
305			if (jQuery(window).width() > 768) {
306			  MenuMode();
307			}
308		  });
309
310		  if (jQuery(window).width() > 768) {
311			MenuMode();
312		  }
313		},
314	};
315}();

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.