<?php get_header(); ?>

	<div class="side_and_contents">
		<?php get_sidebar(); ?>

		<?php
			 $page = get_post( get_the_ID() );
			 $slug = $page->post_name;
		?>
		<div id="contents" class="<?php echo $slug; ?> page">
			<article id="main">
				<section class="top_news">
					<?php if(in_category('news')) : ?>
					<img src="/img/news/news_top_img.jpg" width="1000" height="247" class="top_img" alt="お知らせ">
					<h2><img src="/img/top/news_ttl.jpg" width="283" height="46" alt="お知らせ"><br>お知らせ</h2>
					<div class="all_info">
						<h3><?php the_title();?></h3>
						<time datetime="<?php the_time('y.n.j'); ?>" class="wf-lato"><?php the_time('Y年n月j日'); ?></time>
						<p>
							<?php
								if(have_posts()):
									while(have_posts()):
										the_post();
										the_content();
									endwhile;
								endif;
							?>
						</p>
					<!-- all_info --></div>
					<?php elseif (in_category('schedule')) : ?>
					<img src="/img/news/news_top_img.jpg" width="1000" height="247" class="top_img" alt="今後の予定表（案）">
					<h2><img src="/img/top/sch_ttl.jpg" width="283" height="46" alt="今後の予定表（案）"><br>お知今後の予定表（案）</h2>
					<div class="all_info">
						<h3><?php the_title();?></h3>
						<time datetime="" class="wf-lato">
										<?php $eventdate = get_post_meta( $post->ID , 'event_date' ,true);
										$nen = substr($eventdate, 0,4);
										$tsuki = substr($eventdate, 4,2);
										$hi = substr($eventdate, 6,2);
										$jyun = substr($eventdate, 8,2);	//00:日表示、01:初旬.15：中旬、32：下旬
										$week = array( "日", "月", "火", "水", "木", "金", "土" );
										if ($jyun == 00) {
											echo $nen."年".$tsuki."月".$hi."日";
										} elseif($jyun == 01) {
											echo $nen."年".$tsuki."月"."初旬";
										} elseif($jyun == 15) {
											echo $nen."年".$tsuki."月"."中旬";
										} elseif($jyun == 32) {
											echo $nen."年".$tsuki."月"."下旬";
										} elseif($jyun == 99) {
											echo $nen."年".$tsuki."月";
										}
										?>
						</time>
						<p>
							<?php
								if(have_posts()):
									while(have_posts()):
										the_post();
										the_content();
									endwhile;
								endif;
							?>
						</p>
					<!-- all_info --></div>
					<?php endif; ?>
				<!-- top_news --></section>

				<section class="contact_tel clearfix">
					<h3><img src="/img/common/contact_ttl.png" width="283" height="46"><br>お問い合わせ</h3>
					<ul>
						<li class="tel">
							<h4>お電話でのお問い合わせ</h4>
							<p class="tel_no only_pc">093-602-7751</p>
							<p class="tel_no only_sp"><a href="tel:093-602-7751">093-602-7751</a></p>
<!--							<p class="uketsuke">受付時間：00：00～00：00</p>

-->
							<p class="uketsuke">受付時間：9:00～12:00　13:00～16:00</p>
						</li>
						<li class="mail">
							<h4>メールでのお問い合わせ</h4>
							<p><a href="../contact/">CONTACT US</a></p>
						</li>
					</ul>	
				<!-- /contact_tel --></section>
				
				<p id="pageTop"><a data-scroll href="#header"><br>page top</a></p>
							
			<!-- /main --></article>
		<!-- /contents --></div>
	</div>	

<?php get_footer(); ?>