PageSourceSearch

https://superjunior-jp.net/assets/js/script.js?20260925060536

js superjunior-jp.net collected 2026-09-24 21:13:37 UTC 25,596 bytes, 591 lines download raw bytes

1
2var touchclick = ('ontouchstart' in document) ? 'touchstart' : 'click';
3var device = (navigator.userAgent.indexOf('iPhone') > 0 || navigator.userAgent.indexOf('iPad') > 0 || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0) ? 'sp' : 'pc';
4var isDrag = false;
5
6$(document).on('mousedown', function(e){
7	var x = e.screenX;
8	var y = e.screenY;
9	isDrag = false;
10	$(document).on('mousemove', function(e){ if(Math.abs(x - e.screenX) > 5 || Math.abs(y - e.screenY) > 5) isDrag = true; });
11});
12$(document).on('mouseup', function(e){ $(document).off('mousemove'); });
13
14var render = function(){
15	var query = {};
16
17	this.show = function(){
18
19		// --------------------------------
20		// common
21
22		$('nav.paging a[href^="#"], nav.backtop a[href^="#"]').touchclick(function(e){
23			e.preventDefault();
24			if(!isDrag) $('html, body').animate({ scrollTop:$('#'+this.href.split('#')[1]).offset().top - 166 }, { duration:1000, easing:'easeOutCubic' });
25		});
26
27		$('div#page nav.page div.nav div.table div.table-cell div.offset div.link ul li a').removeClass('on');
28		$.each(new Array('top','profile','news','schedule','discography','movie','goods','special'), function(i, value){
29			if($('main').hasClass(value)) $('div#page nav.page div.nav div.table div.table-cell div.offset div.link ul li').eq(i).find('a').addClass('on');
30		});
31
32		$('a[data-pjax="page"]').each(function(){
33			$(this).attr('href', $(this).data('url'));
34		});
35
36		$('nav.page div.lang div.table div.table-cell div.offset div.link ul li a').removeClass('on');
37		$('nav.page div.lang div.table div.table-cell div.offset div.link ul li:eq(0) a').addClass('on');
38		$.each(new Array('/sjk','/sjc','/sjt','/sje'), function(i, value){
39			if(location.href.indexOf(value) != -1){
40				$('header.page div.header h1 a[data-pjax="page"]').each(function(){
41					$(this).attr('href', value + $(this).data('url'));
42				});
43				$('header.page div.header nav div.offset ul li a[data-pjax="page"]').each(function(){
44					$(this).attr('href', value + $(this).data('url'));
45				});
46				$('nav.page div.nav div.table div.table-cell div.offset div.link ul li a[data-pjax="page"]').each(function(){
47					$(this).attr('href', value + $(this).data('url'));
48				});
49				$('nav.page div.lang div.table div.table-cell div.offset div.link ul li a').removeClass('on');
50				$('nav.page div.lang div.table div.table-cell div.offset div.link ul li:eq('+(i+1)+') a').addClass('on');
51				$('footer.page div.footer aside ul li a[data-pjax="page"]').each(function(){
52					$(this).attr('href', value + $(this).data('url'));
53				});
54			}
55		});
56		$.each(new Array('profile/','news/','schedule/','live/','discography/','movie/','goods/','special/'), function(i, value){
57			if(location.href.indexOf(value) != -1){
58				$('nav.page div.lang div.table div.table-cell div.offset div.link ul li a[data-pjax="page"]').each(function(){
59					if(value == 'live/') $(this).attr('href', $(this).data('url') + 'schedule/');
60					else $(this).attr('href', $(this).data('url') + value);
61				});
62			}
63		});
64
65		// --------------------------------
66		// top
67
68		if($('main').hasClass('top')){
69
70			$('section.slider div.section div.slider').slick({ appendArrows:$('section.slider div.section div.arrows'), dots:true, centerMode:true, variableWidth:true, draggable:false, pauseOnHover:false, autoplay:true, autoplaySpeed:7000, speed:500, cssEase:'ease-in-out', responsive:[{ breakpoint:768, settings:{ centerMode:false, variableWidth:false }}] });
71
72			$('section.movie div.section div.movie div.slider').on('init', function(event, slick) {
73				$('section.movie div.section div.nav ul li a').eq(0).addClass('on');
74				$('section.movie div.section div.nav ul li a').touchclick(function(e) {
75					e.preventDefault();
76					$('section.movie div.section div.movie div.slider').slick('slickGoTo', $('section.movie div.section div.movie div.nav ul li a').index(this), false);
77				});
78			});
79			$('section.movie div.section div.movie div.slider').on('beforeChange', function(event, slick, currentSlide, nextSlide) {
80				$('section.movie div.section div.movie div.nav ul li a').removeClass('on');
81				$('section.movie div.section div.movie div.nav ul li a').eq(nextSlide).addClass('on');
82			});
83			$('section.movie div.section div.movie div.slider').slick({ arrows:false, dots:false, draggable:false, pauseOnHover:false, fade:true });
84
85			if(device == 'pc') $('section.news div.section div.news ul li').find('div.offset').matchHeight();
86
87			twttr.widgets.load();
88			(function changeTwitter(){
89				if ($('section.twitter iframe.twitter-timeline').contents().find('body').length > 0){
90					setTimeout(function(){
91						$('section.twitter div.twitter').html($('section.twitter iframe.twitter-timeline').contents().find('body').html());
92						$('section.twitter div.twitter .timeline-Viewport').css({ 'height':'auto' });
93						$('section.twitter div.twitter a[href^=http]').not('[href*="'+location.hostname+'"]').attr({target:'_blank'});
94						$('section.twitter div.section div.twitter div.timeline-Tweet:gt(1)').css({ 'display':'none' });
95					}, 1000);
96				} else {
97					setTimeout(changeTwitter, 500);
98				}
99			}());
100			$('a.fancyShop').touchclick(function(e){
101				e.preventDefault();
102				$.fancybox({ href:$(this).attr('href'), helpers:{ overlay:{ css:{ 'background':'rgba(0,0,0,0.5)' }}} });
103			});
104			$('a.fancyMovie').touchclick(function(e){
105				e.preventDefault();
106				if(device == 'pc') $.fancybox({ href:$(this).attr('href'), 'width':853, 'height':480, 'autoSize':false, 'type':'iframe' });
107				if(device == 'sp') $.fancybox({ href:$(this).attr('href'), 'width':'100%', 'height':$(window).width() * 0.56, 'autoSize':false, 'type':'iframe' });
108			});
109
110		}
111
112		// --------------------------------
113		// profile
114
115		if($('main').hasClass('profile')){
116
117			$('article.list div.list div.thumbnail ul li').find('span:eq(0)').matchHeight();
118
119		}
120
121		// --------------------------------
122		// news
123
124		if($('main').hasClass('news')){
125
126			if(device == 'sp') $('nav.paging div.slider').slick({ arrows:false, dots:false, variableWidth:true, infinite:false, swipeToSlide:true, pauseOnHover:false, speed:500, cssEase:'ease-in-out' });
127			$('iframe').wrap('<div class="iframe" />')
128			$('article.detail aside.detail').share({ 'link':location.href, 'title':$('article.detail header.detail h1').text(), 'target':'tw,fl' });
129			if(device == 'pc') $('article.list div.list div.title ul li').find('div.offset').matchHeight();
130
131		}
132
133		// --------------------------------
134		// schedule
135
136		if($('main').hasClass('schedule')){
137
138			if(device == 'sp') $('nav.paging div.slider').slick({ arrows:false, dots:false, variableWidth:true, infinite:false, swipeToSlide:true, pauseOnHover:false, speed:500, cssEase:'ease-in-out' });
139			$('iframe').wrap('<div class="iframe" />')
140			$('article.detail aside.detail').share({ 'link':location.href, 'title':$('article.detail header.detail h1').text(), 'target':'tw,fl' });
141			if(device == 'pc') $('article.list div.list div.title ul li').find('div.offset').matchHeight();
142
143		}
144
145		// --------------------------------
146		// discography
147
148		if($('main').hasClass('discography')){
149
150			if(device == 'sp') $('nav.paging div.slider').slick({ arrows:false, dots:false, variableWidth:true, infinite:false, swipeToSlide:true, pauseOnHover:false, speed:500, cssEase:'ease-in-out' });
151			$('article.detail div.detail div.group div.product div.main div.nav a').touchclick(function() {
152				if(!$(this).hasClass('on')) {
153					$(this).addClass('on');
154					$(this).closest('div.main').find('div.for').animate({ height:'show' }, { duration:250, easing:'easeOutCubic', complete:function() {
155						$('html, body').stop().animate({ scrollTop:$(this).parent().find('div.for').offset().top  - 166 }, { duration:250, easing:'easeOutCubic' });
156					}});
157				} else {
158					$(this).removeClass('on');
159					$(this).closest('div.main').find('div.for').animate({ height:'hide' }, { duration:250, easing:'easeOutCubic', complete:function() {
160						$('html, body').stop().animate({ scrollTop:$(this).parent().offset().top  - 166 }, { duration:250, easing:'easeOutCubic' });
161					}});
162				}
163			});
164			var player_type = 'videojs';
165			if(_uac.browser == 'chrome' || _uac.browser == 'firefox'){
166				player_type = 'hls';
167				if(typeof Hls.isSupported() == 'undefined' || !Hls.isSupported()) player_type = 'videojs';
168			} else if(_uac.browser == 'safari' || _uac.browser == 'ie11'){
169				player_type = 'jplayer';
170			}
171			if(_uac.device == 'iphone' || _uac.device == 'android') player_type = 'videojs';
172			if(_uac.device == "android" && _uac.androidVer >= 4) player_type = "hls";
173			if(_uac.device == "android" && _uac.browser == "safari" && _uac.androidVer >= 4 && _uac.androidVer < 5) player_type = "videojs";
174			if(_uac.device == 'android' && _uac.androidVer < 4) player_type = 'flash';
175			$('a.player').each(function(i){
176				if(player_type == 'hls'){
177					var id = 'audio'+i;
178					$(this).append('<audio id="'+id+'"></audio>');
179					var audio = document.getElementById(id);
180					var hls = new Hls();
181					$('#'+id).closest('a').touchclick(function(e){
182						e.preventDefault();
183						var _this = this;
184						if(!$(_this).hasClass('ready')){
185							$(_this).addClass('ready');
186							hls.loadSource('http://avex.as.smartstream.ne.jp/avexnet/_definst_/mp3:'+$(_this).attr('data-id')+'.mp3/playlist.m3u8');
187							hls.attachMedia(audio);
188							audio.play();
189							hls.on(Hls.Events.MANIFEST_PARSED,function(event, data){
190								if(!$(_this).hasClass('on')){
191									$('audio').each(function(){
192										this.pause();
193										this.volume = 0.5;
194										$(this).closest('a').removeClass('on');
195									});
196									audio.play();
197									$(_this).addClass('on');
198								} else {
199									audio.pause();
200									$(_this).removeClass('on');
201								}
202							});
203						} else {
204							if(!$(_this).hasClass('on')){
205								$('audio').each(function(){
206									this.pause();
207									this.volume = 0.5;
208									$(this).closest('a').removeClass('on');
209								});
210								audio.play();
211								$(_this).addClass('on');
212							} else {
213								audio.pause();
214								$(_this).removeClass('on');
215							}
216						}
217					});
218				} else if (player_type == 'jplayer' || player_type == 'flash'){
219					var id = 'audio'+i;
220					$(this).append('<span id="'+id+'"></span>');
221					$('#'+id).closest('a').touchclick(function(e){
222						e.preventDefault();
223						var _this = this;
224						if(!$(_this).hasClass('ready')){
225							$(_this).addClass('ready');
226							$('span', _this).jPlayer({
227								ready:function(){
228									$(this).jPlayer('setMedia', { rtmpa:'rtmp://avex.as.smartstream.ne.jp/avexnet/_definst_/mp3:'+$(_this).closest('a').attr('data-id')+'.mp3', mp3
228:'http://avex.as.smartstream.ne.jp/avexnet/_definst_/mp3:'+$(_this).closest('a').attr('data-id')+'.mp3/playlist.m3u8' });
229									if(!$(_this).hasClass('on')){
230										$('span', _this).jPlayer('pauseOthers');
231										$('span', _this).jPlayer('play');
232										$('a.player').each(function(){ $(this).removeClass('on'); });
233										$(_this).addClass('on');
234									} else {
235										$('span', _this).jPlayer('pause');
236										$(_this).removeClass('on');
237									}
238								},
239								volume:0.5,
240								swfPath:'../assets/js',
241								solution:'flash,html',
242								supplied:'rtmpa,mp3'
243							});
244						} else {
245							if(!$(_this).hasClass('on')){
246								$('span', _this).jPlayer('pauseOthers');
247								$('span', _this).jPlayer('play');
248								$('a.player').each(function(){ $(this).removeClass('on'); });
249								$(_this).addClass('on');
250							} else {
251								$('span', _this).jPlayer('pause');
252								$(_this).removeClass('on');
253							}
254						}
255					});
256				} else {
257					var id = 'audio'+i;
258					$(this).append('<audio id="'+id+'"></audio>');
259					var audio = videojs(id);
260	        $('#'+id).css({ 'display':'none' });
261					$('#'+id).closest('a').touchclick(function(e){
262						e.preventDefault();
263						var _this = this;
264						if(!$(_this).hasClass('ready')){
265							$(_this).addClass('ready');
266							audio.src({ type:'application/x-mpegURL', src:'http://avex.as.smartstream.ne.jp/avexnet/_definst_/mp3:'+$(_this).closest('a').attr('data-id')+'.mp3/playlist.m3u8' });
267							if(!$(_this).hasClass('on')){
268								$('audio').each(function(){
269									this.pause();
270									this.volume = 0.5;
271									$(this).closest('a').removeClass('on');
272								});
273								audio.play();
274								$(_this).addClass('on');
275							} else {
276								audio.pause();
277								$(_this).removeClass('on');
278							}
279						} else {
280							if(!$(_this).hasClass('on')){
281								$('audio').each(function(){
282									this.pause();
283									this.volume = 0.5;
284									$(this).closest('a').removeClass('on');
285								});
286								audio.play();
287								$(_this).addClass('on');
288							} else {
289								audio.pause();
290								$(_this).removeClass('on');
291							}
292						}
293					});
294				}
295			});
296			$('iframe').wrap('<div class="iframe" />')
297			$('article.list div.list div.thumbnail ul li').find('span:eq(0)').matchHeight();
298			$('article.detail aside.detail').each(function(){
299				if(location.href.match(/id=/)) $(this).share({ 'link':location.href, 'title':$('article.detail header.detail h1').text(), 'target':'tw,fl' });
300				else $(this).share({ 'link':location.href.substring(0, location.href.lastIndexOf('/'))+'/detail.php?id='+$(this).data('id'), 'title':$(this).closest('article.detail').find('header.detail h1').text(), 'target':'tw,fl' });
301			});
302
303			$('a.fancyShop').touchclick(function(e){
304				e.preventDefault();
305				if(device == 'pc') $.fancybox({ href:$(this).attr('href'), 'width':640, 'type':'iframe' });
306				if(device == 'sp') $.fancybox({ href:$(this).attr('href'), 'width':335, 'type':'iframe' });
307			});
308			$('a.fancyDownload').touchclick(function(e){
309				e.preventDefault();
310				if(device == 'pc') $.fancybox({ href:$(this).attr('href'), 'width':640, 'type':'iframe' });
311				if(device == 'sp') $.fancybox({ href:$(this).attr('href'), 'width':335, 'type':'iframe' });
312			});
313
314			$('aside.discography div.aside div.download ul li').find('span:eq(0)').matchHeight();
315
316		}
317
318		// --------------------------------
319		// movie
320
321		if($('main').hasClass('movie')){
322
323			if(device == 'sp') $('nav.paging div.slider').slick({ arrows:false, dots:false, variableWidth:true, infinite:false, swipeToSlide:true, pauseOnHover:false, speed:500, cssEase:'ease-in-out' });
324			$('article.list div.list div.movie ul li').find('span:eq(0)').matchHeight();
325			$('a.fancyMovie').touchclick(function(e){
326				e.preventDefault();
327				if(device == 'pc') $.fancybox({ href:$(this).attr('href'), 'width':853, 'height':480, 'autoSize':false, 'type':'iframe' });
328				if(device == 'sp') $.fancybox({ href:$(this).attr('href'), 'width':'100%', 'height':$(window).width() * 0.56, 'autoSize':false, 'type':'iframe' });
329			});
330
331		}
332
333		// --------------------------------
334		// goods
335
336		if($('main').hasClass('goods')){
337
338			$('article.list div.list div.thumbnail ul li').find('span:eq(0)').matchHeight();
339			$('article.detail div.detail div.goods ul li').find('span:eq(0)').matchHeight();
340			$('article.detail aside.detail').share({ 'link':location.href, 'title':$('article.detail header.detail h1').text(), 'target':'tw,fl' });
341			$('a.fancyItem').touchclick(function(e){
342				e.preventDefault();
343				if(device == 'pc') $.fancybox({ href:$(this).attr('href'), 'width':640, 'type':'iframe' });
344				if(device == 'sp') $.fancybox({ href:$(this).attr('href'), 'width':'100%', 'type':'iframe' });
345			});
346
347		}
348
349		// --------------------------------
350		// special
351
352		if($('main').hasClass('special')){
353
354			$('article.list div.list div.special ul li').find('span:eq(0)').matchHeight();
355
356		}
357
358		// --------------------------------
359		// common
360
361		$('header.page div.header h1').addClass('on');
362		$('header.page div.header nav div.offset').addClass('on');
363		$('header.page div.header aside div.offset').addClass('on');
364		if(device == 'pc') $('nav.page div.nav div.table div.table-cell div.offset div.link').addClass('on');
365		if(device == 'pc') $('nav.page div.nav div.table div.table-cell div.offset div.official').addClass('on');
366		if(device == 'pc') $('nav.page div.nav div.table div.table-cell div.offset div.service').addClass('on');
367		$('div.page').addClass('on');
368		$('footer.page').addClass('on');
369		$('#acommoncopy').addClass('on');
370
371	};
372
373	this.hide = function(){
374		$('nav.page div.nav').off('.noScroll');
375		$('nav.page div.nav').removeClass('on');
376		$('header.page div.header aside p.nav').removeClass('on');
377		$('nav.page div.lang').off('.noScroll');
378		$('nav.page div.lang').removeClass('on');
379		$('header.page div.header aside p.lang').removeClass('on');
380		$('header.page div.header h1').removeClass('on');
381		$('header.page div.header nav div.offset').removeClass('on');
382		$('header.page div.header aside div.offset').removeClass('on');
383		if(device == 'pc') $('nav.page div.nav div.table div.table-cell div.offset div.link').removeClass('on');
384		if(device == 'pc') $('nav.page div.nav div.table div.table-cell div.offset div.official').removeClass('on');
385		if(device == 'pc') $('nav.page div.nav div.table div.table-cell div.offset div.service').removeClass('on');
386		$('div.page').removeClass('on');
387		$('footer.page').removeClass('on');
388		$('#acommoncopy').removeClass('on');
389	};
390
391	return this;
392};
393
394var init = function(){
395
396	var _render = new render();
397
398	$(document).on('pjax:popstate', function(){
399		_render.hide();
400	});
401	$(document).on('pjax:end', function(){
402		var imgSrcs = [];
403		$('img').each(function(){ imgSrcs.push($(this).attr('src')); });
404		var loader = new $.ImgLoader({ srcs:imgSrcs, pipesize:99, delay:0, timeout:9999, useXHR2:false });
405		loader.on('progress', function(progress){
406			var prog = Math.floor(progress.loadedRatio * 100);
407		});
408		loader.on('allload', function($img){
409			$('div.page a[data-pjax]').touchclick(function(e){
410		    e.preventDefault();
411				if(!isDrag){
412					_render.hide();
413					setTimeout(function(){
414						$('div.loading').css({ 'display':'block' });
415						$('div.loading').stop().animate({ opacity:1 }, { duration:250, easing:'linear', complete:function(){}});
416						$.pjax({ url:e.currentTarget.href, container:'div.page', fragment:'div.page', timeout:9999 });
417					}, 250);
418				}
419			});
420
421			$('div.loading').stop().animate({ opacity:0 }, { duration:250, easing:'linear', complete:function(){
422				$('div.loading').css({ 'display':'none' });
423				_render.show();
424			}});
425
426		});
427		loader.load();
428	});
429
430	$('a[data-pjax]').touchclick(function(e){
431    e.preventDefault();
432		if(!isDrag){
433			_render.hide();
434			setTimeout(function(){
435				$('div.loading').css({ 'display':'block' });
436				$('div.loading').stop().animate({ opacity:1 }, { duration:250, easing:'linear', complete:function(){}});
437				$.pjax({ url:e.currentTarget.href, container:'div.page', fragment:'div.page', timeout:9999 });
438			}, 250);
439		}
440	});
441
442	$('header.page div.header aside p.nav a').on(touchclick, function(e){
443		e.preventDefault();
444		if(!$(this).closest('p.nav').hasClass('on')){
445			$('nav.page div.nav div.lock').on('touchmove.noScroll', function(e){ e.preventDefault(); });
446			$('header.page div.header nav').addClass('open');
447			$('nav.page div.nav').addClass('on');
448			$('header.page div.header aside p.nav').addClass('on');
449		} else {
450			$('nav.page div.nav div.lock').off('.noScroll');
451			$('nav.page div.nav').removeClass('on');
452			setTimeout(function(){
453				$('header.page div.header nav').removeClass('open');
454			}, 500);
455			$('header.page div.header aside p.nav').removeClass('on');
456		}
457	});
458
459	$('header.page div.header aside p.lang a').on(touchclick, function(e){
460		e.preventDefault();
461		if(!$(this).closest('p.lang').hasClass('on')){
462			$('nav.page div.lang').on('touchmove.noScroll', function(e){ e.preventDefault(); });
463			$('header.page div.header nav').addClass('open');
464			$('nav.page div.lang').addClass('on');
465			$('header.page div.header aside p.lang').addClass('on');
466		} else {
467			$('nav.page div.lang').off('.noScroll');
468			$('nav.page div.lang').removeClass('on');
469			setTimeout(function(){
470				$('header.page div.header nav').removeClass('open');
471			}, 500);
472			$('header.page div.header aside p.lang').removeClass('on');
473		}
474	});
475
476	if(device == 'pc'){
477		$(window).on('scroll', function(){
478			if($(window).scrollTop() > 0){
479				$('header.page div.header h1').removeClass('on');
480				$('header.page div.header aside div.offset').removeClass('on');
481				$('nav.page div.nav div.table div.table-cell div.offset div.link').removeClass('on');
482				$('nav.page div.nav div.table div.table-cell div.offset div.official').removeClass('on');
483			} else {
484				$('header.page div.header h1').addClass('on');
485				$('header.page div.header aside div.offset').addClass('on');
486				$('nav.page div.nav div.table div.table-cell div.offset div.link').addClass('on');
487				$('nav.page div.nav div.table div.table-cell div.offset div.official').addClass('on');
488			}
489		}).trigger('scroll');
490		window.addEventListener("mousemove", function(event){
491			if($(window).scrollTop() > 180){
492				event = event || window.event;
493				if(event.clientY < 180){
494					$('header.page div.header h1').addClass('on');
495					$('header.page div.header aside div.offset').addClass('on');
496					$('nav.page div.nav div.table div.table-cell div.offset div.link').addClass('on');
497					$('nav.page div.nav div.table div.table-cell div.offset div.official').addClass('on');
498				} else {
499					$('header.page div.header h1').removeClass('on');
500					$('header.page div.header aside div.offset').removeClass('on');
501					$('nav.page div.nav div.table div.table-cell div.offset div.link').removeClass('on');
502					$('nav.page div.nav div.table div.table-cell div.offset div.official').removeClass('on');
503				}
504			}
505	  });
506	}
507
508	if(device == 'sp'){
509		$(window).on('scroll', function(){
510			if($('header.page div.header aside div.offset p.nav a').length) $('header.page div.header aside div.offset p.nav a').css({ 'left':($('header.page div.header aside div.offset p.nav a').position().left == 0 ) ? -0.1:0 });
511			if($('header.page div.header aside div.offset p.lang a').length) $('header.page div.header aside div.offset p.lang a').css({ 'left':($('header.page div.header aside div.offset p.lang a').position().left == 0 ) ? -0.1:0 });
512		}).trigger('scroll');
513		var start_pos = 0;
514		$(window).on('scroll', function(){
515			if($(window).scrollTop() > 75){
516				$('header.page div.header aside').addClass('on');
517				$('header.page div.header nav').addClass('on');
518				if(start_pos < $(window).scrollTop()){
519					$('header.page div.header aside div.offset div.scroll').removeClass('on');
520					$('header.page div.header nav div.offset div.scroll').removeClass('on');
521				}else{
522					$('header.page div.header aside div.offset div.scroll').addClass('on');
523					$('header.page div.header nav div.offset div.scroll').addClass('on');
524				}
525			} else {
526				$('header.page div.header aside').removeClass('on');
527				$('header.page div.header nav').removeClass('on');
528				$('header.page div.header aside div.offset div.scroll').addClass('on');
529				$('header.page div.header nav div.offset div.scroll').addClass('on');
530			}
531			start_pos = $(window).scrollTop();
532		}).trigger('scroll');
533	}
534
535	$('div.loading').stop().animate({ opacity:0 }, { duration:250, easing:'linear', complete:function(){
536		$('div.loading').css({ 'display':'none' });
537		$('div.loading').addClass('on');
538		_render.show();
539	}});
540
541};
542
543$(function(){
544	$(document).ajaxSuccess(function(event, xhr, settings){
545		if(typeof event.target.className !== 'undefined'){
546			if(event.target.className.match(/page/)){
547				ga('send','pageview', settings.url);
548			}
549		}
550	});
551	var imgSrcs = [];
552	$('img').each(function(){ imgSrcs.push($(this).attr('src')); });
553	imgSrcs.push('/assets/images/common/loading.png');
554
555	var loader = new $.ImgLoader({ srcs:imgSrcs, pipesize:99, delay:0, timeout:9999, useXHR2:false });
556	loader.on('progress', function(progress){
557		var prog = Math.floor(progress.loadedRatio * 100);
558	});
559	loader.on('allload', function($img){
560		setTimeout(function(){ init(); }, 125);
561	});
562	loader.load();
563});
564
565$.fn.touchclick = function(options){
566	return this.each(function(){
567		$(this).on('touchstart touchmove touchend click', function(e){
568			if(device == 'sp' && e.type == 'touchstart'){ this.isTouch = true; }
569			if(device == 'sp' && e.type == 'touchmove'){ this.isTouch = false; }
570			if(device == 'sp' && e.type == 'touchend' && this.isTouch){ this.isTouch = false; return options.call(this, e); }
571			if(device == 'pc' && e.type == 'click'){ return options.call(this, e); }
572		})
573	});
574};
575
576$.fn.share = function(options){
577	var hash = 'superjunior';
578
579	var array = options.target.split(',');
580	var path = ($('main').hasClass('top')) ? './' : '../';
581	var html = '';
582	html += '<ul>';
583	$.each(array, function(i, value){
584		if(value == 'tw') html += '<li><a href="http://twitter.com/share" class="twitter-share-button" data-text="'+options.title+'" data-url="'+options.link+'" data-counturl="'+options.link+'" data-hashtags="'+hash+'" data-count="none" data-lang="ja">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js" charset="utf-8"></script></li>';
585		if(value == 'fl') html += '<li><script>(function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script><div class="fb-like" data-href="'+options.link+'" data-layout="button_count"></div></li>';
586	});
587	html += '</ul>';
588	$(this).html(html);
589	if($('.fb-like')[0]) setTimeout(function() { if($('.fb-like').children().length === 0) FB.XFBML.parse(); }, 1000);
590};
591

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.