PageSourceSearch

https://www.thermwood.com/unify_1_9_7/HTML/assets/js/app.js

js thermwood.com collected 2026-10-01 14:00:11 UTC 9,482 bytes, 322 lines download raw bytes

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

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.