');
$(this).css('opacity','0');
$(this).removeClass();
} else {
$(this).wrap('
');
$(this).removeClass();
}
});
});
// アイコン設定
$(function(){
$('#tk_selectLanguage dt').append('
');
$('#tk_nFavorite a').append('
');
$('#tk_pagePath li+li').prepend('
');
$('#tk_fNavS li a').append('
');
$('#tk_pageTop a').empty().append('
');
});
//svgスプライト表示バグ対策
(function(document, window){
document.addEventListener('DOMContentLoaded', function(){
var baseUrl = window.location.href
.replace(window.location.hash, '');
[].slice.call(document.querySelectorAll('use[*|href]'))
.filter(function(element) {
return (element.getAttribute('xlink:href').indexOf('#') === 0);
})
.forEach(function(element) {
element.setAttribute('xlink:href', baseUrl + element.getAttribute('xlink:href'));
});
}, false);
}(document, window));
// スクロール検知
jQuery(document).ready(function(){
$('body').addClass('tk_scrollTop');
});
$(function(){
if( $(window).scrollTop() > 0){
$('body').removeClass('tk_scrollTop');
}
});
$(window).scroll(function(){
if( $(window).scrollTop() > 0){
$('body').removeClass('tk_scrollTop');
} else {
$('body').addClass('tk_scrollTop');
}
});
$(function(){
var timeoutId;
window.addEventListener('scroll',function(){
$('body').addClass('tk_scroll');
clearTimeout(timeoutId);
timeoutId = setTimeout(function(){
$('body').removeClass('tk_scroll');
},100);
});
});
// 言語選択
$(function(){
$('#tk_selectLanguage dt').click(function(){
$('#tk_selectLanguage dd').slideUp();
$(this).removeClass("tk_open");
if($('#tk_selectLanguage dd').css('display') == 'none'){
$('#tk_selectLanguage dd').slideDown();
$(this).addClass("tk_open");
}
});
});
$(window).scroll(function(){
if( $(window).scrollTop() > 0){
$('#tk_selectLanguage dd').slideUp();
$(this).removeClass("tk_open");
}
});