<?php get_header(); ?>
<div id="content">
	<div id="main-img">
		<div id="bg-hack"><div class="main-bg"></div></div>
		<div class="sub-bg1 intro pallabox">
			<h1>Data Driven Innovation</h1>
			<p>データドリブンイノベーション</p>
		</div>
	</div>

	<main id="main" class="m-all t-all d-all cf" role="main">
		<div class="pallabox box0 clearfix">
			<div class="innerbox">
				<h2 class="t-aligncenter">News&amp;Topics</h2>
				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
					<?php //remove_filter('the_content', 'wpautop'); ?>
	
					<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<header class="entry-header">
						<div class="m-all t-1of2 d-1of2">
							<?php
								the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );?>
						</div>
						<div class="entry-meta m-all t-1of2 d-1of2 t-alignright">
							<?php apteq_original_posted_on(); ?>
						</div>
					</header>
					<div class="entry-content">
						<div class="m-all t-2of3 d-3of4">
							<?php the_excerpt(); ?>
						</div>
						<div class="m-all t-1of3 d-1of4">
							<?php if ( has_post_thumbnail( $thumbnail->ID ) ) { ?>
								<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
								<?php the_post_thumbnail(); ?>
								</a>
							<?php } ?>
						</div>
					</div>
				<?php endwhile; ?>
				<?php endif; ?>
			</div>
		</div>

		<!-- [ #topcontent] -->
		<div id="topcontent">
		<?php
		$loop = new WP_Query( array( 'post_type' => 'top_content', 'posts_per_page' => -1 , 'orderby' => 'ID', 'order' => 'ASC' )); ?>
		<?php while ( $loop->have_posts() ) : $loop->the_post();
		$postCount = ++$postCount;
		endwhile;
		if ($postCount) :
			while ( $loop->have_posts() ) : $loop->the_post();?>
				<?php $topCount = ++$topCount;?>

			<div id="anc<?php echo $topCount ; ?>"></div>
			<div class="frame<?php echo $topCount ; ?>"></div>
			<div class="pallabox">
			<div class="box<?php echo $topCount ; ?> clearfix">
			<div class="innerbox">
				<h2 class="t-aligncenter"><?php the_title(); ?></h2>
	
				<?php if ( has_post_thumbnail()) { ?>
					<div class="thumbImage">
						<div class="thumbImageInner">
							<a href="<?php echo get_post_meta($post->ID,'URL',TRUE); ?>"><?php the_post_thumbnail('full');
						if(get_post(get_post_thumbnail_id())->post_excerpt) {
							echo '<span class="thumbCaption">' . get_post(get_post_thumbnail_id())->post_excerpt. '</span>'; } ?></a>
						</div>
						<div class="thumbImageCaption">
						</div>
					</div><!-- [ /.thumbImage ] -->
				<?php } ?>	
				<div class="entryTxtBox <?php if ( has_post_thumbnail()) : ?>haveThumbnail<?php endif; ?>">
					<?php echo wpautop(the_content()); ?>
				</div><!-- [ /.entryTxtBox ] -->
			</div>
			</div>
			</div>   
		<?php endwhile;	endif ?>
		</div>						
	</main>

	</div>
	
	
	<!--?php get_sidebar(); ?-->



<?php get_footer(); ?>