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.