PageSourceSearch

https://www.bookoff.co.jp/shop/js/map.js

js bookoff.co.jp collected 2026-09-24 08:59:14 UTC 23,309 bytes, 520 lines download raw bytes

1/* -------------------------------------------------------- */
2// PROPERTY
3/* -------------------------------------------------------- */
4var EASE_TYPE_IN = 'easeInCubic';
5var EASE_TYPE_OUT = 'easeOutCubic';
6var EASE_TYPE_INOUT = 'easeInOutCubic';
7
8var japanMapProperty = [
9	{'title':'01_北海道','coords':'513,28,513,164,678,164,678,28'},
10	{'title':'02_青森県','coords':'513,184,513,214,642,214,642,184'},
11	{'title':'05_秋田県','coords':'513,218,576,218,576,260,513,260'},
12	{'title':'03_岩手県','coords':'580,260,580,218,642,218,642,258,624,258,624,260'},
13	{'title':'04_宮城県','coords':'580,264,624,264,624,312,580,312'},
14	{'title':'06_山形県','coords':'513,264,513,279,536,279,536,312,576,312,576,264'},
15	{'title':'07_福島県','coords':'536,316,624,316,624,342,536,342'},
16	{'title':'08_茨城県','coords':'600,349,625,349,625,368,643,368,643,418,600,418'},
17	{'title':'09_栃木県','coords':'555,349,597,349,597,386,555,386'},
18	{'title':'10_群馬県','coords':'510,349,551,349,551,385,510,385'},
19	{'title':'11_埼玉県','coords':'536,389,597,389,597,418,536,418'},
20	{'title':'19_山梨県','coords':'494,392,529,392,529,441,494,441'},
21	{'title':'東京','coords':'536,421,597,421,597,442,536,442'},
22	{'title':'12_千葉県','coords':'600,421,643,421,643,486,600,486'},
23	{'title':'神奈川','coords':'536,445,576,445,576,475,536,475'},
24	{'title':'15_新潟県','coords':'488,303,456,303,456,327,506,327,506,342,529,342,529,286,488,286'},
25	{'title':'16_富山県','coords':'418,303,453,303,453,326,418,326'},
26	{'title':'17_石川県','coords':'387,277,414,277,414,326,387,326'},
27	{'title':'20_長野県','coords':'503,330,457,330,457,441,490,441,490,388,503,388'},
28	{'title':'22_静岡県','coords':'457,445,457,487,490,487,490,471,523,471,523,487,529,487,529,445'},
29	{'title':'23_愛知県','coords':'427,471,418,471,418,434,453,434,453,487,427,487'},
30	{'title':'21_岐阜県','coords':'418,330,453,330,453,430,418,430'},
31	{'title':'24_三重県','coords':'398,487,398,471,411,471,411,408,383,408,383,487'},
32	{'title':'18_福井県','coords':'355,330,355,350,414,350,414,330'},
33	{'title':'25_滋賀県','coords':'383,357,411,357,411,404,383,404'},
34	{'title':'26_京都府','coords':'379,357,348,357,348,312,326,312,326,379,355,379,355,404,379,404'},
35	{'title':'27_大阪府','coords':'326,383,351,383,351,431,326,431'},
36	{'title':'29_奈良県','coords':'355,408,379,408,379,457,355,457'},
37	{'title':'30_和歌山県','coords':'351,461,351,435,326,435,326,487,379,487,379,461'},
38	{'title':'28_兵庫県','coords':'294,312,323,312,323,390,294,390'},
39	{'title':'31_鳥取県','coords':'256,312,288,312,288,351,256,351'},
40	{'title':'33_岡山県','coords':'256,354,288,354,288,390,256,390'},
41	{'title':'32_島根県','coords':'221,312,253,312,253,351,221,351'},
42	{'title':'34_広島県','coords':'221,354,253,354,253,390,221,390'},
43	{'title':'35_山口県','coords':'188,312,218,312,218,390,188,390'},
44	{'title':'37_香川県','coords':'264,409,306,409,306,446,264,446'},
45	{'title':'36_徳島県','coords':'264,449,306,449,306,488,264,488'},
46	{'title':'38_愛媛県','coords':'188,409,261,409,261,446,188,446'},
47	{'title':'39_高知県','coords':'188,449,261,449,261,488,188,488'},
48	{'title':'40_福岡県','coords':'127,330,168,330,168,383,127,383'},
49	{'title':'41_佐賀県','coords':'87,330,124,330,124,383,87,383'},
50	{'title':'42_長崎県','coords':'35,330,84,330,84,383,35,383'},
51	{'title':'44_大分県','coords':'87,386,168,386,168,425,87,425'},
52	{'title':'43_熊本県','coords':'35,386,84,386,84,473,35,473'},
53	{'title':'45_宮崎県','coords':'87,428,168,428,168,473,87,473'},
54	{'title':'46_鹿児島県','coords':'35,476,168,476,168,513,35,513'},
55	{'title':'47_沖縄県','coords':'36,218,127,218,127,249,36,249'}
56];
57
58var tokyoMapProperty = [
59	{'title':'13122_葛飾区','coords':'633,78,681,78,681,165,633,165'},
60	{'title':'13123_江戸川区','coords':'633,168,681,168,681,337,633,337'},
61	{'title':'13121_足立区','coords':'561,78,630,78,630,118,561,118'},
62	{'title':'13118_荒川区','coords':'561,121,630,121,630,152,561,152'},
63	{'title':'13117_北区','coords':'528,78,558,78,558,118,528,118'},
64	{'title':'13119_板橋区','coords':'496,78,525,78,525,118,496,118'},
65	{'title':'13116_豊島区','coords':'496,121,558,121,558,152,496,152'},
66	{'title':'13120_練馬区','coords':'475,78,493,78,493,152,437,152,437,116,475,116'},
67	{'title':'13107_墨田区','coords':'597,155,630,155,630,225,597,225'},
68	{'title':'13106_台東区','coords':'569,155,594,155,594,225,569,225'},
69	{'title':'13105_文京区','coords':'539,155,566,155,566,225,539,225'},
70	{'title':'13104_新宿区','coords':'510,155,536,155,536,243,510,243'},
71	{'title':'13114_中野区','coords':'478,155,507,155,507,243,478,243'},
72	{'title':'13115_杉並区','coords':'437,155,475,155,475,243,437,243'},
73	{'title':'13108_江東区','coords':'597,228,630,228,630,309,597,309'},
74	{'title':'13101_千代田区','coords':'539,228,594,228,594,260,539,260'},
75	{'title':'13102_中央区','coords':'569,263,594,263,594,328,569,328'},
76	{'title':'13103_港区','coords':'539,263,566,263,566,328,539,328'},
77	{'title':'13109_品川区','coords':'539,331,594,331,594,364,539,364'},
78	{'title':'13111_大田区','coords':'486,367,594,367,594,401,486,401'},
79	{'title':'13110_目黒区','coords':'486,292,536,292,536,364,486,364'},
80	{'title':'13113_渋谷区','coords':'497,246,536,246,536,289,497,289'},
81	{'title':'13112_世田谷区','coords':'437,246,494,246,494,289,483,289,483,337,437,337'},
82	{'title':'13221_清瀬市','coords':'338,65,390,65,390,113,338,113'},
83	{'title':'13222_東久留米市','coords':'338,116,417,116,417,135,375,135,375,168,338,168'},
84	{'title':'13229_西東京市','coords':'420,116,434,116,434,168,378,168,378,138,420,138'},
85	{'title':'13203_武蔵野市','coords':'364,171,434,171,434,211,364,211'},
86	{'title':'13204_三鷹市','coords':'364,214,434,214,434,269,364,269'},
87	{'title':'13208_調布市','coords':'364,272,434,272,434,296,403,296,403,337,364,337'},
88	{'title':'13219_狛江市','coords':'406,299,434,299,434,337,406,337'},
89	{'title':'13213_東村山市','coords':'309,138,335,138,335,168,309,168'},
90	{'title':'13220_東大和市','coords':'278,138,306,138,306,168,278,168'},
91	{'title':'13223_武蔵村山市','coords':'239,138,275,138,275,168,239,168'},
92	{'title':'13211_小平市','coords':'273,171,361,171,361,211,273,211'},
93	{'title':'13210_小金井市','coords':'332,214,361,214,361,269,332,269'},
94	{'title':'13214_国分寺市','coords':'273,214,329,214,329,240,273,240'},
95	{'title':'13215_国立市','coords':'273,243,329,243,329,269,273,269'},
96	{'title':'13206_府中市','coords':'273,272,361,272,361,309,273,309'},
97	{'title':'13225_稲城市','coords':'307,312,361,312,361,337,347,337,347,354,307,354'},
98	{'title':'13224_多摩市','coords':'253,312,304,312,304,354,253,354'},
99	{'title':'13209_町田市','coords':'207,357,347,357,347,422,286,422,286,381,207,381'},
100	{'title':'13202_立川市','coords':'242,171,270,171,270,269,242,269'},
101	{'title':'13303_奥多摩郡穂積町','coords':'208,138,236,138,236,168,208,168'},
102	{'title':'13227_羽村市','coords':'208,171,239,171,239,201,208,201'},
103	{'title':'13218_福生市','coords':'208,204,239,204,239,235,208,235'},
104	{'title':'13207_昭島市','coords':'208,238,239,238,239,269,208,269'},
105	{'title':'13212_日野市','coords':'208,272,270,272,270,309,208,309'},
106	{'title':'13205_青梅市','coords':'106,87,205,87,205,168,106,168'},
107	{'title':'13305_奥多摩郡日の出町','coords':'106,171,172,171,172,195,
107106,195'},
108	{'title':'13228_あきる野市','coords':'175,171,205,171,205,247,106,247,106,198,175,198'},
109	{'title':'13201_八王子市','coords':'106,250,205,250,205,312,250,312,250,354,204,354,204,381,151,381,151,279,106,279'},
110	{'title':'奥多摩郡3','coords':'28,29,103,29,103,279,28,279'}
111];
112
113var kanagawaMapProperty = [
114	{'title':'川崎市', 'coords':'399,65,558,65,558,109,588,109,588,147,628,147,628,196,574,196,574,144,561,144,561,119,442,119,442,86,399,86'},
115	{'title':'横浜市','coords':'442,122,558,122,558,147,571,147,571,196,561,196,561,250,540,250,540,350,493,350,493,307,442,307'},
116	{'title':'14208_逗子市','coords':'485,353,526,353,526,375,485,375'},
117	{'title':'14301_三浦郡葉山町','coords':'485,378,526,378,526,414,485,414'},
118	{'title':'14201_横須賀市','coords':'529,353,540,353,540,394,599,394,599,451,514,451,514,425,485,425,485,417,529,417'},
119	{'title':'14210_三浦市','coords':'514,454,557,454,557,508,514,508'},
120	{'title':'14204_鎌倉市','coords':'442,310,490,310,490,350,442,350'},
121	{'title':'14205_藤沢市','coords':'411,249,439,249,439,350,398,350,398,285,380,285,380,263,411,263'},
122	{'title':'14213_大和市','coords':'411,167,439,172,439,246,411,246'},
123	{'title':'14218_綾瀬市','coords':'380,217,408,217,408,260,380,260'},
124	{'title':'相模原市','coords':'380,127,347,159,347,163,416,163'},
125	{'title':'14216_座間市','coords':'347,167,408,167,408,191,347,191'},
126	{'title':'14215_海老名市','coords':'347,194,408,194,408,214,377,214,377,276,347,276'},
127	{'title':'14207_茅ヶ崎市','coords':'380,288,395,288,395,350,347,350,347,320,380,320'},
128	{'title':'14321_高座郡寒川町','coords':'347,279,377,279,377,317,347,317'},
129	{'title':'相模原市','coords':'325,84,325,144,357,144,377,124,338,85'},
130	{'title':'相模原市','coords':'153,200,153,184,168,184,168,31,241,31,241,84,322,84,322,144,265,144,209,200'},
131	{'title':'愛甲郡','coords':'294,208,354,148,265,148,211,202,211,208'},
132	{'title':'14212_厚木市','coords':'252,211,296,211,344,163,344,275,334,275,334,236,252,236'},
133	{'title':'14214_伊勢原市','coords':'252,239,331,239,331,286,252,286'},
134	{'title':'14203_平塚市','coords':'334,279,344,279,344,350,331,350,331,328,274,328,274,289,334,289'},
135	{'title':'中郡','coords':'235,331,328,331,328,350,268,350,261,357'},
136	{'title':'14206_小田原市','coords':'194,388,194,331,231,331,258,358,202,414,202,460,154,460,154,388'},
137	{'title':'14211_秦野市','coords':'190,211,249,211,249,289,271,289,271,304,190,304'},
138	{'title':'足柄上郡','coords':'59,184,150,184,150,203,207,203,207,208,187,208,187,307,271,307,271,328,194,328,194,316,108,316,108,262,59,262'},
139	{'title':'14217_南足柄市','coords':'108,319,191,319,191,385,108,385'},
140	{'title':'足柄下郡','coords':'108,388,151,388,151,463,202,463,202,507,108,507'}
141];
142
143var globalMapProperty = {'title':'Global Site','coords':'46,21,310,21,310,173,46,173'};
144
145var japanMapArea = [];
146var japanMapId = 'japan-map';
147var japanMapImgId = '#map-japan-img';
148
149var tokyoMapArea = [];
150var tokyoMapId = 'tokyo-map';
151var tokyoMapImgId = '#map-tokyo-img';
152
153var kanagawaMapArea = [];
154var kanagawaMapId = 'kanagawa-map';
155var kanagawaMapImgId = '#map-kanagawa-img';
156
157var mapMode = 'japan';
158var mapImgs = [];
159
160var backbtn;
161var backbtnId = '#map-backbtn';
162
163var searchURL = '/shop/search-result.html';
164
165/* -------------------------------------------------------- */
166// FUNCTION
167/* -------------------------------------------------------- */
168function initMap(){
169	
170	var _japanMapHtml = '';
171	var _tokyoMapHtml = '';
172	var _kanagawaMapHtml = '';
173	
174	var _japanMap = document.getElementById(japanMapId);
175	var _tokyoMap = document.getElementById(tokyoMapId);
176	var _kanagawaMap = document.getElementById(kanagawaMapId);
177	
178	var i;
179	var _len = japanMapProperty.length;
180	_japanMapHtml += '<map name="japan-map" id="japan-map">';
181	for( i=0; i<_len; i++ ){
182		japanMapArea[i] = new MapArea( japanMapProperty[i] );
183		japanMapArea[i].init();
184		_japanMapHtml += '<area shape="'+ japanMapArea[i].type +'" coords="'+ japanMapArea[i].coords +'" href="'+ 'javascript:jumpLink('+'\''+japanMapArea[i].title+'\''+')' +'" title="'+ japanMapArea[i].title +'" alt="'+ japanMapArea[i].title +'">';
185	}
186	
187	_japanMapHtml += '<area shape="'+ 'poly' +'" coords="'+ globalMapProperty.coords +'" href="'+ 'javascript:jumpLink('+'\''+globalMapProperty.title+'\''+')' +'" title="'+ globalMapProperty.title +'" alt="'+ globalMapProperty.title +'">';
188	
189	_japanMapHtml += '</map>';
190	$('body').after(_japanMapHtml);
191	
192	_len = tokyoMapProperty.length;
193	_tokyoMapHtml += '<map name="tokyo-map" id="tokyo-map">';
194	for( i=0; i<_len; i++ ){
195		tokyoMapArea[i] = new MapArea( tokyoMapProperty[i] );
196		tokyoMapArea[i].init();
197		_tokyoMapHtml += '<area shape="'+ tokyoMapArea[i].type +'" coords="'+ tokyoMapArea[i].coords +'" href="'+ 'javascript:jumpLink13('+'\''+tokyoMapArea[i].title+'\''+')' +'" title="'+ tokyoMapArea[i].title +'" alt="'+ tokyoMapArea[i].title +'">';
198	}
199	_tokyoMapHtml += '</map>';
200	$('body').after(_tokyoMapHtml);
201	
202	_len = kanagawaMapProperty.length;
203	_kanagawaMapHtml += '<map name="kanagawa-map" id="kanagawa-map">';
204	for( i=0; i<_len; i++ ){
205		kanagawaMapArea[i] = new MapArea( kanagawaMapProperty[i] );
206		kanagawaMapArea[i].init();
207	_kanagawaMapHtml += '<area shape="'+ kanagawaMapArea[i].type +'" coords="'+ kanagawaMapArea[i].coords +'" href="'+ 'javascript:jumpLink14('+'\''+kanagawaMapArea[i].title+'\''+')' +'" title="'+ kanagawaMapArea[i].title +'" alt="'+ kanagawaMapArea[i].title +'">';
208	}
209	_kanagawaMapHtml += '</map>';
210	$('body').after(_kanagawaMapHtml);
211	
212	for( i=0; i<3; i++ ){
213		var _arr = [japanMapImgId, tokyoMapImgId, kanagawaMapImgId];
214		mapImgs[i] = new MapImage( $(_arr[i]), i );	
215		mapImgs[i].init();
216	}
217	
218	backbtn = new BackBtn(backbtnId);
219	backbtn.init();
220	
221}
222
223function jumpLink(_title){
224	switch( _title ){
225		case '東京':
226			mapMode = 'tokyo';
227			closeJapanMap();
228			break;
229		case '神奈川':
230			mapMode = 'kanagawa';
231			closeJapanMap();
232			break;
233		case 'Global Site':
234			location.href="/en/about/worldwide.html";	
235			break;
236		default:
237			// 東京、神奈川以外
238			location.href=searchURL + "#q=/opt_prefecture=" + encodeURIComponent(_title) + "/";
239			break;
240	}
241}
242
243function jumpLink14(_title){
244	switch(_title){
245		case '横浜市':
246			location.href=searchURL + "#q=/opt_prefecture=14_" + encodeURIComponent("神奈川県") + "/opt_city[]=14101_" + encodeURIComponent("横浜市鶴見区") + "/opt_city[]=14102_" + encodeURIComponent("横浜市神奈川区") + "/opt_city[]=14103_" + encodeURIComponent("横浜市西区") + "/opt_city[]=14104_" + encodeURIComponent("横浜市中区") + "/opt_city[]=14105_" + encodeURIComponent("横浜市南区") + "/opt_city[]=14107_" + encodeURIComponent("横浜市磯子区") + "/opt_city[]=14108_" + encodeURIComponent("横浜市金沢区") + "/opt_city[]=14109_" + encodeURIComponent("横浜市港北区") + "/opt_city[]=14110_" + encodeURIComponent("横浜市戸塚区") + "/opt_city[]=14111_" + encodeURIComponent("横浜市港南区") + "/opt_city[]=14112_" + encodeURIComponent("横浜市旭区") + "/opt_city[]=14113_" + encodeURIComponent("横浜市緑区") + "/opt_city[]=14114_" + encodeURIComponent("横浜市瀬
246谷区") + "/opt_city[]=14115_" + encodeURIComponent("横浜市栄区") + "/opt_city[]=14116_" + encodeURIComponent("横浜市泉区") + "/opt_city[]=14117_" + encodeURIComponent("横浜市青葉区") + "/opt_city[]=14118_" + encodeURIComponent("横浜市都筑区") + "/opt_city[]=14106_" + encodeURIComponent("横浜市保土ヶ谷区");
247			break;
248		case '愛甲郡':
249			location.href=searchURL + "#q=/opt_prefecture=14_" + encodeURIComponent("神奈川県") + "/opt_city[]=14402_" + encodeURIComponent("愛甲郡清川村") + "/opt_city[]=14401_" + encodeURIComponent("愛甲郡愛川町")
250			break;
251		case '川崎市':
252			location.href=searchURL + "#q=/opt_prefecture=14_" + encodeURIComponent("神奈川県") + "/opt_city[]=14131_" + encodeURIComponent("川崎市川崎区") + "/opt_city[]=14133_" + encodeURIComponent("川崎市中原区") + "/opt_city[]=14134_" + encodeURIComponent("川崎市高津区") + "/opt_city[]=14135_" + encodeURIComponent("川崎市多摩区") + "/opt_city[]=14136_" + encodeURIComponent("川崎市宮前区") + "/opt_city[]=14132_" + encodeURIComponent("川崎市幸区") + "/opt_city[]=14137_" + encodeURIComponent("川崎市麻生区") ;
253			break;
254		case '相模原市':
255			location.href=searchURL + "#q=/opt_prefecture=14_" + encodeURIComponent("神奈川県") + "/opt_city[]=14152_" + encodeURIComponent("相模原市中央区") + "/opt_city[]=14151_" + encodeURIComponent("相模原市緑区") + "/opt_city[]=14153_" + encodeURIComponent("相模原市南区");
256			break;
257		case '中郡':
258			location.href=searchURL + "#q=/opt_prefecture=14_" + encodeURIComponent("神奈川県") + "/opt_city[]=14341_" + encodeURIComponent("中郡大磯町") + "/opt_city[]=14342_" + encodeURIComponent("中郡二宮町");
259			break;
260		case '足柄上郡':
261			location.href=searchURL + "#q=/opt_prefecture=14_" + encodeURIComponent("神奈川県") + "/opt_city[]=14361_" + encodeURIComponent("足柄上郡中井町") + "/opt_city[]=14362_" + encodeURIComponent("足柄上郡大井町") + "/opt_city[]=14363_" + encodeURIComponent("足柄上郡松田町") + "/opt_city[]=14364_" + encodeURIComponent("足柄上郡山北町") + "/opt_city[]=14366_" + encodeURIComponent("足柄上郡開成町");
262			break;
263		case '足柄下郡':
264			location.href=searchURL + "#q=/opt_prefecture=14_" + encodeURIComponent("神奈川県") + "/opt_city[]=14382_" + encodeURIComponent("足柄下郡箱根町") + "/opt_city[]=14383_" + encodeURIComponent("足柄下郡真鶴町") + "/opt_city[]=14384_" + encodeURIComponent("足柄下郡湯河原町");
265			break;
266		default:
267			location.href=searchURL + "#q=/opt_prefecture=14_" + encodeURIComponent("神奈川県") + "/opt_city[]=" + encodeURIComponent(_title) + "/opt_and_or=and";
268			break;
269	}
270}
271
272function jumpLink13(_title){
273	switch(_title) {
274	case '奥多摩郡3':
275		location.href=searchURL + "#q=/opt_prefecture=13_" + encodeURIComponent("東京都") + "/opt_city[]=13307_" + encodeURIComponent("西多摩郡檜原町") + "/opt_city[]=13308_" + encodeURIComponent("西多摩郡奥多摩町");
276		break;
277	default:
278		location.href=searchURL + "#q=/opt_prefecture=13_" + encodeURIComponent("東京都") + "/opt_city[]=" + encodeURIComponent(_title) + "/opt_and_or=and";
279		break;
280	}
281}
282
283function closeJapanMap(){
284	
285	for( var i=0; i<japanMapArea.length; i++ ){
286		japanMapArea[i].pause();
287	}
288	
289	mapImgs[0].fadeOut( mapMode, japanMapFadeOutComplete );
290	
291}
292
293function japanMapFadeOutComplete(){
294	switch(mapMode){
295		case 'tokyo':
296			$(tokyoMapImgId).css({'visibility':'visible'});
297			$(tokyoMapImgId).hide().fadeIn( 800, EASE_TYPE_INOUT, function(){ openCompleteMap(); } );
298			break;
299		case 'kanagawa':
300			$(kanagawaMapImgId).css({'visibility':'visible'});
301			$(kanagawaMapImgId).hide().fadeIn( 800, EASE_TYPE_INOUT, function(){ openCompleteMap(); } );
302			break;
303	}
304	backbtn.open();
305}
306
307function openCompleteMap(){
308	mapImgs[0].init();
309}
310
311function backMap(){
312	backbtn.close();
313	switch(mapMode){
314		case 'tokyo':
315			$(tokyoMapImgId).fadeOut( 400, EASE_TYPE_INOUT, function(){ $(tokyoMapImgId).css({'visibility':'hidden'}); $(tokyoMapImgId).hide(); } );
316			break;
317		case 'kanagawa':
318			$(kanagawaMapImgId).fadeOut( 400, EASE_TYPE_INOUT, function(){ $(tokyoMapImgId).css({'visibility':'hidden'}); $(kanagawaMapImgId).hide(); } );
319			break;
320	}
321}
322
323/* -------------------------------------------------------- */
324// CLASS
325/* -------------------------------------------------------- */
326function MapImage( _selector, _index ){
327	
328	var _self = this;
329	_self.index = _index;
330	_self.selector = _selector;
331	_self.img = _self.selector.find('img');
332	_self.w = $(_self.img).width();
333	_self.h = $(_self.img).height();
334	_self.initX = $(_self.selector).position().left;
335	_self.initY = $(_self.selector).position().top;
336	_self.initImgX = $(_self.img).position().left;
337	_self.initImgY = $(_self.img).position().top;
338	
339	_self.init = function(){
340
341		$(_self.selector).css({
342			'left':0+'px',
343			'top':0+'px'
344		});
345
346		$(_self.img).css({
347			'width':_self.w+'px',
348			'height':_self.h+'px',
349			'left':0+'px',
350			'top':0+'px'
351		});
352	}
353	
354	_self.fadeOut = function(_mode, _callback){
355		
356		var _scale = 4;
357		var _w = _self.w*_scale;
358		var _h = _self.h*_scale;
359		var _x;
360		var _y;
361		
362		switch(_mode){
363			
364			case 'tokyo':
365
366				_x = _w/2*-1 - 444 + _self.initX;
367				_y = _h/2*-1 - 394 + _self.initY;
368			
369				break;
370				
371			case 'kanagawa':
372			
373				_x = _w/2*-1 - 384 + _self.initX;
374				_y = _h/2*-1 - 534 + _self.initY;
375			
376				break;
377				
378		}
379		
380		$(_self.img).animate(
381			{
382				width: _w
383			},
384			{
385				duration: 800,
386				easing: 'swing',
387				queue: false
388			}
389		).animate(
390			{
391				height: _h
392			},
393			{
394				duration: 800,
395				queue: false
396			}
397		);
398		
399		$(_self.selector).animate(
400			{
401				left: _x
402			},
403			{
404				duration: 1000,
405				queue: false
406			}
407		).animate(
408			{
409				top: _y
410			},
411			{
412				duration: 1000,
413				queue: false,
414				complete:function(){
415					_callback();
416				}
417			}
418		);
419		
420	}
421	
422}
423
424function MapArea(_obj,_parent){
425	
426	var _self = this;
427	_self.title = _obj.title;
428	_self.coords = _obj.coords;
429	_self.type = 'poly';
430	_self.href = '#';
431	_self.parent = _parent;
432	_self.selector;
433	_self.tag;
434	
435	_self.init = function(){
436		_self.tag = document.createElement('area');
437		_self.selector = $(_self.tag);
438		_self.addAttr();
439		_self.addEvent();
440	}
441	
442	_self.addAttr = function(){
443		_self.selector.attr('title',_self.title);
444		_self.selector.attr('coords',_self.coords);
445		_self.selector.attr('shape',_self.type);
446		_self.selector.attr('href',_self.href);
447	}
448	
449	_self.addEvent = function(){
450		_self.selector.css({'cursor':'pointer'});
451		_self.selector.bind('click', _self.click);
452	}
453	
454	_self.removeEvent = function(){
455		_self.selector.css({'cursor':'default'});
456		_self.selector.unbind('click', _self.click);
457	}
458	
459	_self.click = function(){
460		jumpLink(_self.title);
461		return false;
462	}
463	
464	_self.pause = function(){
465		_self.removeEvent();
466	}
467	
468}
469
470function BackBtn(_selector){
471	
472	var _self = this;
473	_self.selector = $(_selector);
474	_self.initX = 0;
475	_self.initY = 0;
476	
477	_self.init = function(){
478		_self.initX = _self.selector.position().left;
479		_self.initY = _self.selector.position().top;
480	}
481	
482	_self.open = function(){
483		_self.selector.css({'visibility':'visible'});
484		_self.selector.hide().fadeIn( 800, EASE_TYPE_INOUT, function(){ _self.addEvent(); } );
485	}
486	
487	_self.close = function(){
488		_self.removeEvent();
489		_self.selector.fadeOut( 400, EASE_TYPE_INOUT, function(){ _self.selector.hide(); } );
490	}
491	
492	_self.addEvent = function(){
493		_self.selector.css({'cursor':'pointer'});
494		_self.selector.bind('click', _self.click);
495	}
496	
497	_self.removeEvent = function(){
498		_self.selector.css({'cursor':'default'});
499		_self.selector.unbind('click', _self.click);
500	}
501	
502	_self.click = function(){
503		backMap();
504		return false;
505	}
506	
507}
508
509/* -------------------------------------------------------- */
510// TRIGGER
511/* -------------------------------------------------------- */
512if(window.addEventListener) {
513	window.addEventListener('load',function(){ initMap() },false);
514}
515else if(window.attachEvent) {
516	window.attachEvent('onload',function(){ initMap() });
517}
518else{
519	window.onload = function(){ initMap() };
520}

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.