1//Common Setting 2var scrollElm = (function () { 3 if (document.scrollingElement) return document.scrollingElement; 4 if (navigator.userAgent.indexOf("WebKit") != -1) return "body"; 5 return document.documentElement; 6})(); 7var requestAnimationFrame = (function(){ 8 return window.requestAnimationFrame || 9 window.webkitRequestAnimationFrame || 10 window.mozRequestAnimationFrame || 11 window.oRequestAnimationFrame || 12 window.msRequestAnimationFrame || 13 function(callback) { 14 window.setTimeout(callback, 1000.0 / 60.0); 15 }; 16})(); 17 18var ua = getDevice(); 19var $cookieOptin; 20 21$(function(){ 22 //cookie policy 23 $cookieOptin = localStorage.getItem("ga_cookie_opt_in"); 24 // if($cookieOptin == "no") { 25 // //UAæ¸ãæã 26 // window["ga-disable-UA-XXXX-Y"] = true; 27 // } else if($cookieOptin == "yes") { 28 // //UAæ¸ãæã 29 // window["ga-disable-UA-XXXX-Y"] = false; 30 // } else { 31 // //UAæ¸ãæã 32 // window["ga-disable-UA-XXXX-Y"] = true; 33 // } 34 if ($html.lang != "ja" && $cookieOptin != "yes") { 35 $("body").append($html.elements.cookie).css({ 36 "padding-bottom": $("#cookie").outerHeight() 37 }); 38 $(document).on("click", "#cookie .cookie-button .link-button, .cookie-close", function() { 39 $("#cookie").fadeOut(300, function() { 40 $(this).remove(); 41 }); 42 $("body").animate({ 43 "padding-bottom": 0 44 }, 300); 45 if ($(this).hasClass("link-button")) { 46 localStorage.setItem("ga_cookie_opt_in", "yes"); 47 } 48 return false; 49 }); 50 } 51 52 $winManager.onresizeSet(); 53 $winManager.onscrollSet(); 54 $(window).resize($winManager.onresizeSet); 55 $(window).scroll($winManager.onscrollSet); 56 57 $("*[href^='#']").not("*[href='#']").on("click", function(){ 58 var _hash = $(this).attr("href"); 59 if ($(_hash).length == 0) return; 60 var _nega_top = ($winManager.pcFlag) ? $winManager.headerH : 0; 61 $(scrollElm).animate({ scrollTop: $(_hash).offset().top - _nega_top}, 500, "swing", function() { 62 $(_hash).attr("tabindex", 0).focus().blur().attr("tabindex", ""); 63 }); 64 return false; 65 }); 66 $("#pageTop").on("click", function(){ 67 $(scrollElm).animate({scrollTop: 0}, 500, "swing", function() { 68 $("body").attr("tabindex", 0).focus().blur().attr("tabindex", ""); 69 }); 70 return false; 71 }); 72 73 //modal 74 $(".js-modal").on("click", function(e){ 75 e.preventDefault(); 76 $("body").append($html.elements.modal); 77 var $wrapper = $("#modalWrapper"); 78 var $contents = $(".modal-contents"); 79 var path = $(this).attr("href"); 80 if(path.match(/\.(jpg|jpeg|png|gif)$/)) { 81 $contents.append($html.elements.media); 82 $wrapper.find(".media-box img").attr("src", path); 83 } else if (path.indexOf("www.youtube.com") > -1) { 84 $contents.append($html.elements.video); 85 $wrapper.find(".video-box iframe").attr("data-src", path); 86 OneTrust.Close(); 87 } 88 $wrapper.addClass("is-open"); 89 }); 90 $(document).on("click", ".js-modalClose", function(){ 91 var $wrapper = $("#modalWrapper"); 92 $wrapper.addClass("is-close").delay(200).queue(function() { 93 $(this).remove(); 94 }); 95 return false; 96 }) 97 .on("click", "#modalWrapper", function() { 98 $(this).find(".js-modalClose").trigger("click"); 99 return false; 100 }) 101 .on("click", ".modal-contents", function(e) { 102 e.stopPropagation(); 103 }); 104 105 //navi 106 $(document).on("click", ".header-globalLink .has-child", function() { 107 var _this = $(this); 108 var _target = _this.next(".header-globalLink-child"); 109 var _bg = $("#header-bg"); 110 var _other_parrent = $(".header-globalLink .has-child").not(_this); 111 var _other_child = $(".header-globalLink-child").not(_target); 112 if (!_target.is(":animated")) { 113 _other_parrent.removeClass("is-open"); 114 _other_child.slideUp(300); 115 _this.toggleClass("is-open"); 116 _target.slideToggle(300); 117 if ($winManager.w > $winManager.tabWide) { 118 if (_this.hasClass("is-open")) { 119 _bg.fadeIn(300); 120 } else { 121 _bg.fadeOut(300); 122 } 123 } 124 } 125 return false;
126 }) 127 .on("click", ".child-button .close-buttton, #header-bg", function() { 128 navClose(); 129 return false; 130 }); 131 132 //nav sp 133 $(document).on("click", "#hamburger a", function() { 134 var _target = $("#toggle-menu"); 135 if (!_target.is(":animated")) { 136 if (!$(this).hasClass("is-open")) { 137 _target.slideDown(300); 138 $(this).addClass("is-open"); 139 $("#header-bg").fadeIn(300); 140 } else { 141 navClose(); 142 } 143 } 144 return false; 145 }); 146 147 //tab 148 $(".tab li a").on("click", function() { 149 var _this = $(this); 150 var _tab = _this.closest(".tab"); 151 var _index = _tab.find("a").index(this); 152 var _target = _tab.next(".js-tab-body"); 153 if (_target.find(".tab-body").eq(_index).length) { 154 _target.find(".tab-body").removeClass("is-active").eq(_index).addClass("is-active"); 155 _tab.find("li").removeClass("is-active").eq(_index).addClass("is-active"); 156 if (_this.closest("li").hasClass("special")) { 157 _tab.addClass("is-special"); 158 } else { 159 _tab.removeClass("is-special"); 160 } 161 return false; 162 } 163 }); 164 165 //more 166 $(".js-more").each(function() { 167 var _view = $(this).data("default-view"); 168 var _index = _view - 1; 169 var _length = $(this).find(".js-moreElements").length; 170 if (_length > _view) { 171 $(this).find(".js-moreElements:gt(" + _index + ")").hide(); 172 $(this).append($html.elements.moreButton); 173 } 174 }); 175 $(document).on("click", ".js-moreButton", function() { 176 var _this = $(this); 177 var _targetWrap = _this.closest(".js-more"); 178 _targetWrap.find(".js-moreElements").show(); 179 _this.hide(); 180 return false; 181 }); 182 183 //more(HTML) 184 $(".js-moreButtonEmbed a").on("click", function() { 185 $(".js-moreButtonEmbed").addClass("is-hide"); 186 $(".js-moreElementsEmbed").addClass("is-show"); 187 return false; 188 }); 189 190 /*--------H2ï½H4ã¸é£çªã¢ã³ã«ã¼ä»ä¸----------*/ 191 tagItems = ['h2','h3','h4']; 192 tagItems.forEach(function(value) { 193 $('#main ' + value).each(function(i) { 194 if ($(this).attr("id") == undefined) { 195 $(this).attr('id','section-' + value + '-' + (i+1)); 196 } 197 }); 198 }); 199 200}); 201 202function navClose() { 203 if ($winManager.pcFlag) { 204 $(".has-child.is-open").next(".header-globalLink-child").slideUp(300).end().removeClass("is-open"); 205 } else { 206 $("#hamburger a").removeClass("is-open"); 207 $("#toggle-menu").slideUp(300); 208 } 209 $("#header-bg").fadeOut(300); 210} 211function getDevice() { 212 var ua = [ 213 "iPod", 214 "iPad", 215 "iPhone", 216 "Android", 217 "Edge" 218 ]; 219 var _ua = navigator.userAgent; 220 if (_ua.match(/(msie|MSIE)/) || _ua.match(/(T|t)rident/)) { 221 return "IE"; 222 } 223 for (var i = 0; i < ua.length; i++) { 224 if (_ua.indexOf(ua[i]) > 0) { 225 return ua[i]; 226 } 227 } 228 return "Other"; 229} 230 231// Window Manager 232var $winManager = { 233 tabWide: 1024, 234 pcFlag: null, 235 switchCheck: null, 236 w: 0, 237 h: 0, 238 headerH: 100, 239 scrollTop: 0, 240 onresizeSet: function() { 241 $winManager.w = window.innerWidth ? window.innerWidth : $(window).width(); 242 $winManager.h = window.innerHeight ? window.innerHeight : $(window).height(); 243 $winManager.switchCheck = $winManager.pcFlag; 244 if ($winManager.w > $winManager.tabWide) { 245 $winManager.pcFlag = true; 246 } else { 247 $winManager.pcFlag = false; 248 } 249 $winManager.headerH = $("#header").height(); 250 if ($winManager.switchCheck != $winManager.pcFlag) { 251 $(".has-child.is-open").next(".header-globalLink-child").hide().end().removeClass("is-open"); 252 $("#hamburger a").removeClass("is-open"); 253 $("#toggle-menu").hide(); 254 $("#header-bg").hide(); 255 } 256 requestAnimationFrame(function() { 257 if ($("#cookie").length) { 258 $("body").css({ 259 "padding-bottom": $("#cookie").outerHeight() 260 }); 261 } 262 }); 263 }, 264 onscrollSet: function () { 265 $winManager.scrollTop = $(window).scrollTop(); 266 if ($winManager.scrollTop > 100) { 267 $("#pageTop").addClass("is-active"); 268 } else { 269 $("#pageTop").removeClass("is-active"); 270 } 271 var _footerLine = $("#footer").offset().top; 272 if ($winManager.scrollTop > _footerLine - $winManager.h + 100) { 273 $("#pageTop").addClass("is-pageBottom"); 274 } else { 275 $("#pageTop").removeClass("is-pageBottom"); 276 } 277 } 278}; 279 280var $html = { 281 lang: $("html").attr("lang"), 282 text: { 283 more: { 284 ja: 'ãã£ã¨è¦ã', 285 en: 'More' 286 }, 287 close: { 288 ja: 'éãã', 289 en: 'Close' 290 }, 291 open: { 292 ja: 'éã', 293 en: 'Open' 294 }, 295 cookieText: { 296 ja: '<p>å½ç¤¾ã®ã¦ã§ããµã¤ãã§ã¯ãã客æ§ã«æé©ãªç¶æ ã§ãå©ç¨ãã¦ããã ãããã¯ããã¼ãå©ç¨ãã¦ãã¾ãããã®ã¾ã¾æ¬ã¦ã§ããµã¤ãããå©ç¨ã«ãªãå ´åãã¯ããã¼ã®ä½¿ç¨ã«åæããã ãããã®ã¨ãããã¾ããã¯ããã¼ã«é¢ããæ å ±ãåæãã
296ãªãå ´åã®è¨å®ã«ã¤ãã¦ã¯ãã¯ããã¼ããªã·ã¼ããã覧ãã ããã</p><p class="cookie-link"><a href="/cookie.html"> ã¯ããã¼ããªã·ã¼</a></p>', 297 en: 'This Website uses cookies. Your consent to the use of cookies is required in case you continue to use this site. For more information click <a href="/english/cookie.html">here</a>.' 298 }, 299 cookieButton: { 300 ja: 'åæãã', 301 en: 'Accept' 302 } 303 } 304}; 305var _htmlElements = { 306 elements: { 307 moreButton: '<p class="align-center"><a href="#more" id="more" class="link-button more js-moreButton"><span>' + $html.text.more[$html.lang] + '</span></a></p>', 308// cookie: '<div id="cookie"><div class="inner"><div class="cookie-text">' + $html.text.cookieText[$html.lang] + '</div><p class="cookie-button"><a href="#" class="link-button"><span>' + $html.text.cookieButton[$html.lang] + '</span></a></p><a href="#" class="cookie-close"></a></div></div>', 309 modal: '<div id="modalWrapper"><div class="modal"><div class="modal-contents"><div class="modal-close-link"><a href="#" class="js-modalClose">' + $html.text.close[$html.lang] + '</a></div>', 310 media: '<div class="media-box mb-0"><div><div class="media"><img src="" alt=""></div></div></div>', 311 video: '<div class="video-box mb-0"><div class="video"><iframe data-src="" class="optanon-category-C0004" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div></div>' 312 } 313}; 314$.extend(true, $html, _htmlElements); 315 316// window.addEventListener("DOMContentLoaded", function() { 317// $cookieOptin = localStorage.getItem("ga_cookie_opt_in"); 318// if($cookieOptin == "no") { 319// //UAæ¸ãæã 320// window["ga-disable-UA-XXXX-Y"] = true; 321// } else if($cookieOptin == "yes") { 322// //UAæ¸ãæã 323// window["ga-disable-UA-XXXX-Y"] = false; 324// } else { 325// //UAæ¸ãæã 326// window["ga-disable-UA-XXXX-Y"] = true; 327// } 328// });
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.