/**
* jQuery繧ェ繝悶ず繧ァ繧ッ繝医�諡。蠑オ
*
* @date 2015-01-08
*/
(function(window, document, $, undefined) {
/**
* userAgent蛻、螳壹ヵ繝ゥ繧ー
*
* @date 2014-09-03
*/
var ua = navigator.userAgent.toLowerCase();
$.ua = {
// Windows
isWindows: /windows/.test(ua),
// Mac
isMac: /macintosh/.test(ua),
// IE
isIE: /msie (\d+)|trident/.test(ua),
// IE6
isIE6: /msie (\d+)/.test(ua) && RegExp.$1 == 6,
// IE7
isIE7: /msie (\d+)/.test(ua) && RegExp.$1 == 7,
// IE8譛ェ貅
isLtIE8: /msie (\d+)/.test(ua) && RegExp.$1 < 8,
// IE9譛ェ貅
isLtIE9: /msie (\d+)/.test(ua) && RegExp.$1 < 9,
// IE10譛ェ貅
isLtIE10: /msie (\d+)/.test(ua) && RegExp.$1 < 10,
// Firefox
isFirefox: /firefox/.test(ua),
// WebKit
isWebKit: /applewebkit/.test(ua),
// Chrome
isChrome: /chrome/.test(ua),
// Safari
isSafari: /safari/.test(ua)&&(!/chrome/.test(ua))&&(!/mobile/.test(ua)),
// 繧ソ繝�メ繝�ヰ繧、繧ケ
isTouchDevice: 'ontouchstart' in window,
// iOS
isIOS: /i(phone|pod|pad)/.test(ua),
// iPhone縲(Pod touch
isIPhone: /i(phone|pod)/.test(ua),
// iPad
isIPad: /ipad/.test(ua),
// iPhone4
isIPhone4: (/i(phone|pod)/.test(ua)&&window.devicePixelRatio == 2),
// iPad3
isIPad3: (/ipad/.test(ua)&&window.devicePixelRatio == 2),
// Android
isAndroid: /android/.test(ua),
// 繝「繝舌う繝ォ迚�Android
isAndroidMobile: /android(.+)?mobile/.test(ua)
};
/**
* 繝ュ繝シ繝ォ繧ェ繝シ繝舌�
*
* @date 2012-10-01
*
* @example $('.rollover').rollover();
* @example $('.rollover').rollover({ over: '-ov' });
* @example $('.rollover').rollover({ current: '_cr', currentOver: '_cr_ov' });
* @example $('.rollover').rollover({ down: '_click' });
*/
$.fn.rollover = function(options) {
var defaults = {
over: '_ov',
current: null,
currentOver: null,
down: null
};
var settings = $.extend({}, defaults, options);
var over = settings.over;
var current = settings.current;
var currentOver = settings.currentOver;
var down = settings.down;
return this.each(function() {
var src = this.src;
var ext = /\.(gif|jpe?g|png)(\?.*)?/.exec(src)[0];
var isCurrent = current && new RegExp(current + ext).test(src);
if (isCurrent && !currentOver) return;
var search = (isCurrent && currentOver) ? current + ext : ext;
var replace = (isCurrent && currentOver) ? currentOver + ext : over + ext;
var overSrc = src.replace(search, replace);
new Image().src = overSrc;
$(this).mouseout(function() {
this.src = src;
}).mouseover(function() {
this.src = overSrc;
});
if (down) {
var downSrc = src.replace(search, down + ext);
new Image().src = downSrc;
$(this).mousedown(function() {
this.src = downSrc;
});
}
});
};
/**
* 繝輔ぉ繝シ繝峨Ο繝シ繝ォ繧ェ繝シ繝舌�
*
* @date 2012-11-21
*
* @example $('.faderollover').fadeRollover();
* @example $('.faderollover').fadeRollover({ over: '-ov' });
* @example $('.faderollover').fadeRollover({ current: '_cr', currentOver: '_cr_ov' });
*/
$.fn.fadeRollover = function(options) {
var defaults = {
over: '_ov',
current: null,
currentOver: null
};
var settings = $.extend({}, defaults, options);
var over = settings.over;
var current = settings.current;
var currentOver = settings.currentOver;
return this.each(function() {
var src = this.src;
var ext = /\.(gif|jpe?g|png)(\?.*)?/.exec(src)[0];
var isCurrent = current && new RegExp(current + ext).test(src);
if (isCurrent && !currentOver) return;
var search = (isCurrent && currentOver) ? current + ext : ext;
var replace = (isCurrent && currentOver) ? currentOver + ext : over + ext;
var overSrc = src.replace(search, replace);
new Image().src = overSrc;
$(this).parent()
.css('display','block')
.css('width',$(this).attr('width'))
.css('height',$(this).attr('height'))
.css('background','url("'+overSrc+'") no-repeat');
$(this).parent().hover(function() {
$(this).find('img').stop().animate({opacity: 0}, 200);
}, function() {
$(this).find('img').stop().animate({opacity: 1}, 200);
});
});
};
/**
* 荳埼乗�蠎ヲ繝ュ繝シ繝ォ繧ェ繝シ繝舌�
*
* @date 2014-09-03
*
* @example $('.opacity').opacityRollover();
* @example $('.opacity').opacityRollover({ overOpacity: 0.6 });
* @example $('.opacity').opacityRollover({ fade: false });
*/
$.fn.opacityRollover = function(options) {
var defaults = {
fade: true,
defaultOpacity: 1,
overOpacity: 0.7,
inDuration: 250,
outDuration: 200,
easing: 'easeOutQuart'
};
var settings = $.extend({}, defaults, options);
var fade = settings.fade;
var defaultOpacity = settings.defaultOpacity;
var overOpacity = settings.overOpacity;
var inDuration = settings.inDuration;
var outDuration = settings.outDuration;
var easing = settings.easing;
return this.each(function() {
$(this).hover(function() {
if (fade) {
$(this).stop().animate({opacity: overOpacity}, inDuration, easing);
} else {
$(this).css({opacity: overOpacity});
}
}, function() {
if (fade) {
$(this).stop().animate({opacity: defaultOpacity}, outDuration, easing);
} else {
$(this).css({opacity: defaultOpacity});
}
});
});
};
/**
* 繧ケ繝�繝シ繧コ繧ケ繧ッ繝ュ繝シ繝ォ
*
* @date 2014-12-01
*
* @example $.scroller();
* @example $.scroller({ hashMarkEnabled: true });
* @example $.scroller({ scopeSelector: '#container', noScrollSelector: '.no-scroll' });
* @example $.scroller('#content');
* @example $.scroller('#content', { pitch: 20, delay: 5, marginTop: 200, callback: function(){} });
*/
$.scroller = function() {
var self = $.scroller.prototype;
if (!arguments[0] || typeof arguments[0] == 'object') {
self.init.apply(self, arguments);
} else {
self.scroll.apply(self, arguments);
}
};
// 繝励Ο繝医ち繧、繝励↓繝。繝ウ繝舌r螳夂セゥ
$.scroller.prototype = {
// 蛻晄悄險ュ螳�
defaults: {
hashMarkEnabled: false,
scopeSelector: 'body',
noScrollSelector: '.noscroll',
pitch: 10,
delay: 10,
marginTop: 0,
callback: function() {}
},
// 蛻晄悄蛹�
init: function(options) {
var self = this;
var settings = this.settings = $.extend({}, this.defaults, options);
$(settings.scopeSelector).find('a[href^="#"]').not(settings.noScrollSelector).each(function() {
var hash = this.hash || '#';
var eventName = 'click.scroller';
$(this).off(eventName).on(eventName, function(e) {
e.preventDefault();
this.blur();
self.scroll(hash, settings);
});
});
},
// 繧ケ繧ッ繝ュ繝シ繝ォ繧貞ョ溯。�
scroll: function(id, options) {
if (this.timer) this.clearScroll();
var settings = (options) ? $.extend({}, this.defaults, options) : (this.settings) ? this.settings : this.defaults;
if (!settings.hashMarkEnabled && id == '#') return;
var self = this;
var win = window;
var $win = $(win);
var d = document;
var pitch = settings.pitch;
var delay = settings.delay;
var scrollLeft = $win.scrollLeft();
if (($.ua.isIPhone || $.ua.isAndroidMobile) && win.pageYOffset === 0) win.scrollTo(scrollLeft, (($.ua.isAndroidMobile) ? 1 : 0));
var scrollEnd = (id == '#') ? 0 : $(id + ', a[name="' + id.substr(1) + '"]').eq(0).offset().top;
var windowHeight = ($.ua.isAndroidMobile) ? Math.ceil(win.innerWidth / win.outerWidth * win.outerHeight) : win.innerHeight || d.documentElement.clientHeight;
var scrollableEnd = $(d).height() - windowHeight;
if (scrollableEnd < 0) scrollableEnd = 0;
scrollEnd = scrollEnd - settings.marginTop;
if (scrollEnd > scrollableEnd) scrollEnd = scrollableEnd;
if (scrollEnd < 0) scrollEnd = 0;
scrollEnd = Math.floor(scrollEnd);
if ($.ua.isAndroid && scrollEnd === 0) scrollEnd = 1;
var dir = (scrollEnd > $win.scrollTop()) ? 1 : -1;
(function _scroll() {
var prev = self.prev;
var current = self.current || $win.scrollTop();
if (current == scrollEnd || typeof prev == 'number' && (dir > 0 && current < prev || dir < 0 && current > prev)) {
self.clearScroll();
settings.callback();
return;
}
var next = current + (scrollEnd - current) / pitch + dir;
if (dir > 0 && next > scrollEnd || dir < 0 && next < scrollEnd) next = scrollEnd;
win.scrollTo(scrollLeft, next);
self.prev = current;
self.current = next;
self.timer = setTimeout(function() {
_scroll();
}, delay);
})();
},
// 繧ケ繧ッ繝ュ繝シ繝ォ繧定ァ」髯、
clearScroll: function() {
clearTimeout(this.timer);
this.timer = null;
this.prev = null;
this.current = null;
}
};
/**
* orientationchange縺ォ髢「縺吶k繧、繝吶Φ繝医ワ繝ウ繝峨Λ逋サ骭イ逕ィ繝。繧ス繝�ラ
*
* @date 2011-05-30
*
* @example $(window).orientationchange(function() { alert(window.orientation); });
* @example $(window).portrait(function() { alert(window.orientation); });
* @example $(window).landscape(function() { alert(window.orientation); });
*/
var type = ($.ua.isAndroid) ? 'resize' : 'orientationchange';
$.fn.extend({
// 繧ェ繝ェ繧ィ繝ウ繝��繧キ繝ァ繝ウ繝√ぉ繝ウ繧ク
orientationchange: function(fn) {
return this.bind(type, fn);
},
// 繝昴�繝医Ξ繧、繝�
portrait: function(fn) {
return this.bind(type, function() {
if (window.orientation === 0) fn();
});
},
// 繝ゥ繝ウ繝峨せ繧ア繝シ繝�
landscape: function(fn) {
return this.bind(type, function() {
if (window.orientation !== 0) fn();
});
}
});
/**
* script隕∫エ�縺ョsrc螻樊ァ繧貞茜逕ィ縺励※謖�ョ壹@縺溘ヵ繧。繧、繝ォ蜷阪�繝ォ繝シ繝医↓縺ゅ◆繧九ヱ繧ケ繧貞叙蠕�
*
* @date 2011-06-20
*
* @example $.getScriptRoot('common/js/base.js');
*/
$.getScriptRoot = function(filename) {
var elms = document.getElementsByTagName('script');
for (var i = elms.length - 1; i >= 0; i--) {
var src = elms[i].src;
if (new RegExp('(.*)?' + filename + '([\?].*)?').test(src)) return RegExp.$1;
}
return false;
};
/**
* script隕∫エ�縺ョsrc螻樊ァ縺九i繧ェ繝悶ず繧ァ繧ッ繝医↓螟画鋤縺励◆繧ッ繧ィ繝ェ繧貞叙蠕�
*
* @date 2011-06-20
*
* @example $.getScriptQuery();
* @example $.getScriptQuery('common/js/base.js');
*/
$.getScriptQuery = function(filename) {
var elms = document.getElementsByTagName('script');
if (!filename) {
return $.getQuery(elms[elms.length - 1].src);
} else {
for (var i = elms.length - 1; i >= 0; i--) {
var src = elms[i].src;
if (new RegExp(filename).test(src)) return $.getQuery(src);
}
return false;
}
};
/**
* 譁�ュ怜�縺九i繧ェ繝悶ず繧ァ繧ッ繝医↓螟画鋤縺励◆繧ッ繧ィ繝ェ繧貞叙蠕�
*
* @date 2011-05-30
*
* @example $.getQuery();
* @example $.getQuery('a=foo&b=bar&c=foobar');
*/
$.getQuery = function(str) {
if (!str) str = location.search;
str = str.replace(/^.*?\?/, '');
var query = {};
var temp = str.split(/&/);
for (var i = 0, l = temp.length; i < l; i++) {
var param = temp[i].split(/=/);
query[param[0]] = decodeURIComponent(param[1]);
}
return query;
};
/**
* 逕サ蜒上r繝励Μ繝ュ繝シ繝�
*
* @date 2012-09-12
*
* @example $.preLoadImages('/img/01.jpg');
*/
var cache = [];
$.preLoadImages = function() {
var args_len = arguments.length;
for (var i = args_len; i--;) {
var cacheImage = document.createElement('img');
cacheImage.src = arguments[i];
cache.push(cacheImage);
}
};
/**
* 繧ケ繧ッ繝ュ繝シ繝ォ譎ゅ↓隕∫エ�繧帝≦蟒カ陦ィ遉コ
*
* @date 2015-01-08
*
* @example $('img').scrollDisplay();
* @example $('img').scrollDisplay({duration: 2000, posFix: 200});
* @example $('img').scrollDisplay({beforeFadeIn: function() {...}, afterFadeIn: function() {...}});
*/
$.fn.scrollDisplay = function(options) {
var defaults = {
duration: 1000,
easing: 'easeInOutQuart',
posFix: 100,
beforeFadeIn: function() {},
afterFadeIn: function() {}
};
var settings = $.extend({}, defaults, options);
return this.each(function() {
var win = window;
var _this = this;
var obj = $(this);
var length = obj.length;
var pos = [];
var func = {
init: function() {
obj.not('.faded').css({opacity: 0});
for (var i = 0; i < length; i++) {
var posY = obj.eq(i).offset().top;
pos.push(posY);
}
func.scroll();
},
scroll: function() {
var scrollTop = $(win).scrollTop();
var windowBottom = $(win).height() + scrollTop - settings.posFix;
for (var i = 0; i < obj.length; i++) {
if (pos[i] <= windowBottom) {
func.fadeIn(i);
}
}
},
fadeIn: function(i) {
if (!obj.eq(i).hasClass('faded')) {
settings.beforeFadeIn.call(_this);
obj.eq(i).animate({opacity: 1}, settings.duration, settings.easing, function() {
settings.afterFadeIn.call(_this);
}).addClass('faded');
}
}
};
func.init();
$(win).on('scroll', function() {
func.scroll();
});
});
};
/**
* 鬮倥&謠�∴
*
* @date 2014-08-27
*
* @example $('#itemList').heightAlign();
* @example $('#itemList').heightAlign({target: 'li'});
* @example $('#itemList').heightAlign({target: 'li', base: 'ul'});縲窶サ蜷� 縺斐→縺ォ - 縺ョ鬮倥&繧呈純縺医k
* @example $('#itemList').heightAlign({target: 'li', col: 5});縲窶サ蛟区焚縺斐→縺ォ
- 縺ョ鬮倥&繧呈純縺医k��1陦悟�縺ョ謨ー縺ェ縺ゥ��
* @example $('#itemList').heightAlign({target: 'li', resizable: true});縲窶サ繧ヲ繧」繝ウ繝峨え繝ェ繧オ繧、繧コ譎ゅ↓鬮倥&繧貞�險ュ螳�
*/
$.fn.heightAlign = function(options) {
var _this = this;
var defaults = {
target: 'a',
base: null,
col: 0,
resizable: false
};
var settings = $.extend({}, defaults, options);
var windowResizeId = Math.random();
var imgLoadCompleted = false;
// 鬮倥&繧定ェソ縺ケ縺ヲ謠�∴繧�
var setHeight = function(elm) {
var maxHeight = 0;
var imgElm = elm.find('img');
var imgCnt = imgElm.length;
var loadChkSpan = 20;
var loadWait = 1000;
var waiting = 0;
var func = function() {
elm.each(function() {
if ($(this).height() > maxHeight) {
maxHeight = $(this).height();
}
});
elm.css('height', maxHeight);
};
if (!imgLoadCompleted) {
imgElm.on('load', function() { imgCnt--; });
var loadCheckTimer = setInterval(function() {
if (imgCnt === 0 || waiting > loadWait) {
clearTimeout(loadCheckTimer);
imgLoadCompleted = true;
func();
} else {
waiting = waiting + loadChkSpan;
}
}, loadChkSpan);
} else {
func();
}
};
// 隕∫エ�繧貞区焚縺斐→�郁。後#縺ィ�峨↓蟆丞�縺代竊� 鬮倥&繧定ェソ縺ケ縺ヲ謠�∴繧�
var setHeightByRow = function(elms) {
var rows = [],
temp = [];
elms.each(function(i) {
temp.push(this);
if (i % settings.col == (settings.col - 1)) {
rows.push(temp);
temp = [];
}
});
if (temp.length) rows.push(temp);
$.each(rows, function() {
setHeight($(this));
});
};
// 繝ェ繧オ繧、繧コ繧、繝吶Φ繝郁ソス蜉�
var attachResizeEvent = function() {
$(window).off('resize.' + windowResizeId).on('resize.' + windowResizeId, function() {
refresh();
});
};
// 繝ェ繧オ繧、繧コ繧、繝吶Φ繝亥炎髯、
var removeResizeEvent = function() {
$(window).off('resize.' + windowResizeId);
};
// option縺ォ蠢懊§縺ヲ蜃ヲ逅�r謖ッ繧雁�縺�
var alignFunc;
if (settings.base) {
alignFunc = function() {
$(_this).find(settings.base).each(function() {
if (settings.col > 1) {
setHeightByRow($(this).find(settings.target));
} else {
setHeight($(this).find(settings.target));
}
});
};
} else {
alignFunc = function() {
if (settings.col > 1) {
setHeightByRow($(_this).find(settings.target));
} else {
setHeight($(_this).find(settings.target));
}
};
}
if (settings.resizable) {
attachResizeEvent();
}
alignFunc();
var refresh = function() {
destroy();
alignFunc();
};
var destroy = function() {
$(_this).find(settings.target).css('height', '');
};
/**
*
* PUBLIC FUNCTIONS
*
*/
// 鬮倥&謠�∴蜀崎ィュ螳�
_this.refresh = function() {
refresh();
if (settings.resizable) {
attachResizeEvent();
}
};
// 鬮倥&謠�∴繧定ァ」髯、
_this.destroy = function() {
destroy();
removeResizeEvent();
};
return this;
};
})(window, document, jQuery);
/**
* 蛻晄悄險ュ螳�
*
* @date 2014-07-28
*/
(function(window, document, $, undefined) {
({
// 蛻晄悄蛹�
init: function() {
$.siteRoot = $.getScriptRoot('js/base.js');
$(function() {
if(!$.ua.isTouchDevice) $('.rollover').rollover();
$.scroller();
});
if ($.ua.isLtIE9) this.alphaPng();
if ($.ua.isLtIE9) this.html5shiv();
},
// 繧「繝ォ繝輔ぃPNG蜊企乗�蛹�
alphaPng: function(){
var selector='.alpha';
var d = document;
var siteRoot = $.siteRoot;
var src = '';
d.open();
d.write(src);
d.close();
$(function() {
$(selector+'[src$=".png"]').fixPng();
});
},
// html5shiv
html5shiv: function() {
var d = document;
var siteRoot = $.siteRoot;
d.open();
d.write('');
d.close();
}
}).init();
})(window, document, jQuery);
/**
* cocoro-h
*
* @date 2015-08-14
*/
cocoro_h_UIset = {
conf: {
$gnav: '',
$bg: '',
$btn: '',
viewFlg: false, // 繝。繝九Η繝シ縺ョ髢矩哩蛻、螳�
winHeight: 0
},
// 蛻晄悄蛹�
init: function(){
var self = this;
$(function(){
if(!$.ua.isLtIE8) {
cocoro_h_UIset.conf.$gnav = $('#gnav');
cocoro_h_UIset.conf.$bg = $('#gnav__bg');
cocoro_h_UIset.conf.$btn = $('#header_menu_btn')
// 繝ェ繧オ繧、繧コ蜿門セ�
self.getResizeState.init();
// 繝翫ン繧イ繝シ繧キ繝ァ繝ウUI
self.gnavUI.init();
// 讀懃エ「繝懊ャ繧ッ繧ケ蛻晄悄蛟、
self.SearchInputValue();
// 繝ェ繝ウ繧ッ髢「騾」莉倥¢
self.joinLinkSet();
// 隕∫エ�縺ョ蟄伜惠蛻、螳�
self.hasClassCheck();
}
});
},
// 繝ェ繧オ繧、繧コ蜿門セ�
getResizeState: {
conf: {
$gnav: '',
$bg: '',
$btn: '',
windowSize: 0,
innerWindowSize: 0
},
init: function(){
var self = this;
var conf = this.conf;
var timer = false;
var $win = $(window);
var oldWinWidth = $win.width();
var newWinWidth = 0;
conf.$gnav = cocoro_h_UIset.conf.$gnav;
conf.$bg = cocoro_h_UIset.conf.$bg;
conf.$btn = cocoro_h_UIset.conf.$btn;
self.resizeStatusChange();
// 繝ェ繧オ繧、繧コ譎ゅ↓菴懷虚
$win.on('orientationchange resize', function(){
/*
newWinWidth = $win.width();
if (timer !== false) {
clearTimeout(timer);
}
timer = setTimeout(function() {
if(oldWinWidth !== newWinWidth){
self.resizeStatusChange();
oldWinWidth = newWinWidth;
}
}, 100);
*/
newWinWidth = $win.width();
if(oldWinWidth !== newWinWidth){
self.resizeStatusChange();
oldWinWidth = newWinWidth;
}
});
},
// 繧ケ繝��繧ソ繧ケ蛻�j譖ソ縺�
resizeStatusChange: function(){
var self = this;
var conf = this.conf;
var scrollbar = 0;
var tester = document.createElement('div');
tester.style.bottom = '100%';
tester.style.height = '1px';
tester.style.position = 'absolute';
tester.style.width = 'calc(100vw - 100%)';
document.body.appendChild(tester);
scrollbar = parseInt(window.getComputedStyle(tester, null).getPropertyValue('width'), 10);
document.body.removeChild(tester);
conf.windowSize = $(window).width() + scrollbar;
if(conf.windowSize > 1100) {
cocoro_h_UIset.conf.viewFlg = false;
conf.$gnav.css({
display: 'block',
opacity: 1
});
conf.$bg.css({
display: 'none',
opacity: 0
});
conf.$btn.removeClass('state-open');
// 繧ケ繝槭�繝サ繧ソ繝悶Ξ繝�ヨ髢イ隕ァ譎�
} else {
cocoro_h_UIset.conf.viewFlg = false;
conf.$gnav.css({
display: 'none',
opacity: 0
});
conf.$bg.css({
display: 'none',
opacity: 0
});
conf.$btn.removeClass('state-open');
}
}
},
// 繝倥ャ繝繝シ繝翫ン繧イ繝シ繧キ繝ァ繝ウUI
gnavUI: {
conf: {
$gnav: '',
$bg: '',
$btn: '',
easing: 'easeOutCubic'
},
init: function(){
var self = this;
var conf = this.conf;
conf.$gnav = cocoro_h_UIset.conf.$gnav;
conf.$bg = cocoro_h_UIset.conf.$bg;
conf.$btn = cocoro_h_UIset.conf.$btn;
// 繝懊ち繝ウ 繧ッ繝ェ繝�け譎ゅ�蜍穂ス�
conf.$btn.on('click', function(){
if(cocoro_h_UIset.conf.viewFlg === false){
cocoro_h_UIset.conf.viewFlg = true;
self.openAnimate();
} else {
cocoro_h_UIset.conf.viewFlg = false;
self.closeAnimate();
}
});
// 鮟貞慍閭梧勹 繧ッ繝ェ繝�け譎ゅ�蜍穂ス�
conf.$bg.on('click', function(){
if(cocoro_h_UIset.conf.viewFlg === true){
cocoro_h_UIset.conf.viewFlg = false;
self.closeAnimate();
}
});
},
// 髢九¥繧「繝九Γ繝シ繧キ繝ァ繝ウ
openAnimate: function(){
var self = this;
var conf = this.conf;
var contentHeight = $('#container').height();
cocoro_h_UIset.conf.viewFlg = true;
conf.$btn.addClass('state-open');
conf.$gnav.css({ display: 'block' });
conf.$bg.css({
display: 'block',
height: contentHeight
});
conf.$bg.stop().animate({
opacity: 1,
});
conf.$gnav.stop().animate({
opacity: 1
}, 200, conf.easing);
},
// 髢峨§繧九い繝九Γ繝シ繧キ繝ァ繝ウ
closeAnimate: function(){
var self = this;
var conf = this.conf;
cocoro_h_UIset.conf.viewFlg = false;
conf.$btn.removeClass('state-open');
conf.$bg.stop().animate({
opacity: 0
}, 150, conf.easing, function(){
$(this).css({ display: 'none' });
});
conf.$gnav.stop().animate({
opacity: 0
}, 200, conf.easing, function(){
$(this).css({ display: 'none' });
});
}
},
// 繧オ繧、繝亥�讀懃エ「繝懊ャ繧ッ繧ケ縺ョ蛻晄悄蛟、
SearchInputValue: function(){
var $input = $('#header').find('.search__input input');
$input.css({ color: '#8f8f8f' });
$input.val('繧オ繧、繝亥�讀懃エ「');
var input_val = [];
$input.each(function() {
input_val.push($(this).val());
});
$input.focus(function(){
var chk_num = $input.index(this);
var chk_val = $input.eq(chk_num).val();
if(chk_val == input_val[chk_num]){
var def_val=$(this).val();
$(this).val('');
$(this).css({
'color': '#333'
});
$(this).blur(function(){
if($(this).val() === ''){
$(this).val(def_val);
$(this).css({
'color': '#8f8f8f'
});
}
});
}
});
},
// 繝ェ繝ウ繧ッ髢「騾」莉倥¢
joinLinkSet: function(){
var linkset = $('#container').find('a[rel^="linkset"]');
linkset.each(function(){
var _this = this,
key = $(_this).attr('rel'),
brother = linkset.not(_this).filter('[rel="' + key + '"]');
$(_this).on('mouseover', function(){
brother.addClass('state-hover').find('img.rollover').mouseover();
}).on('mouseout', function(){
brother.removeClass('state-hover').find('img.rollover').mouseout();
});
});
},
// 隕∫エ�縺ョ蟄伜惠蛻、螳�
hasClassCheck: function() {
var $targetOuter = $('#body');
// 逞�現髯「讀懃エ「繝舌リ繝シ縺ョ陦ィ遉コ繝サ髱櫁。ィ遉コ
if($targetOuter.find('.l-column.l-left').find('.mod-info-hospital').length){
$targetOuter.find('.l-column.l-right').find('.banner.is-hospital').addClass('mode-pc');
}
}
};
$(function(){
cocoro_h_UIset.init();
});