<?php global $qaleb;?>
<?php if($qaleb['slider-big-ac']=='1'){?>
<section class="ap_main">
<div class="container inn">
<div class="thumbslider">
<div class="postlist">
  <?php
			  
			  if($qaleb['slider-big-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-big-count'],
				);
			  }else if($qaleb['slider-big-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-big-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['slider-big-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-big-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['slider-big-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>	
<div class="item">
<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('slider'); ?>" alt="<?php the_title(); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
 </div>
<div class="det">
<div class="slideinfo">
<?php if(get_post_meta( get_the_ID(), 'meta-text-1', true )!=null){ ?><?php echo get_post_meta( get_the_ID(), 'meta-text-1', true ); ?><?php } ?>
</div>
<h2><span><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span></h2>
<p><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></p>
</div>
</div>
<?php endwhile; endif;  wp_reset_query(); ?>	
</div>

<div class='slider-nav'>
<div class='navlist'>
  <?php
			  
			  if($qaleb['slider-big-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-big-count'],
				);
			  }else if($qaleb['slider-big-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-big-count'],
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['slider-big-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => $qaleb['slider-big-count'],
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['slider-big-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>	
<div class="item">
<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<img src="<?php the_post_thumbnail_url('post'); ?>" alt="<?php the_title(); ?>">
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
 </div>
 <h2><a><?php if (strlen($post->post_title) > 80) { echo mb_substr(the_title($before = '', $after = '', FALSE), 0, 80) . '...'; } else { the_title(); } ?></a></h2>
</div>
<?php endwhile; endif;  wp_reset_query(); ?>	
</div>
</div>
</div>
<?php if($qaleb['box-or-html'] == '1'){?>
<?php
			  if($qaleb['box-left-content']=='1'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 1,
				);
			  }else if($qaleb['box-left-content']=='2'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 1,
					'orderby'	=> 	'rand'
				);
			  }else if($qaleb['box-left-content']=='3'){
				$arggs = array(
					'post_type' => 'post',
					'posts_per_page' => 1,
					'tax_query' => array(
                        array(
                            'taxonomy' => 'category',
                            'field'    => 'term_id',
                            'terms'    => $qaleb['box-left-type-select'],
                        ),
				    ),
				);
			  }
			  
            query_posts($arggs);
            if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="ap_editorial">
<div class="thumbnail">
<?php if(has_post_thumbnail()){?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail_url('shop'); ?>" alt="<?php the_title(); ?>"></a>
<?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?>
 </div><div class="det">
<h2><?php the_title(); ?></h2>
<span class="rmore"><a href="<?php the_permalink(); ?>">ادامه نوشته</a></span>
</div>
</div>
<?php endwhile; endif;  wp_reset_query(); ?>
<?php }else{ ?>
<div class="ap_editorial"><?php echo $qaleb['box-html'];?></div>
<div class="clearfix"></div>
<?php } ?>
</div>
</section>
<?php } ?>