1 /** 2 * ã¡ã¤ã³å¦çã 3 */ 4$(function(){ 5 6 // ã¹ããçã®å ´åã 7 if (isSumaho()) { 8 9 setsumahomenu(); 10 11 // äºç´ã·ã¹ãã ã®ãªã³ã¯ãã¹ããç¨ã«æ¸ãæããã 12 var urlPC = 'https://asp.hotel-story.ne.jp/ver3d/planlist.asp?hcod1=62670&hcod2=001'; 13 var planPC = 'https://asp.hotel-story.ne.jp/ver3d/ASPP0200.asp?hidSELECTCOD1=62670&hidSELECTCOD2=001&hidSELECTPLAN='; 14 var urlSumaho = 'http://asp.hotel-story.ne.jp/ktai/ZKETAI0000.asp?cod1=62670&cod2=001&guid=on'; 15 var planSumaho = 'http://asp.hotel-story.ne.jp/ktai/ZKETAI0110.asp?cod1=62670&cod2=001&hcod=&reffrom=direct&guid=on&ppln='; 16 $('a[target="_blank"]').each(function(){ 17 var href = $(this).attr('href'); 18 if (href.startsWith(urlPC)) { 19 $(this).attr('href', href.replace(urlPC, urlSumaho)); 20 } else if (href.startsWith(planPC)) { 21 $(this).attr('href', href.replace(planPC, planSumaho)); 22 } 23 }); 24 25/** 26 * [description] 27 * ã¢ã³ã¼ãã£ãªã³æ¼ä¸æ 28 */ 29 $('.sumaho-acc-wrap').on('click',function(){ 30 $(this).children('.sumaho-acc').toggleClass('on'); 31 $(this).next('.sumaho-acc-contents').slideToggle(); 32 }); 33 34 35 $('.header-menu').on('click', function () { 36 const icon = $(this); 37 const menu = $('.menu'); 38 39 icon.toggleClass('on'); 40 41 if (icon.hasClass('on')) { 42 menu.show(); 43 } else { 44 menu.hide(); 45 } 46 }); 47 48 } 49 50 if (!isSumaho()) { 51 $('#image_path').after($('#topicpath')); 52 } 53 54 $('.lunchflexslider').flexslider({ 55 selector:'.slider > li' 56 }); 57 58 // ã¹ããçã®å ´åã 59 /* 60 if (isSumaho()) { 61 62 // ç»åãªãµã¤ãºãéãã 63 var w = (document.all ? document.body.clientWidth : window.innerWidth); 64 var iw = w * 1.5; 65 $('img.resize').each(function(){ 66 var src = $(this).attr('src'); 67 $(this).attr('src', '/image.php?width=' + iw + '&image=' + absolutePath(src)); 68 }); 69 } 70 */ 71 72 // æåãµã¤ãºã¡ãã¥ã¼ã追å ããã 73 //createFontSizeMenu(); 74 //setFontSize($.cookie('font-size')); 75 76 // ãããã¼ãåºå®ããã 77 fixedHeader(); 78 79 var r = (document.all ? document.body.clientWidth : window.innerWidth); 80 if (isIE6() || isSumaho() || isTablet() || r <= 768) { 81 } else { 82 if (location.hash) { 83 setTimeout(function(){ 84 window.scrollBy(0, -190); 85 },200); 86 } 87 } 88 89 // ããã¼ããã«ãè¨å®ããã 90 //setHoverPane(); 91 setTimeout("setHoverPane()", 500); 92 93 // ãµã ãã¤ã«ã¯ãªãã¯ã§å¤§ããç»åãåæ¿ã 94 $('.thumb').each(function(){ 95 var me = $(this); 96 var img = me.find('>.inimg img'); 97 me.find('a').click(function(){ 98 img.attr('src', $(this).attr('href')); 99 return false; 100 }); 101 }); 102 103// setSumahoReservation(); 104 105$(window).on('resize',function(){ 106 // setSumahoReservation(); 107}); 108 109 // è¨èªã®é¸æã¡ãã¥ã¼ã追å ããã 110 //setLangMenu(); 111 112 // ã«ã«ã¼ã»ã«ãè¨å®ããã 113 setCarousel(); 114 115 // ã¹ã¯ãã¼ã«ãã¤ã³ãè¨å®ããã 116 setScrollPane(); 117 118 // ã«ã«ã¼ã»ã«ä»ãã®ã£ã©ãªã¼ãè¨å®ããã 119 setGallery(); 120 121 // ã¹ã ã¼ã¹ã¹ã¯ãã¼ã«ãè¨å®ããã 122 setSmoothScroll(); 123 124 // ç»åããã¼ã®ãã¤ã©ã¤ããè¨å®ããã 125 setHighLight(); 126 127 // fancyboxãã©ã°ã¤ã³ã§ãããã¢ãã表示ãè¨å®ããã 128 setFancybox(); 129 130 // ãã¼ã«ãªã¼ãã¼ã®ç»åå ¥æ¿ãè¨å®ããã 131 setRollover(); 132 133 setTab(); 134 135/* 136 if (isSumaho() && (!$('body').hasClass('home') || $('body').hasClass('blog'))) { 137 $('#sumaho_nav>ul').slideUp(); 138 $('#footer_link').slideUp(); 139 $('#sumaho_nav>div>a').click(function(){ 140 $('#sumaho_nav>div>a img').toggle(); 141 $('#sumaho_nav>ul').slideToggle(); 142 $('#footer_link').slideToggle(); 143 return false; 144 }); 145 } 146*/ 147 148 if (isSumaho()) { 149 $('table.oneline').each(function(){ 150 var me = $(this); 151 me.find('tr').each(function(){ 152 var tr = $(this); 153 tr.before($('<tr>').append(tr.find('th'))); 154 }); 155 }); 156 } 157 158 $('input[type="submit"]').button(); 159 160 // ã¡ã¬ã¡ãã¥ã¼ãè¨ç½®ã»è¨å®ããã 161 setMegaMenu(); 162 163 // ãã¼ã¸ã¿ã¤ãã«ç»åã«æåã追å ããã 164 //setPageTitle(); 165 166 // èªã¿è¾¼ã¿åã®ç®é ããæ¶ãã 167 setTimeout(function(){ 168 $(window).resize(); 169 $('#preloader').fadeOut(500, function() { 170 if (!(isSumaho() || isTablet())) { 171 if ($('#top_slide_movie').length) { 172 var v = document.getElementById('top_movie'), 173 h = $('#top_slide_movie').next().find('img').height();//åç»é«ã次ã®ã¹ã©ã¤ãã¼ç»åã«ãããã 174 $('#slides video').height(h); //åç»é«ãè¨å® 175 v.volume = 0; //åæããªã¥ã¼ã 0 176 v.play(); //åç»åç 177 } 178 } 179 }); 180 }, 500); 181 182 $('#movie_volume').on('click',function(){ 183 var movie_el = document.getElementById('top_movie'); 184 $(this).toggleClass('off'); 185 movie_el.volume = $(this).hasClass('off') ? 0 : 1 ; 186 }); 187 188/** 189 * [description] 190 * ã¹ã©ã¤ãã¼ããã²ã¼ã·ã§ã³æ¼ä¸æä¸çªç®ã®åç»ã鏿ããæåç»åå®è¡ 191 */ 192 $('#slides').on('click','.flex-control-nav li',function(){ 193 if($('#top_slide_movie').hasClass('flex-active-slide')){//鏿ããã¹ã©ã¤ãã¼ãåç»ã®æ 194 var v = document.getElementById('top_movie'); 195 v.currentTime=0; //åçæé 0ç§è¨å® 196 v.play(); // åç»åå®è¡ 197 } 198 }); 199 200}); 201 202/*================================================================================*/ 203 204// ããã¼ããã«ãè¨å®ããã 205function setHoverPane() { 206 207 // ã¢ãã¡ã¼ã·ã§ã³ã®é度ã¨åä½ã
208 var duration = 'normal'; 209 var easing = 'easeInOutQuad'; 210 var tag = 0; 211 212 // ã«ãã¼é¨åï¼è²ä»ãã®èæ¯ï¼ã®divã追å ããã 213 $('div.pane-box').each(function(){ 214 var me = $(this); 215 var pane = me.find('>div.pane'); 216 var cover = $('<div class="cover"></div>'); 217 pane.before(cover); 218 me.css({'overflow':'hidden'}); 219 pane.css({'position':'absolute','background-color':'transparent'}); 220 }); 221 222 // ã«ãã¼ã¨ããã«ããã£ããããimgãµã¤ãºã«åãããã 223 $(window).resize(function(){ 224 $('div[class*=ani-]').each(function(){ 225 var me = $(this); 226 var pane = me.find('>div.pane'); 227 var cover = me.find('>div.cover'); 228 var img = me.find('>img'); 229 var ani = me.attr('class').match(/ani-(.{2,2})/); 230 var ani = ani[1]; 231 232 me.height(img.height()); 233 pane.width(img.width()); 234 pane.height(img.height()); 235 cover.width(img.width()); 236 cover.height(img.height()); 237 238 var css = { 239 'lr': {right: me.width() - tag}, 240 'rl': {left: me.width() - tag}, 241 'tb': {bottom: me.height() - tag}, 242 'bt': {top: me.height() - tag} 243 }; 244 245 pane.css(css[ani]); 246 cover.css(css[ani]); 247 }); 248 }).resize(); 249 250 // ã¹ã©ã¤ãã¢ãã¡ã¼ã·ã§ã³ãè¨å®ããã 251 $('div[class*=ani-]').each(function(){ 252 var me = $(this); 253 var pane = me.find('>div.pane'); 254 var cover = me.find('>div.cover'); 255 var img = me.find('>img'); 256 var ani = me.attr('class').match(/ani-(.{2,2})/); 257 var ani = ani[1]; 258 259 me.mouseenter(function(){ 260 var css = { 261 'lr': {right:0}, 262 'rl': {left:0}, 263 'tb': {bottom:0}, 264 'bt': {top:0} 265 }; 266 pane.stop().animate(css[ani], duration, easing); 267 cover.stop().animate(css[ani], duration, easing); 268 }); 269 270 me.mouseleave(function(){ 271 var css = { 272 'lr': {right: me.width() - tag}, 273 'rl': {left: me.width() - tag}, 274 'tb': {bottom: me.height() - tag}, 275 'bt': {top: me.height() - tag} 276 }; 277 pane.stop().animate(css[ani], duration, easing); 278 cover.stop().animate(css[ani], duration, easing); 279 }); 280 }); 281 282} 283 284// 絶対ãã¹ãè¿ãã 285var doc = document; 286function absolutePath(path){ 287 var e = doc.createElement('span'); 288 e.innerHTML = '<a href="' + path + '" />'; 289 return e.firstChild.href; 290} 291 292// ã«ã«ã¼ã»ã«ãè¨å®ããã 293function setCarousel(){ 294 if (typeof $.fn.bxSlider != 'function') return; 295 if (!isSumaho()) { 296 $('.carousel ul').bxSlider({ auto: true, minSlides: 4, maxSlides: 4, moveSlides: 1, slideWidth: 230, slideMargin: 20}); 297 } else { 298 $('.carousel ul').bxSlider({ auto: true, minSlides: 1, maxSlides: 1, moveSlides: 1, slideWidth: 230, slideMargin: 20}); 299 } 300} 301 302// ã¹ã¯ãã¼ã«ãã¤ã³ãè¨å®ããã 303function setScrollPane(){ 304 if (typeof $.fn.jScrollPane != 'function') return; 305 $('.scrollpane').jScrollPane().removeClass('scrollpane'); 306} 307 308// ã«ã«ã¼ã»ã«ä»ãã®ã£ã©ãªã¼ãè¨å®ããã 309function setGallery(){ 310 // ã¹ã©ã¤ãã·ã§ã¼ 311 $('.gallery').flexslider({ 312 animation: 'slide', 313 directionNav: true, 314 controlNav: true, 315 prevText: '', 316 nextText: '', 317 //initDelay: 2000, 318 slideshowSpeed: 6000, 319 pauseOnHover: true 320 }); 321 $('.gallery100p').flexslider({ 322 animation: 'slide', 323 directionNav: true, 324 controlNav: true, 325 prevText: '', 326 nextText: '', 327 //initDelay: 2000, 328 slideshowSpeed: 6000, 329 pauseOnHover: true 330 }); 331 332/* 333 if (typeof $.fn.bxSlider != 'function') return; 334 $('div.gallery ul').bxSlider({ 335 auto: true, minSlides: 12, maxSlides: 12, moveSlides: 1, slideWidth: 100, slideMargin: 10, 336 onSlideBefore: function ($slideElement, oldIndex, newIndex) { 337 var a = $slideElement.children(); 338 var src = a.attr('href'); 339 var img = a.parents('div.gallery').find('div.mainimage img'); 340 $('div.mainimage').css('background','url(' + src + ') no-repeat left top'); 341 $('div.mainimage').css('background-size','100%'); 342 img.fadeTo('slow', 0.01, function(){ 343 img.attr('src', src); 344 img.fadeTo('fast', 1.00); 345 }); 346 }, 347 onSliderLoad: function(){ 348 $('div.gallery .bx-viewport a').each(function(){ 349 var a = $(this); 350 a.click(function(){ 351 var src = a.attr('href'); 352 var img = a.parents('div.gallery').find('div.mainimage img'); 353 $('div.mainimage').css('background','url(' + src + ') no-repeat left top'); 354 $('div.mainimage').css('background-size','100%'); 355 img.fadeTo('fast', 0.01, function(){ 356 img.attr('src', src); 357 img.fadeTo('fast', 1.00); 358 }); 359 return false;
360 }); 361 }) 362 } 363 }); 364*/ 365} 366 367/*================================================================================*/ 368 369// ã¹ããããPCãµã¤ãã®å ´åã«URLãã©ã¡ã¼ã¿ä»ä¸ã 370function fromS(){ 371 if (location.search == '?from=s') { 372 $('a').each(function(){ 373 var me = $(this); 374 var href = me.attr('href'); 375 if (href == null || href.startsWith('#') || href.endsWith('?from=s')) return; 376 me.attr('href', href + '?from=s'); 377 }); 378 } 379} 380 381// ãããã¼ãåºå®ããã 382function fixedHeader(){ 383 384 var timer = false; 385 $(window).resize(function(){ 386 if (timer !== false) clearTimeout(timer); 387 timer = setTimeout(function(){ 388 389 // IE6ãã¹ãããã¿ãã¬ããã¯åºå®ããªãã 390 var r = (document.all ? document.body.clientWidth : window.innerWidth); 391 if (isIE6() || isSumaho() || isTablet() || r <= 768) { 392 $('body').removeClass('fixed'); 393 $('#nav,#slides,#image_path').removeClass('fixed'); 394 // $(window).unbind('scroll'); 395 } else { 396 //$('body').addClass('fixed'); 397 $('#nav,#slides,#image_path').addClass('fixed'); 398 399 var body = $('body'); 400 var nav = $('#nav'); 401 /* 402 var offtop = nav.offset().top + 98; 403 offtop = 98; 404 */ 405 var offtop = 98; 406 407 $(window).scroll(function(e){ 408 var top = $(this).scrollTop(); 409 //console.info('top:' + top + ' > offtop:' + offtop); 410 if (top > offtop) { 411 body.addClass('fixed'); 412 } else { 413 body.removeClass('fixed'); 414 } 415 }); 416 417 } 418 419 // $('#page_top').css('right', parseInt(($(window).width()-$('#footer_reservation_form').width())/2-$('#page_top').width()-20) + 'px'); 420 421 if (!isSumaho()){ 422 $('#weather').css('right', parseInt(($(window).width()-$('#header_inner').width())/2) + 'px'); 423 } 424 425 // IEãªã#imageã®ç»åããªãµã¤ãºãã 426 var w = 1200, 427 h = 240; 428 if(_ua().indexOf('ie') >= 0 && $('#image').width(document.documentElement.clientWidth) < w){ 429 $('#image').width(document.documentElement.clientWidth); 430 $('#image').height(parseInt(h * (document.documentElement.clientWidth / w))); 431 $('#image_page_title').width(document.documentElement.clientWidth); 432 $('#image_page_title').height(parseInt(h * (document.documentElement.clientWidth / w))); 433 } 434 435 },200); 436 }).resize(); 437} 438 439// ã¹ãã¼ããã©ã³ç«¯æ«ãã©ãã確èªããã 440function isSumaho(){ 441 var ua = navigator.userAgent; 442 var ip = ((ua.indexOf('iPhone') > 0 && ua.indexOf('iPad') == -1) || ua.indexOf('iPod') > 0); 443 var ad = (ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0); 444 var etc = (ua.indexOf('Windows Phone') > 0 || ua.indexOf('BlackBerry') > 0); 445 var w = (document.all ? document.body.clientWidth : window.innerWidth); 446 return ip || ad || etc || w <= 598; 447} 448 449// ã¿ãã¬ãã端æ«ãã©ãã確èªããã 450function isTablet(){ 451 var ua = navigator.userAgent; 452 var ip = (ua.indexOf('iPad') > 0); 453 var ad = (ua.indexOf('Android') > 0 && ua.indexOf('Mobile') == -1); 454 return ip || ad; 455} 456 457// iPadãã©ãã確èªããã 458function isIpad(){ 459 var ua = navigator.userAgent; 460 var ip = (ua.indexOf('iPad') > 0); 461 return ip; 462} 463 464// IE6ãã©ããã確èªããã 465function isIE6(){ 466 return !!$.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest; 467} 468 469/** 470 * JSONPã©ããã¼ã 471 */ 472function jsonp(url, callback, ttl, encoding) { 473 // ãããã·ã®URLã 474 //var proxy = 'http://www.omotenashi-contents.jp/' + 'proxy/index.php?'; 475 var proxy = 'https://www.takinoyu.co.jp/' + 'proxy/index.php?'; 476 ttl = ttl || 60; 477 encoding = encoding || 'UTF-8'; 478 $.getJSON(proxy + 'callback=?', { 'url' : url, 'encoding' : encoding, 'ttl' : ttl, 'curl' : 1 }, callback); 479} 480 481/** 482 * ç¸å¯¾ãã¹ãè¿ãã 483 */ 484function getRelPath(){ 485 486 var href = $('link[rel="shortcut icon"]').attr('href'); 487 var path = ''; 488 489 //console.info(href); 490 //console.info(location); 491 492 if (href.startsWith('http')) { 493 var s = location.pathname.split('/'); 494 path = '../'.repeat(s.length - 2); 495 } else { 496 href.match(/^([\./]+)/); 497 path = RegExp.$1; 498 } 499 500 //console.info(path); 501 return path; 502} 503 504// Firefoxã ãsrcã¨hrefã«ãã³ãã¬ã¼ã夿°ãè¨å®ã§ããªãä»¶ã®å¯¾å¿ã 505function title2attr(){ 506 $('[title^="@@"]').each(function(){ 507 var me = $(this); 508 var url = me.attr('title').replace(/^@@/,''); 509 switch (me.get(0).tagName.toLowerCase()) { 510 case 'a': 511 me.get(0).href = url; 512 break; 513 case 'img': 514 me.get(0).src = url; 515 break; 516 } 517 me.removeAttr('title'); 518 }); 519} 520 521// å¹´ææ¥ã®å½¢å¼ã«å¤æããã 522function nengappi(val, day){ 523 if (day) { 524 return Date.create(val).format('{yyyy}å¹´{M}æ{d}æ¥({dow})', 'ja').replace('ææ¥',''); 525 } else { 526 return Date.create(val).format('{yyyy}å¹´{M}æ{d}æ¥', 'ja'); 527 } 528} 529 530/** 531 * ãã³ãã¬ã¼ããèªã¿è¾¼ãã 532 */ 533function loadTemplate(id, cb){ 534 535 // ãã³ãã¬ã¼ãã®ãã¹ãè¨å®ããã 536 var tpldir = getRelPath() + 'common/js/' + id + '/'; 537 538 // ãã³ãã¬ã¼ããèªã¿è¾¼ãã 539 $.ajax({ 540 url : tpldir + id + '.html', dataType : 'html', 541 error : function(XMLHttpRequest, textStatus, errorThrown){ 542 //console.info(XMLHttpRequest); 543 //console.info(textStatus); 544 //console.info(errorThrown); 545 var errmsg = [ 546 XMLHttpRequest.status, 547 XMLHttpRequest.statusText, 548 errorThrown.result, 549 errorThrown.name, 550 errorThrown.message 551 ].join("\n"); 552 //alert(errmsg); 553 }, 554 success : cb 555 }); 556} 557 558// ãã³ãã¬ã¼ãã«åå®è¡ã 559function forTemplate(){ 560 var isIE6 = !!$.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest; 561 if (isIE6) { DD_belatedPNG.fix('.png'); } 562 setHighLight(); 563 setFancybox(); 564 setRollover(); 565} 566 567/** 568 * xmlæååãXMLããã¥ã¡ã³ãã§è¿ãã 569 */ 570function parseFromString(xmlstr){ 571 572 var isIE = /*@cc_on!@*/false; 573 var xml = null; 574 var xmldom; 575 576 if (!isIE && window.DOMParser) { 577 578 //alert('window.DOMParser'); 579 xmldom = new DOMParser(); 580 xmldom.async = false;
581 var dom = xmldom.parseFromString(xmlstr, 'application/xml'); 582 if (!dom) return xml; 583 xml = dom.documentElement; 584 585 } else if (window.ActiveXObject) { 586 587 //alert('Microsoft.XMLDOM'); 588 //xmldom = new ActiveXObject('Microsoft.XMLDOM'); 589 //alert('MSXML2.DOMDocument'); 590 xmldom = new ActiveXObject('MSXML2.DOMDocument'); 591 //alert('Msxml2.DOMDocument.3.0'); 592 //xmldom = new ActiveXObject('Msxml2.DOMDocument.3.0'); 593 594 xmldom.async = false; 595 xmldom.loadXML(xmlstr); 596 597 if (xmldom.parseError.errorCode != 0) { 598 var xmlerr = xmldom.parseError; 599 //alert(xmlerr.reason); 600 } else { 601 xml = xmldom.documentElement; 602 } 603 } 604 605 return xml; 606} 607 608/** 609 * ãã¼ã«ãªã¼ãã¼ã§_onã®ãã¡ã¤ã«ã«å·®ãæ¿ããã 610 */ 611function setRollover() 612{ 613 $('img.rollover').each(function(){ 614 var me = $(this); 615 var src = me.attr('src'); 616 617 if (!src) return; 618 619 var img = src.match(/(\w*\.\w*?)$/ig).pop(); 620 621 //var on_src = src.replace(/\.(\w*?)$/, function(){ return '_on.' + RegExp.$1; }); 622 var on_src = src.replace(img, img.replace('.','_on.')); 623 624 me.hover(function(){ 625 $(this).attr('src', on_src); 626 },function(){ 627 $(this).attr('src', src); 628 }).removeClass('rollover'); 629 }); 630} 631 632/** 633 * bodyã¿ã°(ãã¼ã¸å ¨ä½ãæå³ãã)ã®æåãµã¤ãºãè¨å®ããCookieã«ä¿åããã 634 * 635 * @param size String: CSSã®font-sizeã«æå®ããæååã 636 */ 637function setFontSize(size) 638{ 639 size = size || '1.4em'; 640 $('body').css('font-size', size); 641 $.cookie('font-size', size, {expires:365,path:'/'}); 642 if (size == '1.4em') { 643 $('li#font_size_normal a').addClass('current'); 644 $('li#font_size_zoom a').removeClass('current'); 645 } else { 646 $('li#font_size_normal a').removeClass('current'); 647 $('li#font_size_zoom a').addClass('current'); 648 } 649 return false; 650}; 651 652/** 653 * ãããã¼ã«ãã©ã³ããµã¤ãºã®ã¡ãã¥ã¼ã追å ããã 654 */ 655function createFontSizeMenu() 656{ 657 var ul = $('<ul id="header_font_size" class="notablet"></ul>'); 658 ul.append($('<li id="font_size"><span class="reader">ãã©ã³ããµã¤ãº</span></li>')); 659 var a = $('<a href="index.html" class="noscroll"><span class="reader"></span></a>').css('cursor','pointer'); 660 ul.append($('<li id="font_size_normal" class="btn"></li>').append(a.clone().find('span').text('æ¨æº').end().click(function(){ return setFontSize('1.4em'); }))); 661 ul.append($('<li id="font_size_zoom" class="btn"></li>').append(a.clone().find('span').text('æ¡å¤§').end().click(function(){ return setFontSize('1.6em'); }))); 662 $('#header_inner').append(ul); 663} 664 665/** 666 * ã¡ã¬ã¡ãã¥ã¼ãè¨ç½®ã»è¨å®ããã 667 */ 668function setMegaMenu() 669{ 670 // ã¡ã¬ã¡ãã¥ã¼è¨ç½® 671 var rel = getRelPath(); 672 673 var nav_menu = ([ 674 '<div class="nav_menu_inner" id="menu_nav_meals">', 675 ' <div>', 676 ' <table summary="ãé£äº">', 677 ' <tr>', 678 ' <td><a href="' + rel + 'meals/index.html"><img src="' + rel + 'common/img/menu_nav_meals_01.jpg" class="fit highlight" alt="ãé£äº(TOP)" /></a></td>', 679 ' <td><a href="' + rel + 'meals/viking.html"><img src="' + rel + 'common/img/menu_nav_meals_02.jpg" class="fit highlight" alt="ã¨ã«ãã¼ã¸ã¥" /></a></td>', 680 ' <td><a href="' + rel + 'meals/japanese.html"><img src="' + rel + 'common/img/menu_nav_meals_03.jpg" class="fit highlight" alt="御å å°è·¯" /></a></td>', 681 ' <td><a href="' + rel + 'cafebar/index.html"><img src="' + rel + 'common/img/menu_nav_meals_04.jpg" class="fit highlight" alt="ã«ã¹ã±ã¼ã" /></a></td>', 682 ' <td><a href="' + rel + 'meals/kaiseki.html"><img src="' + rel + 'common/img/menu_nav_meals_05.jpg" class="fit highlight" alt="å®´ä¼" /></a></td>', 683 ' </tr>', 684 ' </table>', 685 ' </div>', 686 '</div>' 687 ].join('')); 688 $('#nav_meals').append(nav_menu); 689 nav_menu = ''; 690 691 var nav_menu = ([ 692 '<div class="nav_menu_inner" id="menu_nav_hotspa">', 693 ' <div>', 694 ' <table summary="温æ³">', 695 ' <tr class="tc">', 696 ' <td><a href="' + rel + 'hotspa/index.html"><img src="' + rel + 'common/img/menu_nav_hotspa_01.jpg" class="fit highlight" alt="温æ³(TOP)" /></a></td>', 697 ' <td><a href="' + rel + 'hotspa/keiryu.html"><img src="' + rel + 'common/img/menu_nav_hotspa_02.jpg" class="fit" alt="æ¸æµé²å¤©é¢¨å æ£æ¹¯" /></a></td>', 698// ' <td><p><img src="' + rel + 'common/img/menu_nav_hotspa_03.jpg" class="fit" alt="ä¿¡çé天風å" /></p></td>', 699 ' <td><a href="' + rel + 'hotspa/garden.html"><img src="' + rel + 'common/img/menu_nav_hotspa_03.jpg" class="fit highlight" alt="åºåå¤§æµ´å ´" /></a></td>', 700 ' <td><a href="' + rel + 'hotspa/kashikiriroten.html"><img src="' + rel + 'common/img/menu_nav_hotspa_04.jpg" class="fit highlight" alt="貸åé²å¤©é¢¨å" /></a></td>', 701 ' <td>
701<a href="' + rel + 'hotspa/dayuse.html"><img src="' + rel + 'common/img/menu_nav_hotspa_05.jpg" class="fit highlight" alt="æ¥å¸°ãå ¥æµ´" /></a></td>', 702 ' </tr>', 703 ' </table>', 704 ' </div>', 705 '</div>' 706 ].join('')); 707 $('#nav_hotspa').append(nav_menu); 708 nav_menu = ''; 709 710 var nav_menu = ([ 711 '<div class="nav_menu_inner" id="menu_nav_rooms">', 712 ' <div>', 713 ' <table summary="ãé¨å±">', 714 ' <tr>', 715// ' <!-- <td><a href="' + rel + 'rooms/index.html"><img src="' + rel + 'common/img/menu_nav_rooms_01.jpg" class="fit highlight" alt="ãé¨å±(TOP)" /></a></td> -->', 716 ' <td><a href="' + rel + 'rooms/riverfront.html"><img src="' + rel + 'common/img/menu_nav_rooms_07.jpg" class="fit highlight" alt="ãªãã¼ããã³ããã©ã¹" /></a></td>', 717 ' <td><a href="' + rel + 'rooms/skyconfort.html"><img src="' + rel + 'common/img/menu_nav_rooms_08.jpg" class="fit highlight" alt="ã¹ã«ã¤ã³ã³ãã©ã¼ãããã¢" /></a></td>', 718 ' <td><a href="' + rel + 'rooms/children.html"><img src="' + rel + 'common/img/menu_nav_rooms_09.jpg" class="fit highlight" alt="ãåæ§é£ãã«" /></a></td>', 719 ' <td><a href="' + rel + 'rooms/couple.html"><img src="' + rel + 'common/img/menu_nav_rooms_02.jpg" class="fit highlight" alt="ã夫婦ã»ã«ããã«ã«" /></a></td>', 720 ' <td><a href="' + rel + 'rooms/family.html"><img src="' + rel + 'common/img/menu_nav_rooms_03.jpg" class="fit highlight" alt="ãå®¶æã»ã°ã«ã¼ãã«" /></a></td>', 721// ' <td><a href="' + rel + 'rooms/single.html"><img src="' + rel + 'common/img/menu_nav_rooms_05.jpg" class="fit highlight" alt="ãä¸äººãã¾ã«" /></a></td>', 722 ' <td><a href="' + rel + 'rooms/universal.html"><img src="' + rel + 'common/img/menu_nav_rooms_06.jpg" class="fit highlight" alt="ã¢ã¯ã»ã·ãã«" /></a></td>', 723 ' </tr>', 724 ' </table>', 725 ' </div>', 726 '</div>' 727 ].join('')); 728 $('#nav_rooms').append(nav_menu); 729 nav_menu = ''; 730 731 var nav_menu = ([ 732 '<div class="nav_menu_inner" id="menu_nav_facilities">', 733 ' <div>', 734 ' <table summary="é¤¨å æ½è¨">', 735 ' <tr>', 736 ' <td><a href="' + rel + 'facilities/index.html"><img src="' + rel + 'common/img/menu_nav_facilities_01.jpg" class="fit highlight" alt="é¤¨å æ½è¨(TOP)" /></a></td>', 737 ' <td><a href="' + rel + 'facilities/relaxationsalon.html"><img src="' + rel + 'common/img/menu_nav_facilities_06.jpg?202606" class="fit highlight" alt="ã¨ã¹ã" /></a></td>', 738// ' <td><a href="' + rel + 'facilities/relaxationsalon.html"><img src="' + rel + 'common/img/menu_nav_facilities_02.jpg" class="fit highlight" alt="温æ³éã" /></a></td>', 739 ' <td><a href="' + rel + 'facilities/relaxation.html"><img src="' + rel + 'common/img/menu_nav_facilities_05.jpg" class="fit highlight" alt="ãªã©ã¯ã¼ã¼ã·ã§ã³" /></a></td>', 740 ' <td><a href="' + rel + 'kidspark/index.html"><img src="' + rel + 'common/img/menu_nav_facilities_04.jpg" class="fit highlight" alt="è¼ç§ãããºãã¼ã¯" /></a></td>', 741 ' <td><a href="' + rel + 'fishingpark/"><img src="' + rel + 'common/img/menu_nav_facilities_07.jpg" class="fit highlight" alt="è¼ç§ãã£ãã·ã³ã°ãã¼ã¯" /></a></td>', 742 ' <td><a href="' + rel + 'facilities/baby.html"><img src="' + rel + 'common/img/menu_nav_facilities_03.jpg" class="fit highlight" alt="赤ã¡ããåããµã¼ãã¹" /></a></td>', 743// ' <td><a href="http://tateshinatakinoyu.blog.fc2.com/blog-category-11.html" target="_blank"><img src="' + rel + 'common/img/menu_nav_facilities_03.jpg" class="fit highlight" alt="売åºããã°ï½ãã¾ã³ãã ããï½" /></a></td>', 744 ' </tr>', 745 ' </table>', 746 ' </div>', 747 '</div>' 748 ].join('')); 749 $('#nav_facilities').append(nav_menu); 750 nav_menu = ''; 751 752 753 var nav_menu = ([ 754 '<div class="nav_menu_inner" id="menu_nav_sightseeing">', 755 ' <div>', 756 ' <table summary="è¦³å æ å ±">', 757 ' <tr>', 758// ' <td><a href="' + rel + '100th/index.html"><img src="' + rel + 'common/img/menu_nav_sightseeing_002.jpg" class="fit highlight" alt="嵿¥100å¨å¹´è¨å¿µ" /></a></td>', 759 ' <td><a href="' + rel + 'event/index.html"><img src="' + rel + 'common/img/menu_nav_event_01.jpg" class="fit highlight" alt="ããã«ã¤ãã³ã" /></a></td>', 760 ' <td><a href="' + rel + 'sightseeing/index.html"><img src="' + rel + 'common/img/menu_nav_event_02.jpg" class="fit highlight" alt="è¦³å æ å ±ããã" /></a></td>', 761// ' <td><a href="' + rel + 'sightseeing/index.html#museum"><img src="' + rel + 'common/img/menu_nav_sightseeing_004.jpg" class="fit highlight" alt="ãã¥ã¼ã¸ã¢ã " /></a></td>', 762 ' <td><a href="' + rel + 'activities/"><img src="' + rel + 'common/img/menu_nav_event_03.jpg" class="fit highlight" alt="ã¢ã¯ãã£ããã£" /></a></td>', 763// ' <td><a href="' + rel + 'sightseeing/index.html#amusement_park"><img src="' + rel + 'common/img/menu_nav_sightseeing_005.jpg" class="fit highlight" alt="ã¢ãã¥ã¼ãºã¡ã³ããã¼ã¯" /></a></td>', 764// ' <td><a href="' + rel + 'sightseeing/index.html#location"><img src="' + rel + 'common/img/menu_nav_sightseeing_06.jpg" class="fit highlight" alt="観å ã¹ããã NAGOMI" /></a></td>', 765 ' </tr>', 766 ' </table>', 767 ' </div>', 768 '</div>' 769 ].join('')); 770 $('#nav_sightseeing').append(nav_menu); 771 nav_menu = ''; 772 773 forTemplate(); 774} 775 776/** 777 * ã¹ã ã¼ã¹ã¹ã¯ãã¼ã«ãè¨å®ããã 778 */ 779function setSmoothScroll() { 780 $('a[href*=#],area[href*=#]').click(function () { 781 var a = $(this); 782 if (a.attr('href').indexOf('booking.iconia.co.jp') != -1) return;
783 if (a.hasClass('flex-prev')) return false; 784 if (a.hasClass('flex-next')) return false; 785 786 if (a.hasClass('noscroll')) return false; 787 var speed = 400; 788 var href= a.attr('href'); 789 var target = $(href == '#' || href == '' ? 'html' : href); 790 var top = target.offset().top; 791 var position = top - (isIE6() || isSumaho() || isTablet() ? 10 : 190);// + (top == 0 ? 0 : 80)); 792 $('body,html').animate({scrollTop:position}, speed, 'swing'); 793 return false; 794 }); 795} 796 797 798 799/** 800 * highlightã¯ã©ã¹ãè¨å®ãããè¦ç´ ã®ãã¦ã¹ãªã¼ãã¼æã®ãã¤ã©ã¤ããè¨å®ããã 801 */ 802function setHighLight() 803{ 804 $('img.highlight,a.highlight,input.highlight').each(function(){ 805 var me = $(this); 806 var el = me.parent(); 807 el.css({ 808 // 'background-color':'#ffffff', 809 //'background-color':'#94c4ea', 810 //'width': me.width() + 'px', 811 //'height': me.height() + 'px', 812 'display':'block' 813 }); 814 $(el).hover( 815 function(){ 816 me.fadeTo(100, 0.8); 817 }, 818 function(){ me.fadeTo(100, 1.0); } 819 ); 820 me.removeClass('highlight'); 821 }); 822} 823 824/** 825 * fancyboxãã©ã°ã¤ã³ã§ãããã¢ãã表示ãè¨å®ããã 826 */ 827function setFancybox() 828{ 829 830 if (typeof $.fn.fancybox == 'function') { 831 832 // é常ã®ãããã¢ãããè¨å®ããã 833 $('a.popup,a[rel^="popup"],area.popup,area[rel^="popup"]').each(function(){ 834 var me = $(this); 835 me.fancybox({ 836 'centerOnScroll' : true, 837 'cyclic' : true, 838 'overlayOpacity' : 0.7, 839 'overlayColor' : '#000000' 840 }).removeClass('popup'); 841 }); 842 843 // é常ã®ãããã¢ãããè¨å®ããã 844 $('a.popifame,a[rel^="popifame"],area.popifame,area[rel^="popifame"]').each(function(){ 845 var me = $(this); 846 me.fancybox({ 847 'type' : 'iframe', 848 'centerOnScroll' : true, 849 'cyclic' : true, 850 'overlayOpacity' : 0.7, 851 'overlayColor' : '#000000' 852 }).removeClass('popifame'); 853 }); 854 855 // ãããã¢ããã¦ã£ã³ãã¦ãæå®ã®ãµã¤ãºã§è¡¨ç¤ºããã 856 // classã«ãpopwin-width-height#idãã§æå®ããã 857 var boxid_cnt = 0; 858 $('a[class*="popwin"],area[class*="popwin"]').each(function(){ 859 var me = $(this); 860 var info = me.attr('class').match(/popwin-(\d+)-(\d+)(#[^ ]+|)/); 861 if (info == null) return; 862 var popcls = info[0]; 863 var width = parseInt(info[1]); 864 var height = parseInt(info[2]); 865 var id = info.length > 2 ? info[3] : null; 866 867 if (width == 0) width = $(window).width() * 0.8; 868 if (height == 0) height = $(window).height() * 0.8; 869 870 var fboxopt = { 871 'padding' : 10, 872 'titleShow' : true, 873 'titlePosition' : 'inside', 874 'autoScale' : false, 875 'centerOnScroll' : true, 876 'transitionIn' : 'fade', 877 'transitionOut' : 'fade', 878 'width' : width, 879 'height' : height, 880 'overlayOpacity' : 0.9, 881 'overlayColor' : '#ffffff' 882 }; 883 884 if (id) { 885 var href = me.attr('href'); 886 var boxid = 'box_' + Base64.encode(href + id).replace(/=/g,''); 887 if (!$('div').is('#' + boxid)) { 888 var div = $('<div></div>'); 889 $('body').append( 890 div.clone().addClass('none').append( 891 div.clone().attr('id', boxid).css({ 892 'text-align' : 'left', 893 'width' : width + 'px', 894 'height' : height + 'px' 895 }) 896 ) 897 ); 898 $('#' + boxid).load(href + ' ' + id); 899 } 900 me.attr('href', '#' + boxid).fancybox(fboxopt).removeClass(popcls); 901 } else { 902 fboxopt.type = 'iframe'; 903 me.fancybox(fboxopt).removeClass(popcls); 904 } 905 }); 906 907 } 908} 909 910function _ua(){ 911 var userAgent = window.navigator.userAgent.toLowerCase(); 912 var appVersion = window.navigator.appVersion.toLowerCase(); 913 if (userAgent.indexOf('msie') != -1) { 914 //IEå ¨è¬ 915 if (appVersion.indexOf("msie 6.") != -1) { 916 return "ie6"; 917 }else if (appVersion.indexOf("msie 7.") != -1) { 918 return "ie7"; 919 }else if (appVersion.indexOf("msie 8.") != -1) { 920 return "ie8"; 921 }else if (appVersion.indexOf("msie 9.") != -1) { 922 return "ie9"; 923 }else if (appVersion.indexOf("msie 10.") != -1) { 924 return "ie10"; 925 }else{ 926 return "ie"; 927 } 928 }else if (userAgent.indexOf('chrome') != -1) { 929 return "chrome"; 930 }else if (userAgent.indexOf('safari') != -1) { 931 return "safari"; 932 }else if (userAgent.indexOf('firefox') != -1) { 933 return "firefox"; 934 }else if (userAgent.indexOf('opera') != -1) { 935 return "opera"; 936 }else{ 937 return userAgent; 938 } 939}; 940 941/** 942 * ã¹ããé²è¦§æ è¨èªåæ¿ãã¿ã³è¡¨ç¤ºé表示 943 */ 944$("#header_lang_icon").click(function () { 945 $("#header_language ul").slideToggle(); 946 $("#header_language ul").toggleClass("active"); 947}); 948 949/** 950 * [setSumahoReservation description] 951 * ã¹ããé²è¦§æäºç´ã¢ã¸ã¥ã¼ã«è¿½å 952 */ 953 954function setSumahoReservation() { 955 if($(window).width() <= 768 && !$('.sumahoreservation').length) { 956 $.ajax({ 957 url:'common/sumahoreservation/index.html', 958 dataType:'html' 959 }). 960 done(function(data){ 961 var today = Date.create(new Date(), 'ja'), 962 sumahoheader = $('#header_inner').outerHeight() + $('#sumaho_menu').outerHeight(); 963 964 $('body').prepend(data); 965 $('.sumahoreservation').css({top:sumahoheader}); 966 $('.sumahoreservation_calendar').datepicker({ 967 minDate: today, // 仿¥ãã鏿å¯ã 968 maxDate: today.clone().addYears(1), // 仿¥ãã1å¹´å¾ã¾ã§é¸æå¯ã 969 changeYear: true, // 年鏿ã¡ãã¥ã¼ã表示ã 970 changeMonth: true, // æé¸æã¡ãã¥ã¼ã表示ã 971 showOn: 'both', // ããã¹ãããã¯ã¹ã¨ã«ã¬ã³ãã¼ãã¿ã³ã®ä¸¡æ¹ã§ã«ã¬ã³ãã¼ã表示ããã 972 buttonImageOnly: true, // ã«ã¬ã³ãã¼ã¢ã¤ã³ã³ã®ã¿è¡¨ç¤ºããã 973 buttonImage: getRelPath() + 'common/img/sumaho/calendar/icon.png', // ã«ã¬ã³ãã¼ã¢ã¤ã³ã³ã®ã¤ã¡ã¼ã¸ãã¹ã 974 buttonText: 'ã«ã¬ã³ãã¼è¡¨ç¤º' // ã«ã¬ã³ãã¼ã¢ã¤ã³ã³ã®ããã¹ãã 975 }).val(today.format('{yyyy}/{MM}/{dd}', 'ja')); // 仿¥ã®æ¥ä»ãåæå¤ã«ããã 976 977 978 $('.sumaho_menu_reservationbtn').on('click',function(){ 979 $('.sumahoreservation').stop().fadeToggle(); 980 $(this).append($('<span>',{ 981 class:'ripple' 982 })); 983 984 setTimeout(function(){ 985 $('.sumaho_menu_reservationbtn').find('.ripple').remove(); 986 },300); 987 }); 988 989 $('.sumahoreservation_submit').on('click',function(){ 990 $('.sumahoreservation').submit(); 991 }) 992 993 $('.sumahoreservation').on('submit',function(){ 994 var linkerParam; 995 ga(function(tracker) { 996 linkerParam = '&' + tracker.get('linkerParam'); 997 }); 998 var frm = $('.sumahoreservation'); 999 var url = 'https://asp.hotel-story.ne.jp/ver3d/planlist.asp?hcod1=62670&hcod2=001&hidmode=select&mode=seek'; 1000 1001 frm.attr('action', url + '&hidSELECTARRYMD=' + $('.sumahoreservation_calendar').val() + '&hidSELECTHAKSU=' + $('.sumahoreservation_selectHakusu').val() + '&hidSELECTadult=' + $('.sumahoreservation_selectcmbADULT').val() + '&room=' + $('.sumahoreservation_selectcmbSUMROOM').val() + linkerParam); 1002 }) 1003 }); 1004 } 1005} 1006 1007// ã¹ããæãã¡ã¤ã³ç»åãã¹ããç¨ç»åã«å¤ãã 1008if (isSumaho()) { 1009 $('.js_sumaho_img').each(function () { 1010 var sumahoImg = $(this).attr('data-sumaho-img'); 1011 $(this).attr('src', sumahoImg); 1012 1013 }); 1014 } 1015 1016// é«ããåããã 1017if (typeof matchHeight == 'function') { 1018 $('.match_hight').matchHeight(); 1019 $('.mh').matchHeight(); 1020} 1021 1022function setsumahomenu() { 1023 $('body').prepend(` 1024 <div class="menu"> 1025 <div class="menu-outer"> 1026 <div class="menu-inner">
1027 <a href="/plan/">宿æ³</a> 1028 <a href="/hotspa/">温æ³</a> 1029 <a href="/meals/">ãé£äº</a> 1030 <a href="/rooms/">ãé¨å±</a> 1031 <a href="/facilities/">æ½è¨</a> 1032 <a href="/access/">交éã¢ã¯ã»ã¹</a> 1033 <a href="/event/">ããã«ã¤ãã³ã</a> 1034 <a href="/sightseeing/">è¦³å æ å ±</a> 1035 <a href="/activities/">ã¢ã¯ãã£ããã£</a> 1036 <a href="/100th/">嵿¥100å¨å¹´è¨å¿µãµã¤ã</a> 1037 <a href="/topics/">ãç¥ããã»æ°çæ å ±</a> 1038 </div> 1039 <a href="https://booking.iconia.co.jp/#/booking/result?code=2a841adf09063a6ea6b9d3c2f24a5f35" class="menu-btn1" target="_blank"><span>空室æ¤ç´¢ã»å®¿æ³äºç´</span><em>ã¯ãã¡ã</em></a> 1040 </div> 1041 </div> 1042 `); 1043} 1044 1045function setTab() { 1046 $('.js-tab-trigger').on('click', (e) => { 1047 const tabWrap = $(e.currentTarget).parents('.tab-container'); 1048 const tabBtn = tabWrap.find('.js-tab-trigger'); 1049 const tabContents = tabWrap.find('.tab-contents'); 1050 tabBtn.removeClass('on'); 1051 $(e.currentTarget).addClass('on'); 1052 const elmIndex = tabBtn.index($(e.currentTarget)); 1053 tabContents.removeClass('is-show'); 1054 tabContents.eq(elmIndex).addClass('is-show'); 1055 }); 1056 1057}
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.