$(function () { //もっと見るボタン if ($('div.box dl').hasClass('hide') == true) { if ($('div.box dl').hasClass('l_10') == true) { $('div.box dl.hide').find('dt').eq(9).nextAll('dt').hide(); $('div.box dl.hide').find('dd').eq(9).nextAll('dd').hide(); } else { $('div.box dl.hide').find('dt').eq(4).nextAll('dt').hide(); $('div.box dl.hide').find('dd').eq(4).nextAll('dd').hide(); }; } else {} $('div.box div.all_view').click(function () { if ($(this).find('span').text() == 'もっとみる') { if ($(this).parent('div').find('dl').hasClass('l_10') == true) { $(this).parent('div').find('dl.hide').find('dt').eq(9).nextAll('dt').fadeIn('fast'); $(this).parent('div').find('dl.hide').find('dd').eq(9).nextAll('dd').fadeIn('fast'); } else { $(this).parent('div').find('dl.hide').find('dt').eq(4).nextAll('dt').fadeIn('fast'); $(this).parent('div').find('dl.hide').find('dd').eq(4).nextAll('dd').fadeIn('fast'); } $(this).find('span').text('閉じる'); $(this).find('span').css('background-image', 'url(/common_files/images/icon/icon_page_l_t_b.png)'); } else { if ($(this).parent('div').find('dl').hasClass('l_10') == true) { $(this).parent('div').find('dl.hide').find('dt').eq(9).nextAll('dt').fadeOut('fast'); $(this).parent('div').find('dl.hide').find('dd').eq(9).nextAll('dd').fadeOut('fast'); } else { $(this).parent('div').find('dl.hide').find('dt').eq(4).nextAll('dt').fadeOut('fast'); $(this).parent('div').find('dl.hide').find('dd').eq(4).nextAll('dd').fadeOut('fast'); } $(this).find('span').text('もっとみる'); $(this).find('span').css('background-image', 'url(/common_files/images/icon/icon_page_l_b.png)'); } //$(this).hide(); }); var _UA = navigator.userAgent; $('#sidearea div.side_navi_bg dl.normal').children('dd').css('display', 'none'); $('.acc_item').hide(); $('.acc_link .acd').hide(); //基本手設定 var path = location.pathname; var g_flag = 0; var m_flag = 0; $('div.compact_head').css('top', '-55px'); $('#sidearea').find('dd a.active').removeClass('active'); $('#sidearea').find('dt.accordion').each(function () { if (!$(this).hasClass('accordion_open')) $(this).siblings('dd').hide(); }); //製品BOX追加 if (path.indexOf('/lineup/') != -1) { console.log('test'); if (path.indexOf('support') != -1) { console.log('test2'); $('ul.tab_bottom').before('
'); } } //ハッシュ付きリンクの処理 var hash_link = 'n'; var lh = location.hash; if (path.indexOf('/lineup/') != -1) { hash_link = 'n'; } else { if (lh.indexOf('#') != -1) { var hash_link = 'y'; } else { hash_link = 'n'; } }; if (hash_link == 'y') { if (lh == '#comicomi') { var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position }); } else if (lh == '#comicomi2' || lh == '#comicomi3') { var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position + 10 }); } else if (lh == '#att01') {} else if (lh == '#very2special') { if (gUA['view_mode'] == 'sp') { var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position }); } else { var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position - 156 }); }; } else if (path.indexOf('/shop/') != -1) { if (gUA['view_mode'] == 'pc') { var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position - 56 }); } else { $(window).load(function () { var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position }); }); } } else if (path.indexOf('/yservice/howto/paypay/') != -1) { if(location.hash.indexOf('linkage') != -1 || location.hash.indexOf('mirenkei') != -1){ $('html,body').animate({ scrollTop: 0 }); $(window).load(function(){ var lh = location.hash; var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position }); }); } else { var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position }); } } else { var lh_position = $(lh).offset().top; $('html,body').animate({ scrollTop: lh_position - 56 }); } }; //footerシェア用 var page_url = location.href; //facebook var facebook_link = $('div#footer_gnavi_sns a:first').attr('href'); $('div#footer_gnavi_sns a:first').attr('href', facebook_link + page_url); //facebook(h1) $('li#fasebook div.fb-like').attr('data-href', page_url); //twitter var twitter_text = document.title; var twitter_encText = encodeURIComponent(twitter_text); var twitter_link = $('div#footer_gnavi_sns a:eq(1)').attr('href'); $('div#footer_gnavi_sns a:eq(1)').attr('href', twitter_link + page_url + '&text=' + twitter_encText); //gogole+ var google_link = $('div#footer_gnavi_sns a:eq(2)').attr('href'); $('div#footer_gnavi_sns a:eq(2)').attr('href', google_link + page_url); if (gUA['view_mode'] == 'pc') { //グロナビ縮小動作 if ($('body').attr('class') == 'lp_r lp_short') {} else if ($('body').attr('class') == 'hikariotokuwari hikarisetwari lp') {} else if ($('body').attr('class') == 'lp_short') {} else if ($('body').attr('class') == 'lp_r lp_short2') {} else if ($('body').attr('class') == 'lp_short2') {} else { $(window).scroll(function () { var scroll_object = $('div.compact_head'); var window_position = $(document).scrollTop(); var current = document.activeElement; var display_get = scroll_object.css('top'); //スクロール量が100より大きい時に実行 if ($(this).scrollTop() >= 100) { //FFはスクロール量を複数回取得する為、スクロール時にコンパクトナビが表示されていない場合に実行 if (display_get == '-55px') { $('div.compact_head').css('display', 'block'); if (!scroll_object.is(':animated')) { scroll_object.animate({ opacity: 1, top: 0 }, 200, function () { if (current.id == 'search01') { $('div.compact_head dd.search:first input').focus(); } }); }; } } else { //スクロール量が100以下の時に実行 if (!scroll_object.is(':animated')) { scroll_object.animate({ opacity: 0, top: -55 }, 200, function () { if (current.id == 'search02') { $('div#header:first dd.search:first input').focus(); } }); }; $('div#slide_back').stop(true, true).animate({ opacity: 0, height: 0 }, 300); } //スクロール時のグロナビは非表示 $('div#slide_back').animate({ opacity: 0, height: '0px' }, 200, function () { $('div#slide div#column1-1,div#slide div#column1-2,div#slide div#column1-3,div#slide div#column1-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column2-1,div#slide div#column2-2,div#slide div#column2-3,div#slide div#column2-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column3-1,div#slide div#column3-2,div#slide div#column3-3,div#slide div#column3-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column5-1,div#slide div#column5-2,div#slide div#column5-3,div#slide div#column5-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column6-1,div#slide div#column6-2,div#slide div#column6-3,div#slide div#column6-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column4-1,div#slide div#column4-2,div#slide div#column4-3,div#slide div#column4-4').css({ 'marginTop': '-20px', opacity: 0 }, 100, function () { $('div#slide').hide(); }); }); $('div.cate_plan').css('display', 'none'); $('div.cate_lineup').css('display', 'none'); $('div.cate_service').css('display', 'none'); $('div.cate_support').css('display', 'none'); $('ul.g_navi li').removeClass('active_hover'); if (window_position == 0) { scroll_object.animate({ opacity: 0, top: -55 }, 200, function () { if (current.id == 'search02') { $('div#header:first dd.search:first input').focus(); } }); $('div#slide_back').stop(true, true).animate({ opacity: 0, height: 0 }, 300); }; }); if (navigator.userAgent.indexOf('iPad') != -1) { $('div#head_g_navi ul.g_navi li a').click(function () { //if($(this).attr('href') == '/shop/index.html' || $(this).attr('href') == '/area/index.html'){} else {return false;} if ($(this).attr('href') == '/shop/index.html' || $(this).attr('href') == '/shop/' || $(this).attr('href') == '/area/index.html' || $(this).attr('href') == '/area/') {} else { return false; } }); $('div#header:first dd.search:first').animate({ opacity: 1 }); $('div#header:first dd.search:first input').animate({ width: '120px' }); $('div.compact_head dd.search:first').animate({ opacity: 1 }); $('div.compact_head dd.search:first input').animate({ width: '120px' }); } else if (navigator.userAgent.indexOf('Android') > -1 && navigator.userAgent.indexOf('Mobile') < 0) { $('div#head_g_navi ul.g_navi li a').click(function () { //if($(this).attr('href') == '/shop/index.html' || $(this).attr('href') == '/area/index.html'){} else {return false;} if ($(this).attr('href') == '/shop/index.html' || $(this).attr('href') == '/shop/' || $(this).attr('href') == '/area/index.html' || $(this).attr('href') == '/area/') {} else { return false; } }); $('div#header:first dd.search:first').animate({ opacity: 1 }); $('div#header:first dd.search:first input').animate({ width: '120px' }); $('div.compact_head dd.search:first').animate({ opacity: 1 }); $('div.compact_head dd.search:first input').animate({ width: '120px' }); } //グロナビ表示修正版(各カテゴリにマウスオーバー、マウスアウトした時に実行) //初期はカテゴリ無し var menu_categoly = false; var sethover = false; var sethover_body = false; $('div#head_g_navi ul.g_navi li.g_plan,div#head_g_navi ul.g_navi li.g_lineup,div#head_g_navi ul.g_navi li.g_service,div#head_g_navi ul.g_navi li.g_area,ul.g_navi li.g_shop,div#head_g_navi ul.g_navi li.g_support').live({ "mouseover": function () { //カテゴリ判定の為、クラス名を取得 var categoly_active = $(this).attr('class'); if (categoly_active == 'g_plan' || categoly_active == 'g_plan active') { menu_categoly = 'g_plan'; } else if (categoly_active == 'g_lineup' || categoly_active == 'g_lineup active') { menu_categoly = 'g_lineup'; } else if (categoly_active == 'g_service' || categoly_active == 'g_service active') { menu_categoly = 'g_service'; } else if (categoly_active == 'g_area' || categoly_active == 'g_area active') { menu_categoly = 'g_area'; } else if (categoly_active == 'g_shop' || categoly_active == 'g_shop active') { menu_categoly = 'g_shop'; } else if (categoly_active == 'g_support' || categoly_active == 'g_support active') { menu_categoly = 'g_support'; } if (menu_categoly == 'g_area' || menu_categoly == 'g_shop') { if ($('div.cate_plan').is(':visible') == true || $('div.cate_lineup').is(':visible') == true || $('div.cate_service').is(':visible') == true || $('div.cate_support').is(':visible') == true) { $('div#slide_back').animate({ opacity: 0, height: '0px' }, 200, function () { $('div#slide div#column1-1,div#slide div#column1-2,div#slide div#column1-3,div#slide div#column1-4').css({ 'marginTop': '-20px', opacity: 0 }, 200); $('div#slide div#column2-1,div#slide div#column2-2,div#slide div#column2-3,div#slide div#column2-4').css({ 'marginTop': '-20px', opacity: 0 }, 200); $('div#slide div#column3-1,div#slide div#column3-2,div#slide div#column3-3,div#slide div#column3-4').css({ 'marginTop': '-20px', opacity: 0 }, 200); $('div#slide div#column5-1,div#slide div#column5-2,div#slide div#column5-3,div#slide div#column5-4').css({ 'marginTop': '-20px', opacity: 0 }, 200); $('div#slide div#column6-1,div#slide div#column6-2,div#slide div#column6-3,div#slide div#column6-4').css({ 'marginTop': '-20px', opacity: 0 }, 200); $('div#slide div#column4-1,div#slide div#column4-2,div#slide div#column4-3,div#slide div#column4-4').css({ 'marginTop': '-20px', opacity: 0 }, 200, function () { $('div#slide').hide(); }); }); $('div.cate_plan').css('display', 'none'); $('div.cate_lineup').css('display', 'none'); $('div.cate_service').css('display', 'none'); $('div.cate_support').css('display', 'none'); $('ul.g_navi li').removeClass('active_hover'); } } else { //規定の秒数、マウスオーバーしていれば表示処理 sethover = setTimeout(function () { menu_drop(); }, 200); }; }, "mouseout": function () { clearTimeout(sethover); } }); //メニュー表示処理 function menu_drop() { //黒背景の表示処理 $('div#slide_back').stop(true, true).animate({ opacity: 1, height: '310px' }, 300); $('div#slide_back').css({ 'position': 'absolute', 'top': '145px' }); $('div#slide').css({ 'position': 'absolute', 'top': '0px' }); //「plan」カテゴリのメニュー表示 if (menu_categoly == 'g_plan') { $('ul.g_navi li').removeClass('active_hover'); $('ul.g_navi li.g_plan').addClass('active_hover'); if ($('div.cate_lineup').is(':visible') == true) { var win_width = $('div.cate_lineup').width(); $('div.cate_plan').css({ 'marginLeft': -win_width, height: '310px', opacity: 1 }); $('div.cate_plan').show(); $('div.cate_plan #column1-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column2-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column3-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column4-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup').stop(true, true).animate({ 'marginLeft': win_width }, 300, function () { $('div.cate_lineup').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_plan').stop(true, true).animate({ 'marginLeft': 0 }); } else if ($('div.cate_service').is(':visible') == true) { var win_width = $('div.cate_service').width(); $('div.cate_plan').css({ 'marginLeft': -win_width, height: '310px', opacity: 1 }); $('div.cate_plan').show(); $('div.cate_plan #column1-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column2-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column3-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column4-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service').stop(true, true).animate({ 'marginLeft': win_width }, 300, function () { $('div.cate_service').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_plan').stop(true, true).animate({ 'marginLeft': 0 }); } else if ($('div.cate_support').is(':visible') == true) { var win_width = $('div.cate_support').width(); $('div.cate_plan').css({ 'marginLeft': -win_width, height: '310px', opacity: 1 }); $('div.cate_plan').show(); $('div.cate_plan #column1-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column2-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column3-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan #column4-1').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support').stop(true, true).animate({ 'marginLeft': win_width }, 300, function () { $('div.cate_support').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_plan').stop(true, true).animate({ 'marginLeft': 0 }); } else { $('div.cate_plan').css('display', 'block'); $('div.cate_lineup').css('display', 'none'); $('div.cate_service').css('display', 'none'); $('div.cate_support').css('display', 'none'); $('div.cate_service').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_service #column1-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column2-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column3-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column4-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_lineup #column1-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column2-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column3-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column4-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column5-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column6-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_support #column1-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column2-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column3-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column4-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan').stop(true, true).animate({ opacity: 1, height: '310px' }, 300, function () { $('div.cate_plan #column1-1').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_plan #column2-1').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_plan #column3-1').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_plan #column4-1').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); }); $('div.cate_plan').show(); m_flag = 1; } } //「lineup」カテゴリのメニュー表示 else if (menu_categoly == 'g_lineup') { $('ul.g_navi li').removeClass('active_hover'); $('ul.g_navi li.g_lineup').addClass('active_hover'); if ($('div.cate_plan').is(':visible') == true) { var win_width = $('div.cate_plan').width(); $('div.cate_lineup').css({ 'marginLeft': win_width, height: '310px', opacity: 1 }); $('div.cate_lineup').show(); $('div.cate_lineup #column1-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column2-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column3-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column4-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column5-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column6-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan').stop(true, true).animate({ 'marginLeft': -win_width }, 300, function () { $('div.cate_plan').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_lineup').stop(true, true).animate({ 'marginLeft': 0 }); } else if ($('div.cate_service').is(':visible') == true) { var win_width = $('div.cate_service').width(); $('div.cate_lineup').css({ 'marginLeft': -win_width, height: '310px', opacity: 1 }); $('div.cate_lineup').show(); $('div.cate_lineup #column1-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column2-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column3-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column4-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column5-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column6-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service').stop(true, true).animate({ 'marginLeft': win_width }, 300, function () { $('div.cate_service').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_lineup').stop(true, true).animate({ 'marginLeft': 0 }); } else if ($('div.cate_support').is(':visible') == true) { var win_width = $('div.cate_support').width(); $('div.cate_lineup').css({ 'marginLeft': -win_width, height: '310px', opacity: 1 }); $('div.cate_lineup').show(); $('div.cate_lineup #column1-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column2-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column3-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column4-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column5-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup #column6-2').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support').stop(true, true).animate({ 'marginLeft': win_width }, 300, function () { $('div.cate_support').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_lineup').stop(true, true).animate({ 'marginLeft': 0 }); } else { $('div.cate_plan').css('display', 'none'); $('div.cate_lineup').css('display', 'block'); $('div.cate_service').css('display', 'none'); $('div.cate_support').css('display', 'none'); $('div.cate_plan').animate({ opacity: 0, height: '0px' }, 300); $('div.cate_plan #column1-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column2-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column3-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column4-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_service #column1-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column2-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column3-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column4-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_support #column1-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column2-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column3-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column4-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup').stop(true, true).animate({ opacity: 1, height: '310px' }, 300, function () { $('div.cate_lineup #column1-2').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_lineup #column2-2').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_lineup #column3-2').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_lineup #column4-2').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_lineup #column5-2').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_lineup #column6-2').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); }); $('div.cate_lineup').show(); m_flag = 1; } } //「service」カテゴリのメニュー表示 else if (menu_categoly == 'g_service') { $('ul.g_navi li').removeClass('active_hover'); $('ul.g_navi li.g_service').addClass('active_hover'); if ($('div.cate_plan').is(':visible') == true) { var win_width = $('div.cate_plan').width(); $('div.cate_service').css({ 'marginLeft': win_width, height: '310px', opacity: 1 }); $('div.cate_service').show(); $('div.cate_service #column1-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column2-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column3-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column4-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan').stop(true, true).animate({ 'marginLeft': -win_width }, 300, function () { $('div.cate_plan').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_service').stop(true, true).animate({ 'marginLeft': 0 }); } else if ($('div.cate_lineup').is(':visible') == true) { var win_width = $('div.cate_plan').width(); $('div.cate_service').css({ 'marginLeft': win_width, height: '310px', opacity: 1 }); $('div.cate_service').show(); $('div.cate_service #column1-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column2-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column3-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column4-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup').stop(true, true).animate({ 'marginLeft': -win_width }, 300, function () { $('div.cate_lineup').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_service').stop(true, true).animate({ 'marginLeft': 0 }); } else if ($('div.cate_support').is(':visible') == true) { var win_width = $('div.cate_support').width(); $('div.cate_service').css({ 'marginLeft': -win_width, height: '310px', opacity: 1 }); $('div.cate_service').show(); $('div.cate_service #column1-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column2-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column3-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service #column4-3').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support').stop(true, true).animate({ 'marginLeft': win_width }, 300, function () { $('div.cate_support').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_service').stop(true, true).animate({ 'marginLeft': 0 }); } else { $('div.cate_plan').css('display', 'none'); $('div.cate_lineup').css('display', 'none'); $('div.cate_service').css('display', 'block'); $('div.cate_support').css('display', 'none'); $('div.cate_plan').animate({ opacity: 0, height: '0px' }, 300); $('div.cate_plan #column1-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column2-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column3-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column4-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_lineup #column1-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column2-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column3-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column4-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column5-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column6-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_support #column1-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column2-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column3-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support #column4-4').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service').stop(true, true).animate({ opacity: 1, height: '310px' }, 300, function () { $('div.cate_service #column1-3').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_service #column2-3').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_service #column3-3').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_service #column4-3').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); }); $('div.cate_service').show(); m_flag = 1; } } //「support」カテゴリのメニュー表示 else if (menu_categoly == 'g_support') { $('ul.g_navi li').removeClass('active_hover'); $('ul.g_navi li.g_support').addClass('active_hover'); if ($('div.cate_plan').is(':visible') == true) { var win_width = $('div.cate_plan').width(); $('div.cate_support').css({ 'marginLeft': win_width, height: '310px', opacity: 1 }); $('div.cate_support').show(); $('div.cate_support #column1-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column2-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column3-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column4-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_plan').stop(true, true).animate({ 'marginLeft': -win_width }, 300, function () { $('div.cate_plan').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_support').stop(true, true).animate({ 'marginLeft': 0 }); } else if ($('div.cate_lineup').is(':visible') == true) { var win_width = $('div.cate_lineup').width(); $('div.cate_support').css({ 'marginLeft': win_width, height: '310px', opacity: 1 }); $('div.cate_support').show(); $('div.cate_support #column1-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column2-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column3-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column4-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_lineup').stop(true, true).animate({ 'marginLeft': -win_width }, 300, function () { $('div.cate_lineup').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_support').stop(true, true).animate({ 'marginLeft': 0 }); } else if ($('div.cate_service').is(':visible') == true) { var win_width = $('div.cate_service').width(); $('div.cate_support').css({ 'marginLeft': win_width, height: '310px', opacity: 1 }); $('div.cate_support').show(); $('div.cate_support #column1-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column2-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column3-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_support #column4-4').css({ 'marginTop': '0px', opacity: 1 }); $('div.cate_service').stop(true, true).animate({ 'marginLeft': -win_width }, 300, function () { $('div.cate_service').css({ 'marginLeft': '0px', opacity: 0, height: '0px', display: 'none' }) }); $('div.cate_support').stop(true, true).animate({ 'marginLeft': 0 }); } else { $('div.cate_plan').css('display', 'none'); $('div.cate_lineup').css('display', 'none'); $('div.cate_service').css('display', 'none'); $('div.cate_support').css('display', 'block'); $('div.cate_plan').animate({ opacity: 0, height: '0px' }, 300); $('div.cate_plan #column1-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column2-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column3-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_plan #column4-1').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_lineup #column1-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column2-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column3-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column4-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column5-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_lineup #column6-2').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service').stop(true, true).animate({ opacity: 0, height: '0px' }, 300); $('div.cate_service #column1-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column2-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column3-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_service #column4-3').stop(true, true).animate({ 'marginTop': '-20px', opacity: 0 }, 300); $('div.cate_support').stop(true, true).animate({ opacity: 1, height: '310px' }, 300, function () { $('div.cate_support #column1-4').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_support #column2-4').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_support #column3-4').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); $('div.cate_support #column4-4').stop(true, true).animate({ 'marginTop': '0px', opacity: 1 }, 300); }); $('div.cate_support').show(); m_flag = 1; } } } } //グロナビクローズ動作 $(document).bind({ "mouseover": function (event) { if (!$.contains($("#head_g_navi")[0], event.target) && !$.contains($("#head_g_navi_compact")[0], event.target) && !$.contains($("#slide_back")[0], event.target)) { // (2) sethover_body = setTimeout(function () { $('div#slide_back').animate({ opacity: 0, height: '0px' }, 200, function () { $('div#slide div#column1-1,div#slide div#column1-2,div#slide div#column1-3,div#slide div#column1-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column2-1,div#slide div#column2-2,div#slide div#column2-3,div#slide div#column2-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column3-1,div#slide div#column3-2,div#slide div#column3-3,div#slide div#column3-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column5-1,div#slide div#column5-2,div#slide div#column5-3,div#slide div#column5-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column6-1,div#slide div#column6-2,div#slide div#column6-3,div#slide div#column6-4').css({ 'marginTop': '-20px', opacity: 0 }, 100); $('div#slide div#column4-1,div#slide div#column4-2,div#slide div#column4-3,div#slide div#column4-4').css({ 'marginTop': '-20px', opacity: 0 }, 100, function () { $('div#slide').hide(); }); }); $('div.cate_plan').css('display', 'none'); $('div.cate_lineup').css('display', 'none'); $('div.cate_service').css('display', 'none'); $('div.cate_support').css('display', 'none'); $('ul.g_navi li').removeClass('active_hover'); }, 300); } }, "mouseout": function () { clearTimeout(sethover_body); } }); } //accordion設定(見出し) $('.acc').click(function () { if ($(this).hasClass('acc_open') == true) { if ($(this).next('.acc_item').length == 1) { $(this).removeClass('acc_open'); $(this).next('.acc_item').slideToggle('fast'); } else if ($(this).next('.acc_link').length == 1) { $(this).removeClass('acc_open'); $(this).next('.acc_link').find('.acd').slideToggle('fast'); } } else { if ($(this).next('.acc_item').length == 1) { $(this).addClass('acc_open'); $(this).next('.acc_item').slideToggle('fast'); } else if ($(this).next('.acc_link').length == 1) { $(this).addClass('acc_open'); $(this).next('.acc_link').find('.acd').slideToggle('fast'); } } }); //Android対策(4系) if (navigator.userAgent.indexOf('Android') > -1 && navigator.userAgent.indexOf('Mobile') > -1) { function and_ver() { var and_ua = navigator.userAgent; if (and_ua.indexOf("Android") > 0) { var version = parseFloat(and_ua.slice(and_ua.indexOf("Android") + 8)); return version; } } if (and_ver() >= 5) {} else { $("div#main_area select").addClass("android"); } } //sidenavi if (!active_search(path)) { $($('ul.bread_crumb').children('li').get().reverse()).each(function () { if ($(this).children('a').size() != 0) { if (path == '/shop/all/' || path == '/shop/service_info/' || path == '/shop/reservation/about/' || path == '/shop/myshop/') {} else { if (active_search($(this).children('a').attr('href'))) { return false; } }; } }); } //グロナビ判定用 if (path.indexOf("plan") == 1) { $('li.g_plan').addClass('active'); } else if (path.indexOf("lineup") == 1 || path.indexOf("/p_s/products/") == 1) { $('li.g_lineup').addClass('active'); } else if (path.indexOf("service") == 1) { $('li.g_service').addClass('active'); } else if (path.indexOf("support") == 1) { $('li.g_support').addClass('active'); } else if (path.indexOf("area") == 1) { $('li.g_area').addClass('active'); } else if (path.indexOf("shop") == 1) { $('li.g_shop').addClass('active'); } $('div#sidearea div.side_navi_bg').each(function () { if ($(this).children('dt').hasClass('title_active') == true) { var banner_point = $(this).children('dt').children('a').attr('href'); } else if ($(this).children('dt').hasClass('active_sp') == true) { var banner_point = $(this).children('dt').children('a').attr('href'); } if (banner_point == '/lineup/smartphone/') { $('a.spec').css('display', 'none'); $('a.spec_smartphone').css('display', 'block'); } else if (banner_point == '/lineup/phone/') { $('a.spec').css('display', 'none'); $('a.spec_phone').css('display', 'block'); } else if (banner_point == '/lineup/data/') { $('a.spec').css('display', 'none'); $('a.spec_data').css('display', 'block'); } }); if (location.hash == '#merit' || location.hash == '#spec' || location.hash == '#support' || location.hash == '#service' || location.hash == '#notes') { ultab = $('ul.tab,ul.tab02,ul.tab03,ul.tab04').offset().top; ultab2 = ultab - 70; $('html,body').animate({ scrollTop: ultab2 }, 'slow', 'swing'); } if (path.indexOf('shop') == true) {} else { $('a[href^=#],area[href^=#]').click(function (e) { e.preventDefault(); if ($(this).attr('href') == '#column02' || $(this).attr('href') == '#column' || $(this).attr('href') == '#zoom_content' || $(this).attr('href') == '#zoom_content2' || $(this).attr('href') == '#zoom_content3' || $(this).attr('rel') == 'superbox[content]') {} else if ($(this).attr('href') == '#page_top') { // スクロールの速度 var speed = 400; // ミリ秒 // アンカーの値取得 var href = $(this).attr("href"); // 移動先を取得 var target = $(href == "#" || href == "" ? 'html' : href); // スムーススクロール $('body,html').animate({ scrollTop: 0 }, speed, 'swing'); return false; // } else { } else if ($(this).attr('href') != '#') { var hrefs = $(this).attr("href"); // var hrefs02 = hrefs.replace(/#/g,''); hrefs01 = hrefs.split("#"); hrefs02 = hrefs01[1]; // 移動先を取得 var link_p = $('a[name=' + hrefs02 + ']'); if (link_p.html() == null) { var link_id = $('[id=' + hrefs02 + ']'); var link_pos = $(link_id).position(); var link_pos02 = link_pos.top - 60; $('html,body').animate({ scrollTop: link_pos02 }, 'slow', 'swing'); } else { var link_pos = $(link_p).position(); var link_pos02 = link_pos.top - 60; $('html,body').animate({ scrollTop: link_pos02 }, 'slow', 'swing'); } return false; } }); } // $("ul#menus li").click(function () { if ($(this).hasClass('last') == true) {} else { var num = $("ul#menus li").index(this); $("ul#menus li").removeClass('select'); $(this).addClass('select'); } }); }); function active_search(url) { url = url.replace(/\/$/, '/index.html'); var active_flag = 0; $('#sidearea').find('dd').each(function () { if ($(this).children('a').size() != 0) { var link = $(this).children('a').attr('href'); link = link.replace(/\/$/, '/index.html'); if (link == url) { $(this).addClass('active'); $(this).parents('dl').children('dd').show(); $(this).parents('dl').children('dt').addClass('title_active'); $(this).parents('div').find('dd.sub').hide(); if ($(this).hasClass('active') == true) { $(this).show(); } if ($(this).hasClass('pre') == true) { var sub_moto = $(this).index(); } else { var sub_moto = $(this).prevAll('dd.pre').index(); } if ($(this).next('dd').hasClass('sub') == true || $(this).prev('dd').hasClass('sub') == true) { var sub_length = $(this).parents('dl.normal').find('dd.sub:last-child').index(); $(this).parents('dl').find('dd.sub').each(function () { var sub_no = $(this).index(); if (sub_no > sub_moto) { if ($(this).next('dd').hasClass('sub') == true) { $(this).show(); } else if ($(this).index() == sub_length) { $(this).show(); return false; } else if ($(this).next('dd').hasClass('pre') == true) { $(this).show(); return false; }; }; }); } active_flag = 1; return false; } } }); $('#sidearea').find('dt').each(function () { if ($(this).children('a').size() != 0) { var link = $(this).children('a').attr('href'); link = link.replace(/\/$/, '/index.html'); if (link == url) { $(this).addClass('active_sp'); $(this).nextAll('dd').show(); $(this).nextAll('dd.sub').hide(); return false; } } }); if (active_flag) return active_flag; //ナビアクティブ化:Pocket WiFi®プランL向けバリューセット if (location.pathname.indexOf('/plan/data/valueset_wifil/') != -1) { $('div#sidearea').find('dd').each(function () { if ($(this).children('a').attr('href') == '/plan/data/pocketwifi_l/index.html') { $(this).addClass('active'); $(this).prevAll('dt').removeClass('active_sp'); } }); } //ナビアクティブ化:Pocket WiFi®プランS向けバリューセット if (location.pathname.indexOf('/plan/data/valueset_wifis/') != -1) { $('div#sidearea').find('dd').each(function () { if ($(this).children('a').attr('href') == '/plan/data/pocketwifi_s/index.html') { $(this).addClass('active'); $(this).prevAll('dt').removeClass('active_sp'); } }); } //ナビアクティブ化:スマートフォンご契約者さま向け割引 if (location.pathname.indexOf('/plan/discount/smtlong/') != -1) { $('div#sidearea').find('dd').each(function () { if ($(this).children('a').attr('href') == '/plan/discount/smtplan/index.html') { $(this).addClass('active'); $(this).prevAll('dt').removeClass('active_sp'); } }); } //ナビアクティブ化:Pocket WiFi®、データ通信ご契約者さま向け割引 if (location.pathname.indexOf('/plan/discount/pwlong/') != -1) { $('div#sidearea').find('dd').each(function () { if ($(this).children('a').attr('href') == '/plan/discount/pwotoku/index.html') { $(this).addClass('active'); $(this).prevAll('dt').removeClass('active_sp'); } }); } return active_flag; } $(function () { if ($.cookie('cssurl') == 'testuser') {} else { if ((navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1) || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0) { //フローティングバナー表示設定(フォルダ名でバナーを表示するページを指定) if (location.pathname.indexOf('/lineup/404kc/') != -1 || location.pathname.indexOf('/lineup/nexus5/') != -1 || location.pathname.indexOf('/lineup/402lg/') != -1 || location.pathname.indexOf('/lineup/302hw/') != -1 || location.pathname.indexOf('/lineup/302kc/') != -1) { if ($('span#banner').size() > 0) { $('span#banner').show(); //画面サイズを取得 //var w_width = $(window).width(); $(window).bind("resize load", function () { //以下は縦向きの処理 if ($(window).height() > $(window).width()) { //既にバナーが表示されている時は画像サイズ、位置等を調整 var w_width2 = $(window).width(); $('span#banner').css('marginLeft', '0'); $('span#banner').css('left', '0'); $('span#banner a img.banner_image').css('width', w_width2); //以下は横向きの処理 } else { //既にバナーが表示されている時は画像サイズ、位置等を調整 $('span#banner a img.banner_image').css('width', '320px'); var banner_width = $('span#banner a img.banner_image').width() / 2; $('span#banner').css('marginLeft', (-1 * banner_width)); $('span#banner').css('left', '50%'); } }); $(window).load(function () { var banner_height = $('span#banner a img.banner_image').height(); $('div#wrapper').css('paddingBottom', banner_height); var banner_width = $('span#banner a img.banner_image').width() / 2; $('span#banner').css('marginLeft', (-1 * banner_width)); $('span#banner').css('left', '50%'); }); } }; //ここまでフローティングバナー表示設定 //フローティングバナー非表示処理 $('span#banner .banner_close').click(function () { $('span#banner').hide(); $('div#wrapper').css('paddingBottom', '0'); }).css('cursor', 'pointer'); //ここまでフローティングバナー非表示処理 //マップ縮小用 if ($('td').hasClass('map') == true) { var shop_img = $('table.shop tr').eq(1).children('td').eq(1).html(); if (shop_img == null) {} else { $('table.shop tr:last-child').before('