/* Theme from eurocated 2008-2016(C) PC&mobile Ver3.2 */
/* Written For yamatoph.server-shared.com 2015-2016(C) Ver3.2 */
GUA = "UA-78236499-1";
fb_id="933766876743908";
fb_tk="486268618150727|d4T3luJcAlzjT2tMxhukgfa_Emo";
jQuery(function (){
// google analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', GUA, 'auto');
ga('send', 'pageview');
//global
date = new Date();
h = date.getHours();
m = date.getMinutes();
d = date.getDay();
mnth = date.getMonth();
dt = date.getDate();
y = date.getFullYear();
Nweek = Math.floor((dt-d+12)/7);
days_after = 15;
GURL = window.location;
});
index = ["index.php","index.php#news","flowchart.php","health-info.php","aboutus.php","contact.php","../"];
index_jp = ["トップページ","新着情報","ご利用の流れ","健康情報","薬局案内","お問い合わせ","パソコン用ページ"];
index_length = index.length;
jQuery(window).load(function(){
var pagetop = jQuery('#back-top');
pagetop.click(function(){
jQuery('body, html').animate({scrollTop:0},500);
return false;
});
jQuery('#index').html(index_length);
});
fb_url="https://graph.facebook.com/"+fb_id+"/feed?access_token="+fb_tk;
jQuery(function(){
jQuery.ajax({
type: "GET",
url: fb_url, dataType: "json",
success: function(json){
json = json.data;
var num = json.length;
var Feed = "
";
for(var i=0; i<2; i++){
fb_created_time = parseISO8601(json[i].created_time);
var text =""+json[i].message+"
";
if (json[i].message === undefined){var text ="Facebookで確認
";}
var fblink = json[i].link;
if (json[i].link === undefined){var fblink ="#";}
var fbphoto = "";
if (json[i].picture === undefined){var fbphoto ="";}
Feed+='- '+fb_created_time+'
'+'- '+fbphoto+''+text+'
';}//loop
Feed += "
";
jQuery("#news").append(Feed);
}//json
});
});
function parseISO8601(str) {
var date = str.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})/);
return date = date[1] + "年"+ date[2] + "月" + date[3] + "日";
}
function initialize() {
var latlng=new google.maps.LatLng(34.5273288,133.6547271);
var myOptions = {
zoom: 18,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var markerOption = {
position : latlng, //マーカー座標
map : map, //マーカー適用先
title : "ホームページ制作eurocated.com" //マウスオーバー文字列
};
var marker = new google.maps.Marker(markerOption);
var map=new google.maps.Map(document.getElementById("gmap"), myOptions);
}
jQuery(window).load(function(){
link = '';
for (var i=0; i'+index_jp[i]+''
jQuery('#gnav').html(link);
};
if(index.length === 6){ jQuery('#gnav_wrap').attr('id', "gnav_wrap6");}
else if(index.length === 3){ jQuery('#gnav_wrap').attr('id', "gnav_wrap3");}
else if(index.length === 4){ jQuery('#gnav_wrap').attr('id', "gnav_wrap4");}
else if(index.length === 5){ jQuery('#gnav_wrap').attr('id', "gnav_wrap5");}
var path = GURL.href.split('/');
path = path[path.length -1].split(".html")[0];
/*var VST=".fashion,.bridal,.beauty,.gourmet,.pet,.carsnbikes,.estate,.life,.recruit"
jQuery(VST).css("display","none");
jQuery(path).css("display","");*/
jQuery("#shoplist").html(path);
jQuery('li a[href="'+path+'.html"]').parent().addClass('current');
//New! Mark
var after = days_after*24*60*60*1000;
var lists = jQuery("#days dt");
lists.each(function() {
var times_splited =jQuery(this).text().replace(/^(\d+)年(\d+)月(\d+)日jQuery/,"jQuery1,jQuery2,jQuery3");
var times = times_splited.split(",");
var settime = new Date(times[0],times[1]-1,times[2]);
end = new Date(settime.getTime()+after);
end_fix = new Date(settime.getTime()+after);
if(date < end) {jQuery(this).append('NEW!');}
else if(date > end) {jQuery(this).append("");}
});
jQuery(function Now(){
if(d==0){jQuery('#Now').text("休診日");}
else if(d==3){jQuery('#Now').text("休診日");}
else if(8<=h && h<9){jQuery('#Now').text("まもなく診療開始");}
else if(9<=h && h<11){jQuery('#Now').text("ただいま診療中");}
else if(11<=h && h<12){jQuery('#Now').text("まもなく休診");}
else if(d==6 && 13<=h && h<14 ){jQuery('#Now').text("午後の診療は17時まで");}
else if(13<=h && h<14 ){jQuery('#Now').text("14時より診療開始");}
else if(14<=h && h<18){jQuery('#Now').text("ただいま診療中");}
else if(18<=h && h<19){jQuery('#Now').text("まもなく休診");}
else{jQuery('#Now').text("診療時間外") };
});
jQuery(function Reserve(){
if(mnth==11 && 29<=dt){jQuery('#Reserve').html("誠に勝手ながら、本日は年末のお休みをいただいております。2016年1月4日(月)より通常の診察をいたします。
来年もどうぞよろしくお願い申し上げます。
");}
else if(mnth==0 && dt<=3){jQuery('#Reserve').html("誠に勝手ながら、本日は年始のお休みをいただいております。1月4日(月)より通常の診察をいたします。
本年もどうぞよろしくお願い申し上げます。
");}
else if(d==0){jQuery('#Reserve').html("申し訳ございませんが、本日は受付を行っておりません。明日午前8時30分よりお電話くださいませ。
");}
else if(d==3){jQuery('#Reserve').html("申し訳ございませんが、本日は受付を行っておりません。明日午前8時30分よりお電話くださいませ。
");}
else if(30<=m && 8<=h && h<9){jQuery('#Reserve').html('');}
else if(9<=h && h<19){jQuery('#Reserve').html('');}
else{jQuery('#Reserve').html("大変申し訳ございません。只今の時間は受付を行っておりません。
");}
});
jQuery(function Cal(){
if(d==0){
jQuery(".th_sun").addClass("holiday t_top");
jQuery(".sun").addClass("holiday");}
else if(d==1){
jQuery(".th_mon").addClass("today t_top");
jQuery(".mon").addClass("today");}
else if(d==2){
jQuery(".th_tue").addClass("today t_top");
jQuery(".tue").addClass("today");}
else if(d==3){
jQuery(".th_wed").addClass("holiday t_top");
jQuery(".wed").addClass("holiday");}
else if(d==4){
jQuery(".th_thu").addClass("today t_top");
jQuery(".thu").addClass("today");}
else if(d==5){
jQuery(".th_fri").addClass("today t_top");
jQuery(".fri").addClass("today");}
else if(d==6){
jQuery(".th_sat").addClass("today t_top");
jQuery(".sat").addClass("today");}
});
});