<div id="sidebar">
	<div id="ad1">
		<h3 id="adtitle">Simple Session 2014 专题</h3>
		<div class="ad">
			<a href="http://www.51tjc.com" title="ss">
				<img class="alignnone size-full wp-image-17472" width="300" height="163" src="<?php bloginfo('stylesheet_directory'); ?>/images/ss.jpg" alt="ss">
			</a>
		</div>
	</div>
	<div class="ad">
		<a target="_blank" href="http://www.51tjc.com/">
			<img width="300" src="<?php bloginfo('stylesheet_directory'); ?>/images/EVO-Distributin-20131118.gif" alt="EVO">
		</a>
	</div>
	
<!--tab--> 
<div id="tabContainer">
        <ul>
            <li id="tab1"><a href="#" class="on" onclick="switchTab('tab1','con1');this.blur();return false;">
                热门文章</a></li>
            <li id="tab2"><a href="#" onclick="switchTab('tab2','con2');this.blur();return false;">
                随机文章</a></li>
        </ul>
        <div style="clear: both">
        </div>
        <div class="tabs_container">
	        <div id="con1" class="tab_content">	   
	              <?php query_posts('posts_per_page=5&caller_get_posts=1&orderby=comment_count'); ?>
				<?php while (have_posts()) : the_post(); ?>
					<div class="block-item-small">
								<div class="block-image">
										 <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="50" height="50" 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="50" height="50" />
										<?php } ?>
										<?php endif; ?>
								</a>
									<span class="video-icon"></span></div>
									<h2>				<a href="<?php the_permalink(); ?>" class="title" title="<?php the_title(); ?>"><?php echo cut_str($post->post_title,36); ?></a></h2>
							<span class="block-meta"><?php the_time('y-m-d'); ?>, <?php comments_number('0','1','%'); ?>条评论</span>
						</div>
				<?php endwhile; ?>        
	        </div>
	        <div id="con2" class="tab_content" style="display: none">
	            <?php query_posts('posts_per_page=5&caller_get_posts=1&orderby=rand'); ?>
						<?php while (have_posts()) : the_post(); ?>
						<div class="block-item-small">
								<div class="block-image">
										 <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="50" height="50" 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="50" height="50" />
										<?php } ?>
										<?php endif; ?>
								</a>
									<span class="video-icon"></span></div>
									<h2>				<a href="<?php the_permalink(); ?>" class="title" title="<?php the_title(); ?>"><?php echo cut_str($post->post_title,36); ?></a></h2>
							<span class="block-meta"><?php the_time('y-m-d'); ?>, <?php comments_number('0','1','%'); ?>条评论</span>
						</div>
						<?php endwhile; ?>
	        </div>
    	</div>
    </div>
<!--tab-->
<div class="clear"
	<div class="widget">		<!-- BEGIN WIDGET -->
		<h3 class="widget-title">热门标签</h3>		
				<li>
				<?php wp_tag_cloud('number=30&largest=20&smallest=17&unit=px'); ?>
				</li>
		</div>
		<div class="widget">
		<h3 class="widget-title">读者标签</h3>			
				<ul class="ds-recent-visitors" data-num-items="14" ></ul>
					
		</div>
		<div class="widget">		<!-- BEGIN WIDGET -->
		<h3 class="widget-title">最新评论</h3>		
				<ul class="ds-recent-comments" data-num-items="5"></ul>
	</div>	
</div>