<?php get_header();?>

<div id="wrapper-content">
	<div id="main">
		<!--幻灯片-->
		<div id="slide">
			<script>
				 var box =new PPTBox();
				 box.width = 610; //宽度
				 box.height = 295;//高度
					box.autoplayer = 2;//自动播放间隔时间

						     //box.add({"url":"图片地址","title":"悬浮标题","href":"链接地址"})
						     box.add({"url":"<?php bloginfo('template_directory'); ?>/images/tu1.jpg","href":"http://www.51tjc.com/","title":"悬浮提示标题1"})
						     box.add({"url":"<?php bloginfo('template_directory'); ?>/images/tu2.jpg","href":"http://www.51tjc.com/","title":"悬浮提示标题2"})
						     box.add({"url":"<?php bloginfo('template_directory'); ?>/images/tu3.jpg","href":"http://www.51tjc.com/","title":"悬浮提示标题3"})
						     box.add({"url":"<?php bloginfo('template_directory'); ?>/images/tu4.jpg","href":"http://www.51tjc.com/","title":"悬浮提示标题4"})
						     box.show();
			</script>
		</div>
		<!--幻灯片-->
		<div id="arc">
			<h3>最新文章
			<span class="arrows">»</span>
			</h3>
		<!--文章开始-->
		<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
			<div class="post">
				<h2>
					<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" target="_blank"><?php echo cut_str($post->post_title,40); ?></a>
				</h2>
				<div class="smallimg">
						 <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" target="_blank">
									<?php if ( get_post_meta($post->ID, 'show', true) ) : ?>
										<?php $image = get_post_meta($post->ID, 'show', true); ?>
										<img src="<?php echo $image; ?>"width="290" height="160" alt="<?php the_title(); ?>"/>
										<?php else: ?>
										<?php if (has_post_thumbnail()) { the_post_thumbnail('home-thumb' ,array( 'alt' => trim(strip_tags( $post->post_title )), 'title' => trim(strip_tags( $post->post_title )),'class' => 'home-thumb')); }
										else { ?>
											 <img src="<?php echo catch_first_image() ?>" alt="<?php the_title(); ?>" width="290" height="160" />
										<?php } ?>
										<?php endif; ?>
						</a>
				</div>

				<span class="block-meta">
					<span class="heading-author"><?php the_author(); ?></span> 
					<span class="heading-date"><?php the_time('Y年m月d日') ?></span>
					<span class="heading-comments"><?php the_category(', ') ?></span>
				</span>
				<p>
					<?php if(has_excerpt()) the_excerpt();  
							else  
								 echo dm_strimwidth(strip_tags($post->post_content),0,110,"..."); ?>
<br><a class="readmore" title="<?php the_title(); ?>" href="<?php the_permalink(); ?>">Read More <span class="block-arrows">»</span></a></p>
							
							<div class="tags">标签：<?php the_tags(); ?></div>
						</div>
					<?php endwhile; ?>
			<?php else : ?>
			什么也找不到！
			<p>抱歉,你要找的文章不在这里.</p>
			<?php endif; ?>
												
						<div class="pagination"><?php par_pagenavi(5); ?></div>
						
				
				
		<!--文章结束-->
		</div>

	</div>

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

<?php get_footer();?>

