<?php get_header(); $options = get_desing_plus_option(); ?>

 <div id="main_col_wrap">
  <div id="main_col">
   <div id="content" class="clearfix">

<!--お知らせエリア-->
<table width="98%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"><div align="center"><img src="http://www.aguru.net/wp-content/themes/BlogPress/img/common/work_image.jpg" alt="イラスト" width="98%" /></div>
    
   
    
    </td>
  </tr>
</table>
<!--↓ボタン-->
<script type="text/javascript">
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><a href="https://www.aguru.net/?cat=16" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('お知らせ','','https://www.aguru.net/image/aguru_net_image/top_botan_notice2.gif',1)"><img src="https://www.aguru.net/image/aguru_net_image/top_botan_notice1.gif" alt="お知らせ" width="100%" id="お知らせ" /></a></td>
    <td align="center"><a href=" https://www.aguru.net/?page_id=4363" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('ギャラリー','','https://www.aguru.net/image/aguru_net_image/top_botan_gallery2.gif',1)"><img src="https://www.aguru.net/image/aguru_net_image/top_botan_gallery1.gif" alt="ギャラリー" width="100%" id="ギャラリー" /></a></td>
    <td align="center"><a href="https://www.aguru.net/?page_id=4388" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('ブログ','','https://www.aguru.net/image/aguru_net_image/top_botan_blog2.gif',1)"><img src="https://www.aguru.net/image/aguru_net_image/top_botan_blog1.gif" alt="ブログ" width="100%" id="ブログ" /></a></td>
  </tr>
</table>
<!--↑ボタン-->

<table  border="0" cellpadding="7" cellspacing="7">
  
  <tr>
    <td>    むかいあぐる / Aguru Mkukai : イラストレーター /キャラクター、カット、説明、挿絵、広告、マンガ、装丁、絵本、雑誌などで活動中。<br>イラスト、キャラクター等の制作依頼はこちらのメールにてご相談ください。<a href="mailto:aguru@aguru.net "><img src="/blog/images/mail.gif" alt="" width="150" height="14" border="0" /></a> <br>      
      <img src="http://www.aguru.net/wp-content/themes/BlogPress/img/common/top_line.gif" width="100%" /><br>
    </td></tr>
</table>
<!--お知らせエリア-->



    <?php include('bookmark.php'); ?>

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <div id="single_post" class="clearfix">

     <h2 class="title"><?php the_title(); ?></h2>
     <?php if ($options['show_date'] or $options['show_category'] or $options['show_tag'] or $options['show_comment']) { ?>
     <div class="meta clearfix">
      <?php if ($options['show_date']) : ?><p class="date"><?php the_time('Y.m.d'); ?></p><?php endif; ?>
      <?php if ($options['show_category']) : ?><ul class="post_category clearfix"><li><?php the_category('</li><li>'); ?></li></ul><?php endif; ?>
      <?php if ($options['show_tag']): ?><?php the_tags('<ul class="post_tag clearfix"><li>',',</li><li>','</li></ul>'); ?><?php endif; ?>
      <?php if ($options['show_comment']) : ?><p class="post_comment"><?php comments_popup_link(__('Write comment', 'tcd-w'), __('1 comment', 'tcd-w'), __('% comments', 'tcd-w')); ?></p><?php endif; ?>
     </div>
     <?php }; ?>

     <div class="post clearfix">


      <?php if(!is_mobile()) { if($options['single_ad_code1']||$options['single_ad_image1']) { ?>
      <div id="single_banner1">
       <?php if ($options['single_ad_code1']) { ?>
        <?php echo $options['single_ad_code1']; ?>
       <?php } else { ?>
        <a href="<?php esc_attr_e( $options['single_ad_url1'] ); ?>" class="target_blank"><img src="<?php esc_attr_e( $options['single_ad_image1'] ); ?>" alt="" title="" /></a>
       <?php }; ?>
      </div>
      <?php }; }; ?>



      <?php the_content(__('Read more', 'tcd-w')); ?>
      <?php custom_wp_link_pages(); ?>

      <?php if(!is_mobile()) { if($options['single_ad_code2']||$options['single_ad_image2']) { ?>
      <div id="single_banner2">
       <?php if ($options['single_ad_code2']) { ?>
        <?php echo $options['single_ad_code2']; ?>
       <?php } else { ?>
        <a href="<?php esc_attr_e( $options['single_ad_url2'] ); ?>" class="target_blank"><img src="<?php esc_attr_e( $options['single_ad_image2'] ); ?>" alt="" title="" /></a>
       <?php }; ?>
      </div>
      <?php }; }; ?>

     </div><!-- END .post -->

    </div><!-- END #single_post -->

    <?php endwhile; endif; ?>

    <?php // related post
         $odd_or_even = 'odd';
         $categories = get_the_category($post->ID);
         if ($categories) {
         $category_ids = array();
          foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
           $args=array(
                       'category__in' => $category_ids,
                       'post__not_in' => array($post->ID),
                       'showposts'=>6,
                       'orderby' => 'rand'
                     );
          $my_query = new wp_query($args);
          $i = 1;
          if($my_query->have_posts()) {
    ?>
    <div id="related_post">
     <h3 class="headline_base2"><span><?php _e("Related post","tcd-w"); ?></span></h3>
     <ul class="clearfix">
      <?php while ($my_query->have_posts()) { $my_query->the_post(); ?>
      <li class="clearfix <?php echo $odd_or_even; ?>">
       <a class="image" href="<?php the_permalink() ?>"><?php if ( has_post_thumbnail()) { the_post_thumbnail('small_size'); } else { echo '<img src="'; bloginfo('template_url'); echo '/img/common/no_image2.gif" alt="" title="" />'; }; ?></a>
       <div class="meta">
        <?php if ($options['show_date']) : ?><p class="date"><?php the_time(__('m/d. Y', 'tcd-w')) ?></p><?php endif; ?>
        <h4 class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
       </div>
      </li>
      <?php $odd_or_even = ('odd'==$odd_or_even) ? 'even' : 'odd'; }; ?>
     </ul>
    </div>
    <?php }; }; wp_reset_query(); ?>

    <?php if ($options['show_comment']) : if (function_exists('wp_list_comments')) { comments_template('', true); } else { comments_template(); }; endif; ?>

    <?php if ($options['show_next_post']) : ?>
    <div id="previous_next_post" class="clearfix">
     <p id="previous_post"><?php previous_post_link('%link') ?></p>
     <p id="next_post"><?php next_post_link('%link') ?></p>
    </div>
    <?php endif; ?>

    <?php include('navigation.php'); ?>

   </div><!-- END #content -->
  </div><!-- END #main_col -->
 </div><!-- END #main_col_wrap -->

 <?php if(!is_mobile()) { ?>
 <?php include('sidebar.php'); ?>
 <?php if($options['layout'] == 'three_column1'||$options['layout'] == 'three_column2') { include('sidebar2.php'); }; ?>
 <?php }; ?>

<?php get_footer(); ?>