<?php 
$slider = fSliderFactory::getSlider( 'default');
$slides = $slider->getSlides();
$sliderOptions = $slider->getOptions();


$autoslideInterval = 0;
if( !isset( $sliderOptions['slider-autoslide-interval'] ) ) {
	$sliderOptions['slider-autoslide-interval'] = 0;
} 
if( !isset( $sliderOptions['slider-autoslide-enable'] ) ) {
	$sliderOptions['slider-autoslide-enable'] = 0;
}

if( $sliderOptions['slider-autoslide-enable'] == 1 ) {
	$autoslideInterval = $sliderOptions['slider-autoslide-interval'];
}
if( !empty($slides ) ) {
?>
<div id="featured_home" class="clearfix">
<?php 
	echo '<div class="autoslide_settings" style="display:none;">';
	
		echo '<div class="autoslide_interval">' .$autoslideInterval.'</div>';
	
	echo '</div>';
?>
	<div class="bigimg" data-action="<?php echo $slides[0]['lightbox']; ?>">
    <?php 
		foreach( $slides as $oneSlide ) {
		$imgUrl = fImg::resize( $oneSlide['imageUrl'], 920, 470, 1);
	?>  
            	<img src="<?php echo $imgUrl ?>" alt="Big Image" id="slider_main_img"/>
                <div class="post_info_holder clearfix">
                    <div class="post_category" id="slider_post_cat"><?php  echo $oneSlide['title']; ?></div>
                    <div class="post_name"><a href="<?php  echo $oneSlide['imageLink']; ?>" id="slider_img_desc"><?php  echo $oneSlide['description']; ?></a></div>
                </div><!--  END "post_info_holder"  //-->
	<?php 
			break;
		}
	?>
	</div><!--  END "bigimg"  //-->
	<div class="slider" id="slider">
    	<div class="minus" id="slider_max">
			<img src="<?php echo get_template_directory_uri();?>/skins/<?php echo fOpt::Get('skins', 'theme-color-skin');?>/gfx/slider_round.png" class="round" id="round_max" alt="round" />
			<img src="<?php echo get_template_directory_uri();?>/skins/<?php echo fOpt::Get('skins', 'theme-color-skin'); ?>/gfx/slider_round_minus.png" class="sign" id="sign_max" alt="minus" />
		</div>
		<div class="thumbs" id="thumbs">
			<div class="slider_content" id="sl_content">
				<ul id="slider_ul">
					<?php 
						if( !empty($slides) ) {
						foreach( $slides as $oneSlide ) { 
					?>
					<li>
                    	<?php  
                    	$imgUrl = fImg::resize( $oneSlide['imageUrl'], 152, 100, 1);
                    	$imgUrlBig = fImg::resize( $oneSlide['imageUrl'], 920, 470, 1);
                        ?>
                        <img src="<?php echo $imgUrl; ?>" alt="img" />
                        <div class="slider_tit" style="display:none"><?php  echo $oneSlide['title']; ?></div>
                        <a class="slider_desc" style="display:none" href="<?php  echo $oneSlide['imageLink']; ?>"><?php  echo $oneSlide['description']; ?></a>
                        <a class="slider_img"  style="display:none" href="<?php echo $imgUrlBig; ?>"></a>
                        <div class="slider_action" style="display:none;"><?php echo $oneSlide['lightbox']; ?></div>
                      </li>
                      <?php 
                      	}  
                      	}
                      ?>
                      <?php
                      ////////////////////////////////////////////////////////////
                      ?>
                	</ul><!--  END "slider_ul"  //-->
                </div><!--  END "sl_content"  //-->
			</div><!--  END "thumbs"  //-->
			<div class="plus" id="slider_min">
            	<img src="<?php echo get_template_directory_uri();?>/skins/<?php echo fOpt::Get('skins', 'theme-color-skin'); ?>/gfx/slider_round.png" class="round" id="round_min" alt="round" />
				<img src="<?php echo get_template_directory_uri();?>/skins/<?php echo fOpt::Get('skins', 'theme-color-skin'); ?>/gfx/slider_round_plus.png" class="sign" id="sign_min" alt="plus" />                
			</div><!--  END "slider_min"  //-->
		</div><!--  END "slider"  //-->        
	</div><!--  END "featured_home"  //-->
<?php 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////// SLIDER END//////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
?> 