PageSourceSearch

https://www.dennys.jp/js/top.js

js dennys.jp collected 2026-09-24 09:19:28 UTC 4,997 bytes, 173 lines download raw bytes

1$(function(){
2	/* ------------------- containerPT ------------------- */
3	function containerPT(){
4		if($(window).width()<=768){
5			var headerH = $("#main_header").outerHeight();
6			$("#container").css("padding-top",headerH);
7		}	
8	}
9	containerPT();
10	$(window).resize(function(){
11		containerPT();
12	});
13
14
15	/* ------------------- a_block ------------------- */
16	$(".a_block").click(function(){
17		 window.location=$(this).find('a').attr('href');
18		 return false;
19	});
20	
21
22	/* ----- img_on --------------------------------- */
23	$("body.page_responsive .img_on").mouseover(function(){
24		if($(window).width() > 768){
25			var src = ".jpg";
26			var newSrc = "_on.jpg";
27			$(this).attr("src",$(this).attr("src").replace(src,newSrc));
28		}
29	}).mouseout(function(){
30		if($(window).width() > 768){
31			var src = "_on.jpg";
32			var newSrc = ".jpg";
33			$(this).attr("src",$(this).attr("src").replace(src,newSrc));
34		}
35	});
36
37
38
39	/* ----- more btn --------------------------------- */
40	if($(window).width()>480){
41		var dtHeight = $("#news_list dl dt:eq(0)").outerHeight() + $("#news_list dl dt:eq(1)").outerHeight() + $("#news_list dl dt:eq(2)").outerHeight();
42		var ddHeight = $("#news_list dl dd:eq(0)").outerHeight() + $("#news_list dl dd:eq(1)").outerHeight() + $("#news_list dl dd:eq(2)").outerHeight();
43		if(dtHeight >= dtHeight){
44			var closeHeight = dtHeight;
45		}else{
46			var closeHeight = ddHeight;
47		}
48	}else{
49		var closeHeight = $("#news_list dl dt:eq(0)").outerHeight() + $("#news_list dl dt:eq(1)").outerHeight() + $("#news_list dl dt:eq(2)").outerHeight() + $("#news_list dl dd:eq(0)").outerHeight();
50	}
51	var openHeight = $("#news_list dl").outerHeight();
52	if($(this).hasClass("bg2")){
53		$("#news_list").height(openHeight);
54	}else{
55		$("#news_list").height(closeHeight);
56	}
57
58
59	/* ----- img_change --------------------------------- */
60	function ImgChange(Img) {
61		if($(Img).size() > 0){
62			var WinWidth, src, pc, sp, srcPc, srcSp;
63			
64			WinWidth = $(window).width();		
65			src = $(Img).attr('src');
66			pc = 'images/';
67			sp = 'images/sp/';
68			srcPc = $(Img).attr('src').replace(sp,pc);
69			srcSp = $(Img).attr('src').replace(pc,sp);
70					
71			if(WinWidth > 768){
72				if(src.indexOf(sp)!=-1){
73					$(Img).attr('src',srcPc);
74				}else{
75					
76				}
77			}else{
78				if(src.indexOf(sp)!=-1){
79					
80				}else if($("body").hasClass("cange_on")){
81						$(Img).attr('src',srcPc);
82					}else{
83						$(Img).attr('src',srcSp);
84				}
85			}
86		}
87	}
88	
89	
90	/* ----- img_change2 --------------------------------- */
91	function ImgChange2(Img) {
92		if($(Img).size() > 0){
93			var WinWidth, src, pc, sp, srcPc, srcSp;
94			
95			WinWidth = $(window).width();		
96			src = $(Img).attr('src');
97			pc = 'images/';
98			sp = 'images/sp/';
99			srcPc = $(Img).attr('src').replace(sp,pc);
100			srcSp = $(Img).attr('src').replace(pc,sp);
101					
102			if(WinWidth > 480){
103				if(src.indexOf(sp)!=-1){
104					$(Img).attr('src',srcPc);
105				}else{
106					
107				}
108			}else{
109				if(src.indexOf(sp)!=-1){
110					
111				}else if($("body").hasClass("cange_on")){
112						$(Img).attr('src',srcPc);
113					}else{
114						$(Img).attr('src',srcSp);
115				}
116			}
117		}
118	}
119
120
121
122
123	/* ----- img_change --------------------------------- */
124	$("body.page_responsive .img_change").each(function(){
125		ImgChange(this);
126	});
127	/* ----- img_change2 --------------------------------- */
128	$("body.page_responsive .img_change2").each(function(){
129		ImgChange2(this);
130	});
131	$(window).resize(function(){
132			$("body.page_responsive .img_change").each(function(){
133				ImgChange(this);
134			});
135			$("body.page_responsive .img_change2").each(function(){
136				ImgChange2(this);
137			});
138			/* ----- more btn --------------------------------- */
139			if($(window).width()>480){
140				var dtHeight = $("#news_list dl dt:eq(0)").outerHeight() + $("#news_list dl dt:eq(1)").outerHeight() + $("#news_list dl dt:eq(2)").outerHeight();
141				var ddHeight = $("#news_list dl dd:eq(0)").outerHeight() + $("#news_list dl dd:eq(1)").outerHeight() + $("#news_list dl dd:eq(2)").outerHeight();
142				if(dtHeight >= dtHeight){
143					var closeHeight = dtHeight;
144				}else{
145					var closeHeight = ddHeight;
146				}
147			}else{
148				var closeHeight = $("#news_list dl dt:eq(0)").outerHeight() + $("#news_list dl dt:eq(1)").outerHeight() + $("#news_list dl dt:eq(2)").outerHeight() + $("#news_list dl dd:eq(0)").outerHeight();
149			}
150			var openHeight = $("#news_list dl").outerHeight();
151			
152			
153			
154			if($(this).hasClass("bg2")){
155				$("#news_list").height(openHeight);
156			}else{
157				$("#news_list").height(closeHeight);
158			}
159	});
160	
161	$("#news_more").click(function(){
162		if($(this).hasClass("bg2")){
163			$("#news_list").animate({height:closeHeight},"fast","swing");
164			$(this).removeClass("bg2").find("span").text("もっと見る");
165		}else{
166			$("#news_list").animate({height:openHeight},"fast","swing");
167			$(this).addClass("bg2").find("span").text("閉じる");
168		}
169	});
170	
171	
172
173});

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.