PageSourceSearch

http://hiramayoihi.com/themes/default/portal/static/js/page2020.js

js hiramayoihi.com collected 2026-10-03 01:36:52 UTC 10,517 bytes, 409 lines download raw bytes

1var ismobiles = false,
2	win_width = 0,
3	win_height = 0,
4	navItem = 0,
5	atH = 0,
6	$menuBtn = $('.menu-handler'),
7	pageNavNum = 0,
8	scrollNav = 0;
9
10var pageInit = {
11		init: function() {
12			win_width = $(window).width();
13			win_height = $(window).height();
14			if (win_width <= 1024) {
15				ismobiles = true;
16				atH=54;
17			} else if (win_width > 1024) {
18				ismobiles = false;
19				atH=80;
20				menu.close();
21			};
22		},
23		setImgMax: function(img, imgW, imgH, tW, tH) {
24			var tWidth = tW || win_width;
25			var tHeight = tH || win_height;
26			var coe = imgH / imgW;
27			var coe2 = tHeight / tWidth;
28			if (coe < coe2) {
29				var imgWidth = tHeight / coe;
30				img.css({
31					height: tHeight,
32					width: imgWidth,
33					left: -(imgWidth - tWidth) / 2,
34					top: 0
35				});
36			} else {
37				var imgHeight = tWidth * coe;
38				img.css({
39					height: imgHeight,
40					width: tWidth,
41					left: 0,
42					top: -(imgHeight - tHeight) / 2
43				});
44			};
45		},
46		setScroll: function(anchorCur) {
47			if ($(anchorCur).length >= 1) {
48				$("html,body").animate({
49					scrollTop: $(anchorCur).offset().top - atH
50				}, 0);
51			}
52		},
53		scollHeader: function() {
54			function c(){
55				var s = $(window).scrollTop();
56					s > atH ? $(".top").addClass("topSroll"): $(".top").removeClass("topSroll");
57			}
58			$(window).scroll(c),
59			c();
60		},
61		setErmbox: function(obj, title) {
62			obj.click(function() {
63				var str = '<div class="ermsblack"><div class="ermSBox"><div class="img"><img src="' + obj.attr("data-img") +'"/></div><div class="t">' + title + '</div></div></div>';
64				$("body").append(str);
65				$(".ermsblack").fadeIn();
66				$(".ermSBox").animate({
67					marginTop: "-132"
68				}, 400);
69				$(".ermSBox .close").click(function() {
70					$(".ermsblack").remove();
71				});
72				$(".ermsblack").click(function() {
73					$(".ermsblack").remove();
74				});
75				return false;
76			})
77		},
78		splitWords:function (el) {
79			var _test = el.html().split('<br>');
80			el.html('');
81			for (var i = 0; i < _test.length; i++) {
82				el.append('<span></span><br/>');
83				_test[i] = _test[i].split('');
84				var _span = el.find('span');
85				for (var j = 0; j < _test[i].length; j++) {
86					_span.eq(i).append('<i></i>');
87					var _i = _span.eq(i).find('i');
88					if (_test[i][j] === ' ') {
89						_test[i][j] = '&nbsp;'
90					}
91					_i.eq(j).html(_test[i][j])
92				}
93			}
94		},
95		setWordsDelay: function(el, time, delay, reverse) {
96			var _span = el.find('span');
97			_span.each(function(i) {
98				var _i = $(this).find('i');
99				_i.each(function(j) {
100					if (reverse) {
101						j = _i.length - j - 1;
102					}
103					$(this).css({
104						'animation-delay': delay + time * j + 'ms',
105						'-webkit-animation-delay': delay + time * j + 'ms'
106					})
107				})
108			})
109		},
110		setSplit: function(el) {
111			var n = el;
112			for (var e = 0, t = n.length; e < t; e++) {
113				var a = n[e],
114					r = a.textContent.trim();
115				a.innerHTML = "";
116				i(a, r)
117			}
118
119			function i(n, e) {
120				for (var t in e) {
121					var a = document.createElement("span");
122					a.innerHTML = e[t] === " " ? "&nbsp;" : e[t];
123					n.appendChild(a);
124				}
125			}
126		},
127		setTimeDelay: function(el, time, delay, reverse) {
128			var _span = el;
129			_span.each(function(i) {
130				var _i = $(this).find('span');
131				_i.each(function(j) {
132					if (reverse) {
133						j = _i.length - j - 1;
134					}
135					$(this).css({
136						'animation-delay': delay + time * j + 'ms',
137						'-webkit-animation-delay': delay + time * j + 'ms'
138					})
139				})
140			})
141		},
142		setTransitionDelay:function(el, time, delay, reverse,kitem){
143			var _span = el;
144			_span.each(function(i) {
145				var _i = $(this).find(kitem);
146				_i.each(function(j) {
147					if (reverse) { j = _i.length - j - 1; } 
148					$(this).css({
149						'transition-delay': delay + time*j + 's',
150						'-webkit-transition-delay': delay + time*j + 's'
151					})
152				}) 
153			})
154		},
155		showbox: function(htmlAddress) {
156			$.ajax({
157				url: htmlAddress,
158				dataType: "html",
159				success: function(data) {
160					if (data == "" || data == null) {
161						return;
162					} else {
163						if ($(".sm-content").length >= 1) {
164							$('html').removeClass('sm-show');
165							$('.sm-content').remove();
166						};
167						$('.sm-modal .vertical-inner').append(data);
168						$("html").addClass("sm-showb");
169						setTimeout(function() {
170							$("html").addClass("sm-show");
171						}, 50);
172						$('.sm-close').bind('click', function(e) {
173							$('html').removeClass('sm-show');
174							setTimeout(function() {
175								$("html").removeClass("sm-showb");
176								$('.sm-content').remove();
177							}, 400);
178						});
179						$('.sm-modal .vertical-inner').bind('click', function(e) {
180							if ($(e.target).hasClass('vertical-inner')) {
181								$('html').removeClass('sm-show');
182								setTimeout(function() {
183									$("html").removeClass("sm-showb");
184									$('.sm-content').remove();
185								}, 400);
186							}
187						});
188					}
189				},
190				error: function(XMLHttpRequest, textStatus, errorThrown) {
191					$('html').removeClass('sm-show');
192					setTimeout(function() {
193						$("html").removeClass("sm-showb");
194						$('.sm-content').remove();
195					}, 400);
196				}
197			});
198		}
199	},
200	nav={
201		init:function(){
202			jQuery(".nav li").hover(function () {
203				if (jQuery(this).find(".subnav").length > 0) {
204					$(this).children("a").addClass("hov");
205					$(this).find(".subnav").stop(false, false).animate({marginTop:"0","opacity":"show"},350);
206				};
207			}, function () {
208				$(this).children("a").removeClass("hov");
209				$(this).children(".subnav").stop(false, false).fadeOut(250,function(){$(this).css("marginTop","-15px");});
210			});
211			jQuery(".nav .subnav a").click(function(e){
212				var $this=jQuery(this);
213				var hash = $this.attr("href").split("#")[1];
214				if(hash && jQuery("#"+hash).length>=1){
215					e.preventDefault();
216					jQuery("html,body").animate({ scrollTop: jQuery("#"+hash).offset().top-atH},800,'easeInOutExpo');
217					if(ismobiles){
218						jQuery(this).parent().fadeOut();
219					}
220				}
221			});
222		}
223	},
224	menu = {
225		init: function() {
226			$menuBtn.click(function(){
227				if (navItem == 0) {
228					jQuery(this).addClass("active");
229					jQuery("html").addClass("menuOpen");
230					navItem = 1;
231				}else{
232					jQuery(this).removeClass("active");
233					jQuery("html").removeClass("menuOpen");
234					navItem = 0;
235				}
236			});
237			$(document).on("click", ".menubarM .nav-link", function (e) {
238				var mnavcur = $(this);
239				var mnavbox = $(this).parents("li");
240				if (mnavbox.find(".subnav").length > 0) {
241					if (mnavbox.hasClass("cur")) {
242						mnavbox.find(".subnav").stop(false, false).slideUp();
243						mnavbox.removeClass("cur");
244					} else {
245						jQuery(".menubarM li").removeClass("cur");
246						jQuery(".subnav").stop(false, false).slideUp();
247						mnavbox.find(".subnav").stop(false, false).slideDown();
248						mnavbox.addClass("cur");
249						e.preventDefault();
250					}
251				}
252			});
253		},
254		close: function() {
255			$menuBtn.removeClass("active");
256			$("html").removeClass("menuOpen");
257			navItem = 0;
258		}
259	},
260	scollbanner = {
261		init: function() {
262			if(!ismobiles){
263				$('.tbannerH').css({height:win_height});
264				pageInit.setImgMax(jQuery(".tbannerH .load-img"),1920,989,win_width,win_height);
265			}else{
266				$('.tbannerH').css({height:""});
267				$('.tbannerH .load-img').attr({style:""});
268			}
269		},
270		setscoll: function() {
271			$(window).scroll(function () {
272			    var windowTop = $(window).scrollTop();
273			    if (windowTop < win_height && !ismobiles) {
274			        $('.tbanner figure').css('transform', "translate(0px," + (windowTop) / 3.5 + "px)");
275			    };
276			});
277		}
278	},
279	setscolsider={
280		init:function() {
281			function b(){
282				var s = $(window).scrollTop();
283			}
284			$(window).scroll(b),
285			b();
286		}
287	};
288$(window).resize(function() {
289	pageInit.init();
290	scollbanner.init();
291});
292pageInit.init();
293scollbanner.init();
294$(document).ready(function() {
295	nav.init();
296	menu.init();
297	pageInit.scollHeader();
298	scollbanner.setscoll();
299	pageInit.setErmbox($('.ermItem'), "扫描此二维码关注我们");
300	$('.item-span').each(function(i) {
301		pageInit.setSplit($(this));
302		pageInit.setTimeDelay($(this), 80, 250, false);
303	})
304	$('.item-span2').each(function(i) {
305		pageInit.splitWords($(this));
306		pageInit.setWordsDelay($(this), 40, 100, false);
307	});
308	jQuery(".backTop").bind("click", function() {jQuery('html, body').stop().animate({scrollTop: 0}, 500,'easeInOutExpo');});
309	jQuery(window).scroll(function () {
310		var windowTop  = $(window).scrollTop();
311		if(windowTop>140){
312			jQuery(".dock-list").stop(false,false).addClass("showme");
313		}else{
314			jQuery(".dock-list").stop(false,false).removeClass("showme");
315		};
316   });
317	about();
318	videopage();
319	pro();
320});
321function videoShow(name){
322	var videoName=name.data('url');
323	$(".videon").attr("src",videoName);
324	$(".pvideo-bg").addClass("overlay");
325}
326$(".pv-close").click(function(){
327	$(".pvideo-bg").removeClass("overlay");
328	$(".videon").attr("src","");
329});
330$(window).on('load', function() {
331	setscolsider.init();
332	var hash = location.href.split("#")[1];
333	if (hash) {
334		pageInit.setScroll("#" + hash);
335	}
336});
337function about(){
338	var mySwiper = new Swiper('.history-page .swiper-container',{
339		scrollbar: {
340			el: '.swiper-scrollbar',
341			draggable: true,
342			snapOnRelease: false,
343			dragSize: 200,
344		},
345		mousewheel: true,
346		slidesPerView: 5,
347		speed:1000,
348		breakpoints: {
349			0: {
350				slidesPerView: 1,
351			},
352			640: {
353				slidesPerView: 2,
354			},
355			1024: {
356				slidesPerView: 3,
357			},
358			1440: {
359				slidesPerView: 4,
360			},
361			1650: {
362				slidesPerView: 5,
363			},
364		}
365	});  
366	
367	var swiper = new Swiper('.honor-tab .swiper-container', {
368	  	loop: true,
369		speed: 1500,
370		slidesPerView: 5,
371		spaceBetween: 0,
372		centeredSlides : true,
373		watchSlidesProgress : true,
374	  	navigation: {
375			nextEl: '.honor-tab .swiper-button-next',
376			prevEl: '.honor-tab .swiper-button-prev',
377		},
378	  	pagination: {
379	    	el: '.swiper-pagination',
380	    	clickable: true
381	  	},	
382	  	breakpoints: {
383	    	 0: {slidesPerView: 3,},
384	    	 1024: {slidesPerView: 5},
385	  	}
386	});
387	// $(document).on("click", ".honor-nav a", function () {
388	// 	pageTextChange($(this).index());
389	// });
390	// pageTextChange(0);
391	// function pageTextChange(ind) {
392	// 	$(".honor-nav a").eq(ind).addClass("active").siblings().removeClass("active");
393	// 	$(".honor-tab").eq(ind).addClass("active").siblings().removeClass("active");
394	// };
395}
396function pro () {
397	$('.pro-img-demo').slick({asNavFor: '.pro-img-nav'});
398	$('.pro-img-nav').slick({
399	  slidesToShow: 2,
400	  arrows: false,
401	  asNavFor: '.pro-img-demo',
402	  focusOnSelect: true
403	});
404}
405function videopage(){
406	$(document).on("click", ".video-list li", function (e) {
407		videoShow(jQuery(this));
408	});
409}

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.