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

$sliderOptions = $slider->getOptions();

$firstSlide = $slides[0];

$autoslideInterval = 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="slider_shadow">

                <div class="post_info_holder clearfix">
                    <div class="post_category" id="slider_post_cat"><a href="<?php echo $firstSlide['imageLink']; ?>" title="" <?php ?>><?php echo $firstSlide['title']; ?></a></div>
                    <div class="post_name"><a href="<?php echo $firstSlide['imageLink']; ?>" <?php ?> id="slider_img_desc"><?php echo $firstSlide['description']; ?></a></div>
                </div><!--  END "post_info_holder"  //--> 
        <div id="slider_freshcubes" data-action="<?php echo $slides[0]['lightbox']; ?>" style="background-image: url('<?php echo fImg::resize( $firstSlide['imageUrl'], 920, 350, 1); ?>')">
<?php
$c_w = 120;
$c_h = 120;
for($w =0; $w < 8; $w++)
{
  for($h=0; $h <3; $h++)
  {
    echo '<div class="fresh_cube" id="fresh_cube_'.$w.'_'.$h.'" style="left:'.($w*120).'px; top:'.($h*120).'px; background-position:'.($w*-120).'px '.($h*-120).'px; background-image: url("'.fImg::resize( $firstSlide['imageUrl'], 920, 350, 1).'");"></div>';
  }
}
?>
            
               
          <ul id="fresh_cube_data">
            <?php
            $id_object = 0;
            foreach( $slides as $oneSlide ) { 
            
              echo '<li class="fresh_cube_image_'.$id_object.'" >';
              echo  '<img src="'.fImg::resize( $oneSlide['imageUrl'], 920, 350, 1).'" />';//echo '<span class="img_src">'.$row['image_url'].'</span>';                            
              echo  '<span class="transition" title="'.$oneSlide['transition'].'">

                    <div class="post_category" id="slider_post_cat"><a href="'.$oneSlide['imageLink'].'" title="View all posts in Web Design" rel="category">'.$oneSlide['title'].'</a></div>
                    <div class="post_name"><a href="'.$oneSlide['imageLink'].'" id="slider_img_desc">'.$oneSlide['description'].'</a></div>


              </span>';
              echo '<span class="ligthbox" title="'.$oneSlide['lightbox'].'">'.$oneSlide['imageLink'].'</span>';
              echo '</li>';
              $id_object++;
            }
            ?>
          </ul>
		  <div class="slide_left"></div>
		  <div class="slide_right"></div>
          <div class="slide_info"></div>
        </div><!-- END "div.slider_fresh" -->
  </div>
  <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 
                      $img_count = count($slides);  
                      ?>
                      <?php
                      
                       $counter = 0;
                       foreach($slides as $oneSlide)
                      { ?>
                      <li>
                       
                        <img src="<?php echo fImg::resize( $oneSlide['imageUrl'], 152, 100, 1) ?>" alt="img" />
                        <div class="slider_tit" style="display:none"><?php echo $oneSlide['description'];?></div>
                        <a class="slider_desc" title="<?php echo $counter; ?>" style="display:none" href="<?php echo $oneSlide['imageLink']; ?>"><?php echo $oneSlide['description']; ?></a>
                        <a class="slider_img" title="<?php echo $oneSlide['lightbox']; ?>"  style="display:none" href="<?php echo fImg::resize( $oneSlide['imageUrl'], 920, 350, 1); ?>"></a>
                        <div class="slider_action" style="display:none;"><?php echo $oneSlide['lightbox']; ?></div>
                      </li>
                      <?php $counter++; } ?>
                      <?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>  
<?php } ?>