var _ready=function(){
Array.prototype.forEach.call(document.querySelectorAll('[data-lib="4192"]'),function(element){ var timeoutId ;
window.addEventListener( "scroll", function () {
// 繧ケ繧ッ繝ュ繝シ繝ォ繧貞●豁「縺励※500ms蠕後↓邨ゆコ�→縺吶k
clearTimeout( timeoutId ) ;
let target = document.getElementById("foot_fixed");
target.classList.remove("appear");//class蜷榊炎髯、
timeoutId = setTimeout( function () {
let target = document.getElementById("foot_fixed");
target.classList.add("appear");//class蜷崎ソス蜉�
}, 500 ) ;
} ) ;
window.onload = function() {
if( !sessionStorage.getItem('disp_popup') ) {
sessionStorage.setItem('disp_popup', 'on');
let popup = document.getElementById("foot_fixed");
popup.classList.add("first");
}
}
window.addEventListener('load', function(){
var btnVol = document.querySelectorAll('.pay_btn').length;
var btNum = parseInt(btnVol);
var layoutNum = 'btn_layout' + btnVol;
var btnLayout = document.getElementById('btnLayout');
btnLayout.classList.add(layoutNum);
var pay_btn_empty = document.querySelectorAll('.pay_btn_empty').length;
if(btnVol === 5 || btnVol ===7 || btnVol === 11){
document.getElementById('empty2').classList.remove('off');
} else if (btnVol === 10){
document.getElementById('empty1').classList.remove('off');
document.getElementById('empty2').classList.remove('off');
}
if(btnVol === 3 || btnVol === 2){
var pay = document.getElementsByClassName('pay_btn_img');
[].forEach.call(pay, function(elem) {
elem.classList.add('off');
});
var pay2 = document.getElementsByClassName('pay_btn_img2');
[].forEach.call(pay2, function(elem) {
elem.classList.remove('off');
});
}
if(btnVol <= 2){
var bottomdisc = document.getElementById('bottomDisc');
bottomdisc.classList.remove("off");
}
});
});/*layout:25*/
/*繝壹�繧ク蜀�Μ繝ウ繧ッ*/
let headH = document.getElementById('-w-header').offsetHeight;
document.body.style.marginTop = headH + "px"; //CSS縺ョ隱ソ謨エ驛ィ蛻��
縲
/**
* 繧ケ繝�繝シ繧ケ繧ケ繧ッ繝ュ繝シ繝ォ螳溯。碁未謨ー
*/
let smoothScroll = function(target, offset){
let toY;
let nowY = window.pageYOffset; //迴セ蝨ィ縺ョ繧ケ繧ッ繝ュ繝シ繝ォ蛟、
const divisor = 8; //霑代▼縺丞牡蜷茨シ域焚蛟、縺悟、ァ縺阪>縺サ縺ゥ繧�▲縺上j霑代¥��
const range = (divisor / 2) + 1; //縺ゥ縺薙∪縺ァ霑代▼縺代�蜃ヲ逅�r邨ゆコ�☆繧九°(辟。髯舌Ν繝シ繝励↓縺ェ繧峨↑縺�h縺�↓ divisor 縺九i邂怜�)
//繧ソ繝シ繧イ繝�ヨ縺ョ蠎ァ讓�
const targetRect = target.getBoundingClientRect(); //繧ソ繝シ繧イ繝�ヨ縺ョ蠎ァ讓吝叙蠕�
const targetY = targetRect.top + nowY - offset; //迴セ蝨ィ縺ョ繧ケ繧ッ繝ュ繝シ繝ォ蛟、 & 繝倥ャ繝繝シ縺ョ鬮倥&繧定ク上∪縺医◆蠎ァ讓�
//繧ケ繧ッ繝ュ繝シ繝ォ邨ゆコ�∪縺ァ郢ー繧願ソ斐☆蜃ヲ逅�
(function () {
let thisFunc = arguments.callee; //閾ェ霄ォ繧貞他縺ウ蜃コ縺吶◆繧√↓螟画焚縺ォ莉」蜈・
toY = nowY + Math.round((targetY - nowY) / divisor); //谺。縺ォ遘サ蜍輔☆繧句�エ謇�郁ソ代¥蜑イ蜷医�髯、謨ー縺ォ繧医k縲ゑシ�
window.scrollTo(0, toY); //繧ケ繧ッ繝ュ繝シ繝ォ縺輔○繧�
nowY = toY; //nowY譖エ譁ー
if (document.body.clientHeight - window.innerHeight < toY) {
//譛荳矩Κ縺ォ繧ケ繧ッ繝ュ繝シ繝ォ縺励※繧ょッセ雎。縺セ縺ァ螻翫°縺ェ縺��エ蜷医�荳矩剞縺セ縺ァ繧ケ繧ッ繝ュ繝シ繝ォ縺励※蠑キ蛻カ邨ゆコ�
window.scrollTo(0, document.body.clientHeight);
return;
}
if (toY >= targetY + range || toY <= targetY - range) {
//+-range縺ョ遽�峇蜀�∈霑代¥縺セ縺ァ郢ー繧願ソ斐☆
window.setTimeout(thisFunc, 10);
} else {
//+-range 縺ョ遽�峇蜀�↓縺上l縺ー豁」遒コ縺ェ蛟、縺ク遘サ蜍輔@縺ヲ邨ゆコ��
window.scrollTo(0, targetY);
}
})();
};
/**
* 繧「繝ウ繧ォ繝シ繧ソ繧ー縺ォ繧ッ繝ェ繝�け繧、繝吶Φ繝医r逋サ骭イ
*/
const smoothOffset = headH; //Fix縺輔l縺ヲ縺�k繝倥ャ繝繝シ縺ョ鬮倥&蛻�せ繧ッ繝ュ繝シ繝ォ蜈医�蠎ァ讓吶r縺壹i縺吶◆繧√↓縲∝、画焚縺ォ鬮倥&繧貞�繧後※縺翫¥
const links = document.querySelectorAll('a[href*="#"]'); //#縺後Μ繝ウ繧ッ縺ォ蜷ォ縺セ繧後※縺�k繧「繝ウ繧ォ繝シ繧ソ繧ー繧貞�縺ヲ蜿門セ�
for (let i = 0; i < links.length; i++) {
links[i].addEventListener('click', function (e) {
const href = e.currentTarget.getAttribute('href'); //href蜿門セ�
const splitHref = href.split('#');
const targetID = splitHref[1];
const target = document.getElementById(targetID); //繝ェ繝ウ繧ッ蜈医�隕∫エ��医ち繝シ繧イ繝�ヨ�牙叙蠕�
if (target) {
smoothScroll(target, smoothOffset);
} else {
return true;
}
return false;
});
}
(function() {
var duration = 800;
var ignore = '.noscroll';
var easing = function (t, b, c, d) { return c * (0.5 - Math.cos(t / d * Math.PI) / 2) + b; }; //jswing
var smoothScrollElm = document.querySelectorAll('a[href^="#"]:not(' + ignore +')');
Array.prototype.forEach.call(smoothScrollElm, function(elm) {
elm.addEventListener('click', function(e) {
e.preventDefault();
var targetElm = document.querySelector(elm.getAttribute('href'));
if(!targetElm) return;
var targetPos = targetElm.getBoundingClientRect().top;
var startTime = Date.now();
var scrollFrom = scrollElm.scrollTop;
(function loop() {
var currentTime = Date.now() - startTime;
if(currentTime < duration) {
scrollTo(0, easing(currentTime, scrollFrom, targetPos, duration));
window.requestAnimationFrame(loop);
} else {
scrollTo(0, targetPos + scrollFrom);
}
})();
})
});
})();
/*page*/
};
if (document.readyState !== 'loading') {
_ready();
} else {
document.addEventListener('DOMContentLoaded', _ready, false);
}