var _ready=function(){ Array.prototype.forEach.call(document.querySelectorAll('[data-lib="4691"]'),function(element){ $(function(){ $('#switch').on('change', function(){ var st = $(window).scrollTop(); if($(this).prop("checked") == true) { $('html').addClass('scroll-prevent'); $('html').css('top', -(st) + 'px'); $('#switch').on('change', function(){ if($(this).prop("checked") !== true) { $('html').removeClass('scroll-prevent'); $(window).scrollTop(st); } }); } }); $('.header_menu a[href]').on('click', function(event) { $('#switch').prop('checked', false); }); $('.header_menu a').on('click', function(){ var st = $(window).scrollTop(); $('html').removeClass('scroll-prevent'); $('html').css('top', -(st) + 'px'); $('.header_menu a').on('change', function(){ }); }); }); });Array.prototype.forEach.call(document.querySelectorAll('[data-lib="4801"]'),function(element){ const swiperR = new Swiper(".swiper_carsr", { loop: true, // ループ有効 slidesPerView: 4, // 一度に表示する枚数 speed: 6000, // ループの時間 allowTouchMove: false, // スワイプ無効 autoplay: { delay: 0, // 途切れなくループ reverseDirection: true, // 逆方向有効化 }, breakpoints: { 720: { slidesPerView: 7, }, }, }); const swiperL = new Swiper(".swiper_carsl", { loop: true, // ループ有効 slidesPerView: 4, // 一度に表示する枚数 speed: 6000, // ループの時間 allowTouchMove: false, // スワイプ無効 autoplay: { delay: 0, // 途切れなくループ }, breakpoints: { 720: { slidesPerView: 7, }, }, }); });Array.prototype.forEach.call(document.querySelectorAll('[data-lib="4901"]'),function(element){ window.addEventListener('load', function calc3_3(){ const ItemList = document.getElementsByClassName('idnum'); for(let i = 0; i < ItemList.length; i++) { var x = ItemList[i].textContent; var Npx = 'NP2' + x; var Rzx ='Rate2' + x; var Np = document.getElementById(Npx).textContent;   //返済回数 var Rz = document.getElementById(Rzx).textContent; var numx = "carprice" + x; var tuki = "tuki" + x; var De = document.getElementById(numx).textContent; //借入金額 var Yp = De / 2; //ボーナス返済額 if(Rz == 0){ var Rr = 0; var Hr = 0; var Nn = Math.floor(Np); // var Bn = Math.floor(Nn / 6); var Mk = De - Yp; var Pm = Mk / Np; var Pb = Yp / Np; var Py = Pm * 12 + Pb * 2; var All = De; var Pm_x = Math.floor(Pm /100)*100; var Pb_x = Math.floor(Pb /100)*100; } else{ var Rr = Rz / 100; //借入利率 var Hr = 0; // var Nn = Math.floor(Np); // var Bn = Math.floor(Nn / 6); // var Mk = De - Yp; var Pm = Math.floor((Mk * Rr / 12 * Math.pow((1 + Rr /12),Nn))/(Math.pow((1 + Rr / 12),Nn)-1)); var Pb = Math.floor((Yp * Rr / 2 * Math.pow((1 + Rr /2),Bn))/(Math.pow((1 + Rr / 2),Bn)-1)); var Py = Pm * 12 + Pb * 2; //年間返済額 var All = (Pm * Nn + Pb * Bn); var Pm_x = Math.floor(Pm /100)*100; var Pb_x = Math.floor(Pb /100)*100; } if (Yp == 0){var Bnk = 0;} else {var Bnk = Bn;} //他社比較 var Rr2 = 0.059; var Pm2 = Math.floor((Mk * Rr2 / 12 * Math.pow((1 + Rr2 /12),Nn))/(Math.pow((1 + Rr2 / 12),Nn)-1)); var Pb2 = Math.floor((Yp * Rr2 / 2 * Math.pow((1 + Rr2 /2),Bn))/(Math.pow((1 + Rr2 / 2),Bn)-1)); var Py2 = Pm2 * 12 + Pb2 * 2; //年間返済額 var All2 = (Pm2 * Nn + Pb2 * Bn) / 10000; var Dif = Math.floor(All2 - All); //他社比較ここまで document.getElementById(tuki).textContent = Math.floor(Pm_x).toLocaleString(); } }) function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } });/*layout:41*/ $(function(){ $('a[href^="#"]').click(function(){ var speed = 500; var href= $(this).attr("href"); var target = $(href == "#" || href == "" ? 'html' : href); var position = target.offset().top; $("html, body").animate({scrollTop:position}, speed, "swing"); return false; }); }); /*page*/ }; if (document.readyState !== 'loading') { _ready(); } else { document.addEventListener('DOMContentLoaded', _ready, false); }