<?php global $qaleb;?>
<?php if($qaleb['slider-2-ac']=='1'){?>
<div class="ap-slider_widget clearfix">
<div class="polist">
  <?php
			  
			  if($qaleb['slider-2-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-2-count'],
				);
			  }else if($qaleb['slider-2-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-2-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['slider-2-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-2-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['slider-2-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>	
<article class="item">
<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('loop-3'); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
 </div>
<div class="det">
<?php if($qaleb['slider-2-d']=='1'){?><div class="time"><span><?php the_date('');  ?></span></div><?php } ?>
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<?php if($qaleb['slider-2-p']=='1'){?><p><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></p><?php } ?>
</div>
</article>
<?php endwhile; endif;  wp_reset_query(); ?>	
</div>
</div>
<?php } ?>