1var BRK = 767; 2var w = window.innerWidth; 3var ios; 4 5$(function(){ 6 7 //iOS対ç 8 ios = false; 9 var userAgent = window.navigator.userAgent.toLowerCase(); 10 if (userAgent.indexOf('ipad') != -1 || userAgent.indexOf('iphone') != -1) { 11 $('body').addClass('ios'); 12 ios = true; 13 } 14 15 //ã°ãã¼ãã«ãã 16 gnaviInit(); 17 gnaviSpInit(); 18 //追å¾ãã 19 naviBarBottom(); 20 //ã¢ã³ã¼ãã£ãªã³(ã°ããã) 21 actionAccordion('#gnavi_sp','.acd_title .icon'); 22 //ã¢ã³ã¼ãã£ãªã³ï¼å¦ç§ä¸è¦§ï¼ 23 actionAccordion('#fnavi','.acd_title .icon'); 24 //ã¢ã³ã¼ãã£ãªã³ï¼ã³ã³ãã¼ãã³ãï¼ 25 actionAccordion('.block'); 26 //matchHeight 27 $('#search_window .btn_list> li').matchHeight(); 28 //ã¿ãããã¯ã¹ 29 actionTabBox(); 30 //æ¤ç´¢ãã©ã¼ã 31 //observeSearchInput(); 32 33}); 34 35/* ã¹ã¯ãªã¼ã³å¤å® 36----------------------------------------------- */ 37function callScreen(){ 38 w = window.innerWidth; 39 if( w > BRK ){ 40 return 'pc'; 41 }else{ 42 return 'sp'; 43 } 44} 45 46/* uaå¤å® 47----------------------------------------------- */ 48function callUA() { 49 var ua = navigator.userAgent; 50 if (ua.indexOf('iPhone') > 0 || ua.indexOf('iPod') > 0 || (ua.indexOf('Android') > 0) && (ua.indexOf('Mobile') > 0) || ua.indexOf('Windows Phone') > 0) { 51 return 'sp'; 52 }else if (ua.indexOf('iPad') > 0 || ua.indexOf('Android') > 0) { 53 return 'tab'; 54 } else { 55 return 'pc'; 56 } 57} 58 59/* Global Navi 60----------------------------------------------- */ 61function gnaviInit(){ 62 63 var beginning = true; 64 var search = false; 65 var spd = 300; 66 67 //æ¤ç´¢çªå ãã¿ã³ã®åæè¨å®(å±éæã«ã¯æ´æ°) 68 $('#search_window .list_trend> li').matchHeight(); 69 70 //èªã¿è¾¼ã¿æã«å é ã§ãªããã°éãã 71 $(window).on('load', function(){ 72 if ( beginning && $(this).scrollTop() ) { 73 beginning = false; 74 toggleMenu('close'); 75 } 76 }); 77 78 //ã¹ã¯ãã¼ã«ãããéãã 79 $(window).on('scroll touchmove', function(){ 80 if (beginning) { 81 beginning = false; 82 toggleMenu('close'); 83 } 84 }); 85 86 //ã¹ããâPCãµã¤ãºã«å¤æ´æã®ããã¿ãã°åé¿ 87 $(window).on('resize', function(){ 88 if( callScreen() === 'pc' ){ 89 $('#fnavi .accordion').removeClass('on'); 90 $('#fnavi .acd_detail').removeAttr('style'); 91 } 92 }); 93 94 //MENUãã¿ã³ã¯ãªãã¯ã§éã 95 $('#gnavi_open').on('click', function(){ 96 if (beginning) { 97 beginning = false; 98 } 99 toggleMenu('open'); 100 }); 101 102 //ãã¦ã¹ã¢ã¦ãã§éãã 103 $('#gnavi .menu_container').mouseleave(function(){ 104 //if (!beginning && !search) { 105 if (!beginning && !search) { 106 toggleMenu('close'); 107 } 108 }); 109 110 //ä¸å±¤å±é 111 $('#gnavi .list_item').mouseenter(function(){ 112 if($(this).attr('open-type') === 'hover'){ 113 $(this).children('.cat_inner').addClass('active'); 114 $(this).children('.submenu_container').stop().fadeIn(spd); 115 } 116 }).mouseleave(function(){ 117 if($(this).attr('open-type') === 'hover'){ 118 $(this).children('.item_inner').removeClass('active'); 119 $(this).children('.submenu_container').stop().fadeOut(spd); 120 } 121 }); 122 123 //æ¤ç´¢çªãéã 124 $('#gnavi .single .search').on('click', function(){ 125 if (!search) { 126 search = true; 127 $(this).addClass('active'); 128 $('#modal_bg, #search_window').fadeIn(spd); 129 //matchHeightæ´æ° 130 $.fn.matchHeight._update(); 131 } 132 }); 133 134 //æ¤ç´¢çªãéãã 135 $('#search_window .close, #modal_bg').on('click', function(){ 136 if (search) { 137 search = false; 138 $('#gnavi .item07 .item_inner').removeClass('active'); 139 $('#search_window, #modal_bg').fadeOut(spd); 140 //éãããä¸èº«ãæ¶ã 141 $('#search_window .input_text').val('').addClass('hold'); 142 //ã¡ã¤ã³ã¡ãã¥ã¼ãç³ã 143 if (!beginning) { 144 toggleMenu('close'); 145 } 146 } 147 }); 148 149 //ã°ãããééæ¬ä½ 150 function toggleMenu(order){ 151 if ( order === 'open' ){ 152 $('#gnavi .list').stop().slideDown(spd); 153 $('#gnavi_open').stop().slideUp(spd); 154 } else if ( order === 'close' ){ 155 $('#gnavi .list').stop().slideUp(spd); 156 $('#gnavi_open').stop().slideDown(spd); 157 } 158 } 159 160} 161 162/* Global Navi (SP) 163----------------------------------------------- */ 164function gnaviSpInit(){ 165 166 var scrollpos; 167 var spd = 300; 168 169 //ã¡ãã¥ã¼ãéã 170 $('#gnavi_sp_open').on('click', function(){ 171 $('#gnavi_sp_open').fadeOut(spd); 172 $('#gnavi_sp').fadeIn(spd); 173 //æ¬æã¹ã¯ãã¼ã«ç¦æ¢ 174 scrollpos = $(window).scrollTop(); 175 stopScroll(scrollpos); 176 }); 177 178 //ã¡ãã¥ã¼ãéãã 179 $('#gnavi_sp, #gnavi_sp_close').on('click', function(){ 180 $('#gnavi_sp_open').fadeIn(spd); 181 $('#gnavi_sp').fadeOut(spd, function(){ 182 //ã¢ã³ã¼ãã£ãªã³ããªã»ãã 183 resetAccordion('#gnavi_sp'); 184 });
185 //æ¬æã¹ã¯ãã¼ã«è§£ç¦ 186 allowScroll(scrollpos); 187 $('.menu').removeClass('open'); 188 }); 189 190 //ãããªã³ã°å¶å¾¡ 191 $('#gnavi_sp .list').on('click', function(e){ 192 e.stopPropagation(); 193 }); 194 195 //box08é«ãæã 196 $('.box08 .sublist li').matchHeight(); 197} 198 199//æ¬æã¹ã¯ãã¼ã«ç¦æ¢ 200function stopScroll(posY){ 201 $('body').addClass('fixed').css({'top': -posY}); 202} 203 204//æ¬æã¹ã¯ãã¼ã«è§£ç¦ 205function allowScroll(posY){ 206 $('body').removeClass('fixed').css({'top': 0}); 207 window.scrollTo( 0, posY ); 208} 209 210 /* pageTopãã¿ã³ãã¹ã¯ãã¼ã«ä½ç½®ãå¤å®ãã¦è¡¨ç¤ºå¶å¾¡ 211 ----------------------------------------------- */ 212 $(window).bind("scroll", function() { 213 // ããã¥ã¡ã³ãã®é«ã 214 scrollHeight = $(document).height(); 215 // ã¹ã¯ãã¼ã«ããé«ã 216 scrollTop = $(window).scrollTop(); 217 // ã¦ã£ã³ãã¦ã®é«ã+ã¹ã¯ãã¼ã«ããé«ãâ ç¾å¨ã®ãããããã®ä½ç½® 218 //scrollPosition = $(window).height() + $(window).scrollTop(); 219 scrollPosition = $(window).height() + scrollTop; 220 // ããã¿ã¼ã®é«ã 221 footHeight = $("footer").height(); 222 223 // ã¹ã¯ãã¼ã«ä½ç½®ãæå®ä½ç½®ã«æ¥ãã 224 if ( scrollTop >= 200 ) { 225 // ä½ç½®ããããã¦è¡¨ç¤º 226 $(".gotop.for_pc").removeClass('hide'); 227 } else { 228 // ä½ç½®ããããã¦é表示 229 $(".gotop.for_pc").addClass('hide'); 230 } 231 232 // ã¹ã¯ãã¼ã«ä½ç½®ãããã¿ã¼ã¾ã§æ¥ãã 233 if ( scrollHeight - scrollPosition <= footHeight ) { 234 // ããã¿ã¼ã«åºå® 235 $(".gotop.for_pc").css({"position":"absolute","top": "20px","bottom": "auto"}); 236 } else { 237 // å³ä¸ã«åºå® 238 $(".gotop.for_pc").css({"position":"fixed","top": "auto","bottom": "15px"}); 239 } 240 }); 241 242 243 244/* 追å¾ã¡ãã¥ã¼ (SP) 245----------------------------------------------- */ 246function naviBarBottom(){ 247 248 var beginning = true; 249 var spd = 300; 250 251 //ãã¼ãæã«å é ã§ãªããã°è¡¨ç¤º 252 $(window).on('load', function(){ 253 if( callScreen() === 'sp' && $(this).scrollTop() ) { 254 beginning = false; 255 $('#navi_bar_bottom').stop().slideDown(spd); 256 } 257 }); 258 259 //ã¹ã¯ãã¼ã«ããã表示 260 $(window).on('scroll touchmove', function(){ 261 if ( beginning ) { 262 beginning = false; 263 $('#navi_bar_bottom').stop().slideDown(spd); 264 } 265 }); 266 267} 268 269/* ã¢ã³ã¼ãã£ãªã³æ±ç¨ 270----------------------------------------------- */ 271function actionAccordion(area,selector){ 272 if(area === undefined) area = '.wrapper'; //対象ç¯å² 273 if(selector === undefined) selector = '.acd_title'; //å±éã»ã¬ã¯ã¿ 274 var $area = $(area); 275 var spd = 300; 276 $area.find(selector).on('click', function(){ 277 var state = false; 278 var $group = $(this).closest(area); 279 var $this = $(this).closest('.accordion'); 280 //鏿å ã®ééå¤å® 281 if( !$this.hasClass('on') ){ 282 state = true; 283 } 284 //ã°ã«ã¼ãå ã§ãã¹ã¦éãã 285 $group.find('.accordion').removeClass('on'); 286 $group.find('.acd_detail').stop().slideUp(spd); 287 //鏿å ãéãã¦ããå ´åã¯éã 288 if( state ){ 289 $this.addClass('on'); 290 $this.children('.acd_detail').stop().slideDown(spd); 291 } 292 }); 293} 294 295//åæå 296function resetAccordion(area){ 297 if(area === undefined) area = '.wrapper'; //対象ç¯å² 298 var $area = $(area); 299 $area.find('.accordion').removeClass('on'); 300 $area.find('.acd_detail').hide(); 301} 302 303/* æ¤ç´¢ãã©ã¼ã å ¥åç£è¦ï¼ä¸ä½¿ç¨ä¸ï¼ 304----------------------------------------------- */ 305function observeSearchInput(){ 306 $('.input_text').change(function(){ 307 var val = $(this).val(); 308 //èæ¯è¡¨ç¤ºåæ¿ 309 if(val === ''){ 310 $(this).addClass('hold'); 311 }else{ 312 $(this).removeClass('hold'); 313 } 314 }); 315} 316 317/* List Uplift 318----------------------------------------------- */ 319function actionUpliftPanel(type){ 320 321 var ua = callUA(); 322 var $box = $('.list_uplift .box'); 323 var spd = 300; 324 var defHeight,boxHeight; 325 var extra = false; 326 327 if(type === 'special') { 328 /* NIKKENãç¥ãindex */ 329 defHeight = 110; 330 }else if( type === 'meeting'){ 331 /* ã¯ãã¹ãã¼ã¯ */ 332 defHeight = 90; 333 extra = true; 334 }else{ 335 defHeight = 0; 336 } 337 338 //PC 339 if(ua === 'pc'){ 340 $box.on('mouseenter', function(){ 341 boxHeight = $(this).height(); 342 $(this).find('.caption').stop().animate({height:boxHeight+'px'}, spd); 343 if(extra){ 344 $(this).find('.profile').stop().slideDown(spd); 345 } 346 }).on('mouseleave', function(){ 347 $(this).find('.caption').stop().animate({height:defHeight+'px'}, spd); 348 if(extra){ 349 $(this).find('.profile').stop().slideUp(spd); 350 } 351 });
352 } 353 354 //tablet & smartphone 355 if( ua !== 'pc' && extra ){ 356 $box.on('click', function(){ 357 if($(this).hasClass('active')){ 358 $(this).removeClass('active'); 359 $(this).find('.caption').stop().animate({height:'41%'}, spd); 360 $(this).find('.profile').stop().slideUp(spd); 361 }else{ 362 $box.removeClass('active'); 363 $box.find('.caption').stop().animate({height:'41%'}, spd); 364 $box.find('.profile').stop().slideUp(spd); 365 $(this).addClass('active'); 366 $(this).find('.caption').stop().animate({height:'100%'}, spd); 367 $(this).find('.profile').stop().slideDown(spd); 368 } 369 }); 370 } 371} 372 373/* TabBox 374----------------------------------------------- */ 375function actionTabBox(){ 376 $('.block_tabbox .tab').on('click', function(){ 377 var spd = 160; 378 var $parent = $(this).closest('.block_tabbox'); 379 var $tabs = $parent.find('.tab'); 380 var $wrap = $parent.find('.box_detail_wrap'); 381 var $details = $parent.find('.detail'); 382 var idx = $parent.find('.tab').index(this); 383 var $target = $parent.find('.detail').eq(idx); 384 $tabs.removeClass('active'); 385 $(this).addClass('active'); 386 $details.animate({opacity:0}
386, spd, function(){ 387 $(this).removeAttr('style').removeClass('active').hide(); 388 $target.fadeIn(spd).addClass('active'); 389 }); 390 //console.log('idx='+idx); 391 }); 392} 393 394/* iOSæã®GoogleMapä¸å ·å対ç(access.html) 395----------------------------------------------- */ 396function accessMapForiOS(){ 397 if(ios){ 398 $('html,body').css({ 399 'height': '100%', 400 'overflow': 'auto', 401 '-webkit-overflow-scrolling': 'touch', 402 }); 403 } 404} 405 406/* 追å¾ã¡ãã¥ã¼ï¼SPï¼ã®è¡¨ç¤ºå¶å¾¡ 407----------------------------------------------- */ 408 409function HdStickMove(){ 410 if( callScreen() === 'sp' ){ 411 var scroll = $(window).scrollTop();//scrollå¤ãåå¾ 412 if (scroll >= 20){//scrollã20ãä¸åã£ãã¨ã 413 $('.hd_stick .btn_link').addClass('close');//UpMoveã追å 414 }else{ 415 $('.hd_stick .btn_link').removeClass('close'); 416 } 417 } 418} 419$(window).scroll(function () { 420 HdStickMove(); 421}); 422 423$(window).on('load', function () { 424 HdStickMove(); 425}); 426 427$(".hd_stick .btn").click(function(){ 428 $(this).parents('.btn_link').toggleClass("close"); 429});
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.