PageSourceSearch

https://www.sumitomoseika.co.jp/_assets/js/common/script.js?=ver182303

js sumitomoseika.co.jp collected 2026-09-28 09:23:13 UTC 22,647 bytes, 782 lines download raw bytes

1/* ---------------------------------------------------
2 *
3 * copyright(c) Creastitch Inc.
4 * project - SUMITOMO SEIKA CHEMICALS
5 *
6 * ---------------------------------------------------*/
7
8
9/* ---------------------------------------------------
10 * CONSOLELOG IE BUGFIX
11 * ---------------------------------------------------*/
12(function(){
13	if(typeof window.console === 'undefined') window.console = {};
14	if(typeof window.console.log !== 'function') window.console.log = function (){};
15})();
16
17
18/* ---------------------------------------------------
19 * INDEXOF IE BUGFIX
20 * ---------------------------------------------------*/
21if(!Array.prototype.indexOf){
22	Array.prototype.indexOf = function(target,index){
23		if(isNaN(index)) index = 0;
24		for(var i = index; i < target.length; i++){
25			if(this[i] === target) return i;
26		}
27		return -1;
28	};
29}
30
31
32/* ---------------------------------------------------
33 * OS & BROWSER & USERAGENT
34 * ------------------------------------------------ */
35var
36	uaStr = window.navigator.userAgent.toLowerCase(),
37	appVer = window.navigator.appVersion.toLowerCase(),
38	isDevice = false,
39	isIE = false,
40	isIEOld = false,
41	isEdge = false,
42	ieVer = false,
43	isWebkit = false,
44	isFirefox = false,
45	isTouch = false,
46	isOpacity = true,
47	isTransform = true,
48	isTransition = true
49;
50
51var ua = (function(u){
52	return {
53		Tablet: (u.indexOf('windows') != -1 && u.indexOf('touch') != -1) || u.indexOf('ipad') != -1 || (u.indexOf('android') != -1 && u.indexOf('mobile') == -1) || (u.indexOf('firefox') != -1 && u.indexOf('tablet') != -1) || u.indexOf('kindle') != -1 || u.indexOf('silk') != -1 || u.indexOf('playbook') != -1,
54		Mobile: (u.indexOf('windows') != -1 && u.indexOf('phone') != -1) || u.indexOf('iphone') != -1 || u.indexOf('ipod') != -1 || (u.indexOf('android') != -1 && u.indexOf('mobile') != -1) || (u.indexOf('firefox') != -1 && u.indexOf('mobile') != -1) || u.indexOf('blackberry') != -1,
55		IE: u.indexOf('trident') != -1 || u.indexOf('msie') != -1,
56		Edge: u.indexOf('edge') != -1,
57		Webkit: u.indexOf('chrome') != -1 || u.indexOf('safari') != -1,
58		Firefox: u.indexOf('firefox') != -1
59	};
60})(uaStr);
61
62
63/* SMARTPHONE
64 * ------------------------------------------------ */
65if(ua.Tablet || ua.Mobile) isDevice = true;
66if(isDevice){
67	$('html').addClass('device');
68}else{
69	$('html').addClass('no-device');
70}
71
72
73/* IE
74 * ------------------------------------------------ */
75if(ua.IE){
76	isIE = true;
77	var ieAry = /(msie|rv:?)\s?([\d\.]+)/.exec(uaStr);
78	ieVer = (ieAry) ? ieAry[2] : '';
79	ieVer = Math.floor(ieVer);
80	$('html').addClass('ie');
81	$('html').addClass('ie' + ieVer);
82	if(ieVer <= 8){
83		isIEOld = true;
84		$('html').addClass('ieOld');
85	}
86}
87
88
89/* EDGE
90 * ------------------------------------------------ */
91if(ua.Edge){
92	isEdge = true;
93	$('html').addClass('edge');
94}
95
96
97/* WEBKIT
98 * ------------------------------------------------ */
99if(ua.Webkit){
100	isWebkit = true;
101}
102
103
104/* ---------------------------------------------------
105 * GET ROOTPATH
106 * --------------------------------------------------- */
107var
108	rootURL = '',
109	rootPath = ''
110;
111(function(){
112	var
113		file = '_assets/js/common/script.js',
114		reg = new RegExp('(^|.*\/)' + file + '$'),
115		script = document.getElementsByTagName('script'),
116		i = script.length
117	;
118	while(i--){
119		var src = script[i].src.replace(/\?.*?$/g, '');
120		var match = src.match(reg);
121		if(match){
122			rootURL = match[1];
123			break;
124		}
125	}
126	rootPath = rootURL.slice(rootURL.indexOf(location.hostname) + location.hostname.length);
127//console.log('rootURL:' + rootURL);
128//console.log('rootPath:' + rootPath);
129}());
130
131
132/* ---------------------------------------------------
133 * Smooth Scroll
134 * ------------------------------------------------ */
135/*
136$(window).on('load',function(){
137	$('a[href^="#"]').click(function(){
138		var speed = 500;
139		var href= $(this).attr('href');
140		var target = $(href == "#" || href == "" ? 'html' : href);
141		var position = target.offset().top;
142		if(ua.Mobile){
143			$('html, body').animate({scrollTop:position - 80}, speed, 'swing');
144		}else if(ua.Tablet){
145			$('html, body').animate({scrollTop:position - 90}, speed, 'swing');
146		}else{
147			$('html, body').animate({scrollTop:position - 100}, speed, 'swing');
148		}
149		return false;
150	});
151});
152*/
153
154
155$(function(){
156	/* CLICK */
157	$('a[href^="#"]').on('click', function(){
158		//スクロールさせたくないリンクには「data-scroll="none"」をつける
159		if($(this).attr('data-scroll') !== 'none'){
160		//if(!$(this).hasClass('js-noScroll')){
161			var href = $(this).attr('href');
162			smoothScroll({
163				href: href,
164				speed: 750,
165				//指定要素の高さを分ずらす
166				//「data-scroll_fixed="none"」がある場合ずらさない
167				fixed: '.g-header',
168				//fixed: ($(this).attr('data-scroll_fixed') === 'none') ? '' : '.g-header',
169				easing: 'easeOutExpo'
170			});
171			return false;
172		}
173	});
174
175	/* LOAD */
176	var hash = location.hash;
177	if(hash){
178		$(window).scrollTop(0, 0);
179		setTimeout(function(){
180			smoothScroll({
181				href: hash,
182				speed: 750,
183				fixed: '.g-header',
184				easing: 'easeOutExpo'
185			});
186		}, 750);
187	}
188});
189function smoothScroll(e){
190	var
191		speed = e.speed ? e.speed : 750,
192		easing = e.easing ? e.easing : 'easeOutExpo',
193		target = $(e.href === '#' || e.href === '' ? '#anc-pagetop' : e.href),
194		position = (target.length > 0) ? target.offset().top : 0,
195		posMinus = (e.href === '#anc-pagetop') ? -1 : (e.fixed ? $(e.fixed).outerHeight() : -1)
196		//zoom = ($('html').css('zoom') != 1 && !(isNaN($('html').css('zoom')))) ? Number($('html').css('zoom')) : 1
197	;
198	if(ua.Mobile){
199		$('html, body').animate({scrollTop: (position - posMinus - 20)}, speed, easing);
200	}else if(ua.Tablet){
201		$('html, body').animate({scrollTop: (position - posMinus - 20)}, speed, easing);
202	}else{
203		$('html, body').animate({scrollTop: (position - posMinus + 30)}, speed, easing);
204	}
205}
206
207
208
209/* ---------------------------------------------------
210 * LOCATION PARAMETER
211 * ------------------------------------------------ */
212var pagePrm = new Object;
213var pagePrmLocation = location.search.substring(1).split('&');
214for(var i=0; pagePrmLocation[i]; i++){
215	var pagePrmVal = pagePrmLocation[i].split('=');
216	pagePrm[pagePrmVal[0]] = pagePrmVal[1];
217}
218//console.log(pagePrm);
219// EX: pagePrm.hoge
220
221
222/* ---------------------------------------------------
223 * Load Complete
224 * ------------------------------------------------ */
225$(window).on('load',function(){
226	$('html').addClass('is-loaddone');
227}); //END jQuery
228
229
230/* ---------------------------------------------------
231 * MOBILE HEIGHT 100%
232 * ------------------------------------------------ */
233// アドレスバー抜きの高さ
234if(isDevice){
235	$(window).on('load resize',function(){
236		var
237			hSize = $(window).height()
238		;
239		$('.js-windowHeight').height(hSize);
240	}); //END jQuery
241}
242
243
244/* ---------------------------------------------------
245 * Link Invalid
246 * ------------------------------------------------ */
247$(window).on('load',function() {
248	$('.js-Link__invalid').on('click', function(){
249		return false;
250	})
251}); //END jQuery
252
253
254/* ---------------------------------------------------
255 * Tel Link
256 * ------------------------------------------------ */
257if(ua.Mobile){
258	$(function(){
259		$('.js-telLink').each(function(){
260			var str = $(this).text();
261			$(this).html($('<a>').attr('href', 'tel:' + str.replace(/-/g, '')).append(str + '</a>'));
262		});
263	}); //END jQuery
264}
265
266
267/* ---------------------------------------------------
268 * IMAGE ZOOM @media
269 * ------------------------------------------------ */
270$(function(){
271	if(ua.Mobile){
272		$('.js-Zoom').after('<span class="u-Zoom-caption">\u753b\u50cf\u3092\u30bf\u30c3\u30d7\u3067\u62e1\u5927\u3057\u3066\u3054\u89a7\u3044\u305f\u3060\u3051\u307e\u3059\uff61</span>')
273
274		$('.js-Zoom').each(
275			function(i){
276				var src = $(this).attr('src');
277				$(this).wrap($('<a class="u-Link-zoom"></a>').attr({href: src, target: '_blank'}));
278			});
279		}
280}); // END jQuery
281
282
283/* ---------------------------------------------------
284 * LINK FORCUS
285 * ------------------------------------------------ */
286$(function(){
287	var
288		path = location.href.replace(rootURL, '/').replace(/^\//g, '').replace(/\/$/g, ''),
289		pathArray = path.split('/'),
290		pathLength = pathArray.length,
291		forcusClass = 'is-focus__active'
292	;
293	path = path + '/';
294//console.log('path:' + path);
295//console.log('pathArray:' + pathArray);
296//console.log('pathLength:' + pathLength);
297
298	forcusFnc({
299		element: $('a.js-link__focus'),
300		parent: true
301	});
302	forcusFnc({
303		element: $('a.js-link__focus--type_match'),
304		parent: true,
305		match: true
306	});
307	forcusFnc({
308		element: $('a.js-link__focus--add_parent'),
309		parent: true
310	});
311/*
312	forcusFnc({
313		element: $('a.js-link__focus--add_parent.js-link__focus--type_match'),
314		match: true,
315		parent: true
316	});
317*/
318	function forcusFnc(data){
319		var element = data.element;
320		var match = data.match;
321		var parent = data.parent;
322
323		element.each(function(){
324			var
325				href = $(this).get(0).href,
326				hrefPath = href.slice(href.indexOf(rootURL) + (rootURL.length) - 1).replace(/^\//g, '').replace(/\/$/g, ''),
327				hrefArray = hrefPath.split('/'),
328				hrefLength = hrefArray.length
329			;
330			hrefPath = hrefPath + '/';
331//console.log('href:' + href);
332//console.log('hrefPath:' + hrefPath);
333//console.log('hrefArray:' + hrefArray);
334//console.log('hrefLength:' + hrefLength);
335//console.log('parent:' + parent);
336			if(match){
337				if(path === hrefPath){
338					classFnc($(this), parent);
339				}
340			}else{
341//console.log(hrefPath.indexOf('/'));
342				if(
343					(path === hrefPath) ||
344					(
345						hrefPath.indexOf('/') >= 0 &&
346						//hrefLength >= pathLength &&
347						(
348							(!hrefArray[0] && !pathArray[0]) ||
349							(path.indexOf(hrefPath) >= 0 && hrefArray[0])
350						)
351					)
352				){
353//console.log('match:' + hrefArray[hrefLength - 1]);
354//console.log('hrefPath:' + hrefPath);
355//console.log('hrefArray:' + hrefArray);
356//console.log('hrefLength:' + hrefLength);
357					var matchCount = 0;
358					for(var i = 0; i < hrefArray.length; i++){
359//console.log(pathArray.indexOf(hrefArray[i]));
360						if(pathArray.indexOf(hrefArray[i]) >= 0){
361							matchCount++;
362						}
363					}
364//console.log('matchCount:' + matchCount);
365					if(pathArray[matchCount - 1] == hrefArray[matchCount - 1]){
366						classFnc($(this), parent);
367					}
368//console.log(path.indexOf(hrefPath));
369				}
370			}
371		});
372	}
373
374	function classFnc(select, parent){
375		select.addClass(forcusClass);
376		if(parent){
377			select.parent().addClass(forcusClass);
378		}
379	} //END classFnc
380
381}); //END jQuery
382
383
384/* ---------------------------------------------------
385 * RIGHT CLICK PROHIBITION
386 * ------------------------------------------------ */
387/*
388$(function(){
389	$('.js-prohibition').on('contextmenu',function(e){
390		return false;
391	});
392});
393*/
394
395
396/* ---------------------------------------------------
397 * Header Change
398 * ------------------------------------------------ */
399$(function(){
400	$(window).on('load scroll', function() {
401		if ($(window).scrollTop() > 100) {
402			$('html').addClass('is-scroll');
403		} else {
404			$('html').removeClass('is-scroll');
405		}
406	});
407}); //END jQuery
408
409
410/* ---------------------------------------------------
411 * GLOBAL MENU - HAMBURGER MENU
412 * ------------------------------------------------ */
413
414$(window).on('load resize', function(){
415	var windowWidth = $(window).width();
416	var windowSm = 1199;
417	if (windowWidth <= windowSm) {
418		$('.js-naviButton').on('click',function(){
419			if($('.g-naviPullDown').not(':animated').length >= 1){
420				$(this).toggleClass('is-active');
421				$('html').toggleClass('is-gnaviPullDown-active');
422				setTimeout(function(){
423					$('.g-naviPullDown').scrollTop(0);
424				},500);
425			}
426		});
427
428		$('.js-menu__title__button').on('click',function(){
429			if($(this).parent('.g-menu__title').next('.g-menu__inner').not(':animated').length >= 1){
430				$(this).toggleClass('is-active');
431				$(this).parent('.g-menu__title').next('.g-menu__inner').slideToggle();
432			}
433		});
434	}else{
435		var
436			html = $('html'),
437			stateOn = 'is-gnaviPullDown-active',
438			delay=100,
439			setTimeoutConst
440		;
441
442		$('.js-gnaviItem').on({
443			'mouseenter':function(){
444				var
445					indexButton = $('.js-gnaviItem').index(this),
446					gnaviHeight = $('.js-naviPullDown').eq(indexButton).outerHeight()
447				;
448				setTimeoutConst = setTimeout(function() {
449				html.addClass(stateOn);
450				$(this).addClass('is-active');
451				$('.js-naviPullDown').eq(indexButton).addClass('is-active');
452				$('.js-naviBase').css('transform', 'translateY(' + gnaviHeight + 'px)');
453				}, delay);
454			},
455			'mouseleave':function(){
456				clearTimeout(setTimeoutConst);
457				html.removeClass(stateOn);
458				$(this).removeClass('is-active');
459				$('.js-naviPullDown').removeClass('is-active');
460				$('.js-naviBase').css('transform', 'translateY(0)');
461			}
462		});
463
464		$('.js-naviPullDown').on({
465			'mouseenter':function(){
466				var
467					indexCorner = $('.js-naviPullDown').index(this),
468					gnaviHeight = $(this).outerHeight()
469				;
470				html.addClass(stateOn);
471				$(this).addClass('is-active');
472				$('.js-gnaviItem').eq(indexCorner).addClass('is-active');
473				$('.js-naviBase').css('transform', 'translateY(' + gnaviHeight  + 'px)')
474			},
475			'mouseleave':function(){
476				html.removeClass(stateOn);
477				$(this).removeClass('is-active');
478				$('.js-gnaviItem').removeClass('is-active');
479				$('.js-naviBase').css('transform', 'translateY(0)')
480			}
481		});
482	}
483});// jQuery END
484
485
486/* ---------------------------------------------------
487 * SCROLL CLASS
488 * ------------------------------------------------ */
489$(function(){
490	var
491		select = '.js-Scroll-class',
492		onClass = 'is-State-scroll',
493		selectT = [],
494		winT = 0,
495		mgT = 200,
496		timer = false
497	;
498	setTimeout(function(){
499		scrollFnc();
500	}, 500);
501	$(window).on('scroll', function(){
502		//if(timer !== false) clearTimeout(timer);
503		//timer = setTimeout(function(){
504			scrollFnc();
505		//}, 10);
506	});
507	function scrollFnc(){
508		winT = $(window).scrollTop();
509		mgT = ($(window).height() * (3 / 4));
510		//mgT = ($(window).height() / 2);
511//console.log('winT:' + winT);
512//console.log('mgT:' + mgT);
513
514		$(select).each(function(index){
515			selectT[index] = $(this).offset().top;
516//console.log('selectT[index]:' + index + ':' + selectT[index]);
517//console.log(index + ':' + $(this).offset().top);
518
519			//if(selectT[index] < winT + $(window).height() - mgT){
520			if($(this).offset().top < winT + mgT){
521			//if(selectT[index] < winT + mgT){
522				$(this).addClass(onClass);
523			}
524		});
525	}
526}); //END jQuery
527
528
529/* ---------------------------------------------------
530 * SIDE OPENER
531 * ------------------------------------------------ */
532$(function(){
533	$('.js-side-menu-opener').on('click', function(){
534		if($(this).next('.g-side__child-items').not(':animated').length >= 1){
535			$(this).toggleClass('is-active');
536			$(this).next('.g-side__child-items').slideToggle();
537		}
538	});
539}); // END jQuery
540
541
542/* ---------------------------------------------------
543 * SIDE OPENER - OPEN
544 * ------------------------------------------------ */
545$(function(){
546
547	if(document.URL.match('/tokusei/')){
548		var
549			$activeTarget = $('.g-side__item--tokusei')
550		;
551		$activeTarget.children('.g-side__button').addClass('is-active');
552		$activeTarget.children('.g-side__child-items').show();
553	}
554
555	if(document.URL.match('/use/')){
556		var
557			$activeTarget = $('.g-side__item--use')
558		;
559		$activeTarget.children('.g-side__button').addClass('is-active');
560		$activeTarget.children('.g-side__child-items').show();
561	}
562
563	if(document.URL.match('kyusui|kinou|gas')){
564		var
565			$activeTarget = $('.g-side__item--biz')
566		;
567		$activeTarget.children('.g-side__button').addClass('is-active');
568		$activeTarget.children('.g-side__child-items').show();
569	}
570
571	if(document.URL.match('/zaimu/koukoku.html')){
572		var
573			$irTarget = $('.js-gnaviItem').eq(4)
574		;
575		$irTarget.addClass('is-focus__active');
576		$irTarget.children('a').addClass('is-focus__active');
577	}else if(document.URL.match('/zaimu/')){
578		var
579			$activeTarget = $('.g-side__item--zaimu')
580		;
581		$activeTarget.children('.g-side__button').addClass('is-active');
582		$activeTarget.children('.g-side__child-items').show();
583	}
584
585	//if(document.URL.match('/csr/social/|/csr/relation/|/csr/employees/')){
586	//	var
587	//		$activeTarget = $('.g-side__item--social')
588	//	;
589	//	$activeTarget.children('.g-side__button').addClass('is-active');
590	//	$activeTarget.children('.g-side__child-items').show();
591	//}
592
593	if(document.URL.match('/sustainability/environment/|/sustainability/environment/initiatives/|/sustainability/wasteincinerators/|/sustainability/environmental_policy/|/sustainability/biodiversity/')){
594		var
595			$activeTarget = $('.g-side__item--environment')
596		;
597		$activeTarget.children('.g-side__button').addClass('is-active');
598		$activeTarget.children('.g-side__child-items').show();
599	}
600
601	if(document.URL.match('/sustainability/relation/|/sustainability/society/chemical/|/sustainability/society/procurement/|/sustainability/society/quality/|/sustainability/employees/|/sustainability/social/|/sustainability/society/logistics/|/sustainability/society/human_rights/|/sustainability/dei/|/sustainability/health/')){
602		var
603			$activeTarget = $('.g-side__item--social')
604		;
605		$activeTarget.children('.g-side__button').addClass('is-active');
606		$activeTarget.children('.g-side__child-items').show();
607	}
608
609	if(document.URL.match('/sustainability/corporategovernance/|/sustainability/internalcontrol/|/sustainability/risk/|/sustainability/compliance/|/sustainability/rc/')){
610		var
611			$activeTarget = $('.g-side__item--governance')
612		;
613		$activeTarget.children('.g-side__button').addClass('is-active');
614		$activeTarget.children('.g-side__child-items').show();
615	}
616
617	if(document.URL.match('/en/ir|/briefing/')){
618		var
619			$activeTarget = $('.g-side__item--zaimu')
620		;
621		$activeTarget.children('.g-side__button').addClass('is-active');
622		$activeTarget.children('.g-side__child-items').show();
623	}
624
625}); // END jQuery
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642/* ---------------------------------------------------
643 * COOKIE CHECK
644 * ------------------------------------------------ */
645$(function(){
646	if ($.cookie('sumitomoseika-cookieCheck-jp')) {
647		$(':lang(ja) .g-cookieCheck').remove();
648	}
649	$('.js-cookieCheck__button--jp').on('click', function(){
650		$.cookie('sumitomoseika-cookieCheck-jp', 'on', { expires: 999, path: "/" });
651		$('.g-body').addClass('is-cookieCheck__off');
652	});
653	$('.js-cookieCheck__close').on('click', function(){
654		$('.g-body').addClass('is-cookieCheck__off');
655	});
656
657	if ($.cookie('sumitomoseika-cookieCheck-en')) {
658		$(':lang(en) .g-cookieCheck, :lang(zh-cn) .g-cookieCheck, :lang(zh-tw) .g-cookieCheck, :lang(ko) .g-cookieCheck').remove();
659	}
660	$('.js-cookieCheck__button--en').on('click', function(){
661		$.cookie('sumitomoseika-cookieCheck-en', 'on', { expires: 999, path: "/" });
662		$('.g-body').addClass('is-cookieCheck__off');
663	});
664	$('.js-cookieCheck__close').on('click', function(){
665		$('.g-body').addClass('is-cookieCheck__off');
666	});
667
668	if ($.cookie('sumitomoseika-cookieCheck-zh')) {
669		$(':lang(zh) .g-cookieCheck').remove();
670	}
671	$('.js-cookieCheck__button--zh').on('click', function(){
672		$.cookie('sumitomoseika-cookieCheck-zh', 'on', { expires: 999, path: "/" });
673		$('.g-body').addClass('is-cookieCheck__off');
674	});
675	$('.js-cookieCheck__close').on('click', function(){
676		$('.g-body').addClass('is-cookieCheck__off');
677	});
678
679}); //END jQuery
680
681
682/* ---------------------------------------------------
683 * Product side button fix
684 * ------------------------------------------------ */
685if(isDevice){
686}else{
687	$(function(){
688		if ($('.g-productAddress').length) {
689			var
690				$buttonPos = $('.g-productAddress').offset(),
691				$footerPos = $('.g-footer').offset()
692			;
693			$(window).on('load scroll',function(){
694				if($(window).scrollTop() + 100 > $buttonPos.top){
695					$('body').addClass('is-productAddress--active');
696				}else{
697					$('body').removeClass('is-productAddress--active');
698				}
699
700				if($(window).scrollTop() + 330 > $footerPos.top){
701					$('body').addClass('is-productAddress--activeFoot');
702				} else {
703					$('body').removeClass('is-productAddress--activeFoot');
704				}
705			});
706		}
707	}); // jQuery END
708}
709
710
711/* ---------------------------------------------------
712 * Page top
713 * ------------------------------------------------ */
714$(window).on('load scroll', function() {
715	if ($(this).scrollTop() > 200) {
716		$('.js-pagetop').addClass('is-Active');
717	} else {
718		$('.js-pagetop').removeClass('is-Active');
719	}
720
721	var scrollHeight = $(document).height();
722	var scrollPosition = $(window).height() + $(window).scrollTop();
723	var footHeight = $('.g-footer').outerHeight();
724
725	if(ua.Mobile){
726		if(scrollHeight - scrollPosition - 20 <= footHeight){
727			$('.js-pagetop').css({
728				'position': 'absolute',
729				'top': scrollHeight - footHeight - 145,
730				'bottom': 'auto'
731			});
732		} else {
733			$('.js-pagetop').css({
734				'position': 'fixed',
735				'top': 'auto',
736				'bottom': '60px'
737			});
738		}
739	}else if(ua.Tablet){
740		if (scrollHeight - scrollPosition <= footHeight) {
741			$('.js-pagetop').css({
742				'position': 'absolute',
743				'top': scrollHeight - footHeight - 85,
744				'bottom': 'auto'
745			});
746		}else{
747			$('.js-pagetop').css({
748				'position': 'fixed',
749				'top': 'auto',
750				'bottom': '20px'
751			});
752		}
753	}else{
754		if(scrollHeight - scrollPosition <= footHeight){
755			$('.js-pagetop').css({
756				'position': 'absolute',
757				'top': scrollHeight - footHeight - 175,
758				'bottom': 'auto'
759			});
760		}else{
761			$('.js-pagetop').css({
762				'position': 'fixed',
763				'top': 'auto',
764				'bottom': '100px'
765			});
766		}
767	}
768}); // jQuery END
769
770
771/* ---------------------------------------------------
772 * Popup
773 * ---------------------------------------------------*/
774function openCWindow(uri, width, height){
775	var left = Math.floor((screen.width-width)/2);
776	var top  = Math.floor((screen.height-height)/2);
777	var win = window.open(uri, "owin", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width="+width+",height="+height+",left="+left+",top="+top);
778	if(document.all == void 0 && document.layers == void 0 && document.getElementById == void 0){
779		win.resizeTo(width, height);
780		win.moveTo(left, top);
781	}
782}

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.