1/** 2 * å ¨ãã¶ã¤ã³ãµã¤ãå ±éJS 3 * @author nagai 4 * @version 1.0 5 */ 6$(function(){ 7 8 // 翻訳ãã«ãã¦ã³ 9 $('.js-btn-lang-select').on('click', function() { 10 var lang = $(this).parent().find('select[name=translate]').val(); 11 window.location.href = lang; 12 }); 13 14 //ã¹ã ã¼ãºã¹ã¯ãã¼ã« 15 $("a[href*='#'].scroll").smoothScroll(); 16 17 //ãã¡ã¤ã«ãªã³ã¯ã¯å¥çªè¡¨ç¤º 18 //$("a[href*='.*']").fileBlank('*') ã»ã¬ã¯ã¿ã§æ¡å¼µåæå® fileBlankã®å¼æ°ã«ã¯ã©ã¹æå®; 19 $("a[href*='.pdf']").fileBlank('pdf'); 20 $("a[href*='.doc']").fileBlank('word'); 21 $("a[href*='.xls']").fileBlank('excel'); 22 23 // ãã¡ã¤ã«ãªã³ã¯ã®ã¯ãªãã¯ã¤ãã³ãè¨æ¸¬ 24 $('.file-link-item a').on('click',function(){ 25 var targetUrl = $(this).attr('href'); 26 var targetLabel = $(this).text(); 27 // gaæªå®ç¾©ã®å ´åã¯å®è¡ããªã 28 if(typeof ga == 'function'){ 29 ga('send', 'event', targetUrl, 'download', targetLabel); 30 } 31 // gtagæªå®ç¾©ã®å ´åã¯å®è¡ããªã(GA4) 32 if(typeof gtag == 'function'){ 33 gtag('event', 'sv_file_link_click', { 34 'event_category': 'file_download_category', 35 'event_label': targetLabel + 'ï¼' + targetUrl, 36 'value': 1 37 }); 38 } 39 }); 40 41 //ãã¼ã«ãªã¼ãã¼ç»å 42 $("img[src*='_off.']").rollOver({off:'_off.',on:'_on.'}); 43 44 45 //tableã®align屿§åé¤ 46 $.fn.tableDeleteAlign(); 47 48 49 // å ã®ãã¼ã¸ã«æ»ããªãã¡ã©ã¼ãèªåã§ã¤ãã 50 $("a[href*=inquiryId]").each(function() { 51 var a = $(this); 52 var url = a.attr("href"); 53 var locaUrl = location.pathname; 54 a.attr("href", url.replace(/(Init\.do\?inquiryId=[0-9]+)/, '$1&ref=www.xxxx.xxxx.xxxx.jp' + locaUrl) ); 55 }); 56 57 58 var location_href = location.href; 59 var now_site_domain; 60 61 if(location_href.indexOf('http://') != -1 || location_href.indexOf('https://') != -1){ 62 var replace_site_domain = site_domain + '/'; 63 var now_site_domain = replace_site_domain.replace( /http:/g , "" ).replace( /https:/g , "" ); 64 }else{ 65 now_site_domain = ''; 66 } 67 68 //æåãµã¤ãºå¤æ´ 69 if ($('.scsize').length) { 70 $.fn.fontSizeSwitch(); 71 } 72 73 //èæ¯è²å¤æ´ 74 if ($('.sccolor').length) { 75 $.fn.bgColorSwitch(); 76 } 77 78 // ãããã¼ããã®ããããã¡ã㥠79 if (typeof $.fn.dropMenu != 'undefined') { 80 $("#header-nav").dropMenu(); 81 } 82 83 // æåãµã¤ãºå¤æ´ç£è¦ 84 $.fn.fontSizeChange({func:function(){ 85 //$("#header-nav .list2").eqGroupHeight(3); 86 $("#wrapper").show(); 87 }}); 88 89 90 //ã¢ã¼ãã«ï¼æ¤ç´¢ï¼ 91 $('.menu-btn-search').lightbox({ 92 modalBg:$('.modal-search-bg'), 93 modal:$('.modal-search'), 94 close:$('.modal-menu-close'), 95 scrollID:'sWrapper', 96 lightSpot:$('.menu-btn-search') 97 }); 98 99 100 //ã¢ã¼ãã«ï¼ã¡ãã¥ã¼ï¼ 101 $('.menu-btn-menu').lightbox({ 102 modalBg:$('.modal-menu-bg'), 103 modal:$('.modal-menu, .menu-btn-menu-close'), 104 close:$('.modal-menu-close, .menu-btn-menu-close'), 105 scrollID:'sWrapper', 106 lightSpot:$('.menu-btn-menu, .menu-btn-menu-close') 107 }); 108 109 110 // ã¹ããã¡ãã¥ã¼å ã®ã¢ã³ã¼ãã£ãªã³ 111 $('.sp-nav .box button').on('click', function() { 112 $(this).parent('.title').parent('li').find('.bloc').slideToggle(); 113 var btn_name = $(this).find('span').text(); 114 if($(this).attr('class') === 'mynus') { 115 $(this).attr('class', 'plus'); 116 $(this).find('span').text(btn_name.replace('éãã', 'éã')); 117 $(this).attr('aria-selected', false); 118 $(this).attr('aria-expanded', false); 119 $(this).parent('.title').parent('li').find('.bloc').attr('aria-hidden', true); 120 } else { 121 $(this).attr('class', 'mynus'); 122 $(this).find('span').text(btn_name.replace('éã', 'éãã')); 123 $(this).attr('aria-selected', true); 124 $(this).attr('aria-expanded', true); 125 $(this).parent('.title').parent('li').find('.bloc').attr('aria-hidden', false); 126 } 127 }); 128 129 // ã¢ã³ã¼ãã£ãªã³(ãããã質åç¨) 130 $('.faq-block').svAccordion({ 131 classHead:'.title',
132 classBody:'.childs', 133 classToggle:'on' 134 }); 135 136 //ã¢ã³ã¼ãã£ãªã³ï¼åéå¥ã§æ¢ãï¼ 137 $('.joho-tab #tab-6 .in2').svAccordion({ 138 classHead:'.title', 139 classBody:'.links', 140 classToggle:'on' 141 }); 142 143 //ã¹ãããã¬ãã¥ã¼ã«å¯¾å¿ 144 $('.no-escape').each(function(){ 145 $(this).html($(this).text()); 146 }); 147 148 149 // ----------------------------------------------------- 150 // wysiwygã®ä¸ã«tableãããã°ãwrapperã¯ã©ã¹ãä»ä¸ãã 151 // ï¼100%ãè¶ ããã¨ãã«wrapperå ã§ã¹ã¯ãã¼ã«ãããããï¼ 152 // ----------------------------------------------------- 153 if ($('.wysiwyg table').length){ 154 $('.wysiwyg table').wrap('<div class="table-wrapper"></div>'); 155 } 156 157 /** 158 IE8,9ã§XMLHttpRequestã®ä»£ããã«XDomainRequestã使ã 159 ãã®ã»ã¯ã·ã§ã³ã¯æ¶ããªãã§ãã ããã 160 */ 161 if ( window.XDomainRequest ) { 162 jQuery.ajaxTransport(function( s ) { 163 if ( s.crossDomain && s.async ) { 164 if ( s.timeout ) { 165 s.xdrTimeout = s.timeout; 166 delete s.timeout; 167 } 168 var xdr; 169 return { 170 send: function( _, complete ) { 171 function callback( status, statusText, responses, responseHeaders ) { 172 xdr.onload = xdr.onerror = xdr.ontimeout = xdr.onprogress = jQuery.noop; 173 xdr = undefined; 174 complete( status, statusText, responses, responseHeaders ); 175 } 176 xdr = new XDomainRequest(); 177 xdr.open( s.type, s.url ); 178 xdr.onload = function() { 179 callback( 200, "OK", { text: xdr.responseText }, "Content-Type: " + xdr.contentType ); 180 }; 181 xdr.onerror = function() { 182 callback( 404, "Not Found" ); 183 }; 184 xdr.onprogress = function() {}; 185 if ( s.xdrTimeout ) { 186 xdr.ontimeout = function() { 187 callback( 0, "timeout" ); 188 }; 189 xdr.timeout = s.xdrTimeout; 190 } 191 xdr.send( ( s.hasContent && s.data ) || null ); 192 }, 193 abort: function() { 194 if ( xdr ) { 195 xdr.onerror = jQuery.noop(); 196 xdr.abort(); 197 } 198 } 199 }; 200 } 201 }); 202 } 203 204 //PCã»ã¹ããåãæ¿ãï¼ã¬ã¹ãã³ã·ãï¼ 205 if( typeof MutualSwitching !== 'undefined') { 206 MutualSwitching.config.setPathSettings({ 207 "/": { 208 "pc_width": 1024, 209 "sp_width": 750, 210 "layout_type": 0 211 } 212 }); 213 MutualSwitching.run.ready(); 214 } 215 216}); 217 218//Page Id search 219$(function(){ 220 $('.page-number-search').each(function(){ 221 var $this = $(this); 222 223 $(window).load(function() { 224 $this.find('.number-search-submit').click(function() { 225 getPageURL(); 226 }); 227 $this.find('.number-search-input').keypress(function(ev) { 228 if ((ev.which && ev.which === 13) || (ev.keyCode && ev.keyCode === 13)) {//Enterãã¼ç¡å¹ 229 getPageURL(); 230 } else { 231 return true; 232 } 233 }); 234 }); 235 236 function getPageURL() { 237 var errorFlag = false; 238 var inputText = $this.find('.number-search-input').val(); // æ¤ç´¢ããIDåå¾ 239 var errorMessage = ''; 240 //ã¨ã©ã¼ãã§ã㯠241 //æ°å¤ãã§ã㯠242 if(inputText.match(/[^0-9]+/)) { 243 errorFlag = true; 244 errorMessage = 'IDçªå·ã¯åè§æ°åã§å ¥åãã¦ãã ããã'; 245 } else if(inputText == '') { 246 errorFlag = true; 247 errorMessage = 'IDçªå·ãå ¥åãã¦ãã ããã'; 248 } 249 250 if(errorFlag) { 251 //ã¨ã©ã¼ã¡ãã»ã¼ã¸è¡¨ç¤º 252 $('.error-message').remove(); 253 $this.find('.number-search-container').append('<p class="error-message">' + errorMessage + '</p>'); 254 } else { 255 /*æ¤ç´¢IDåå¾*/ 256 $.ajax({
257 type: 'get', 258 url: '//' + cms_api_domain + '/v1/page/get_page_contents.json', 259 data: { 260 app_version: cms_app_version, 261 app_id: cms_app_id, 262 token: cms_api_token, 263 page_no: inputText 264 }, 265 dataType : 'json', 266 success: function(data) { 267 if(data.success && data.data) 268 location.href = data.data.page_path;//ç»é¢é·ç§» 269 else { 270 //ã¨ã©ã¼ã¡ãã»ã¼ã¸è¡¨ç¤º 271 $('.error-message').remove(); 272 $this.find('.number-search-container').append('<p class="error-message">該å½ã®ãã¼ã¸ã¯ãããã¾ãã</p>'); 273 } 274 }, 275 error: function(data) { 276 //ã¨ã©ã¼ã¡ãã»ã¼ã¸è¡¨ç¤º 277 $('.error-message').remove(); 278 $this.find('.number-search-container').append('<p class="error-message">ãã¼ã¸ãåå¾ã§ãã¾ããã§ããã</p>'); 279 } 280 }); 281 } 282 } 283 284 }); 285});
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.