<?php

/* Load and prepare slides  */
$query_string = 'post_type=jawslides&order=ASC&orderby=menu_order&&nopaging=true';
if ($gantry->get('slider-jawslides') != 'jawall')
    $query_string .= "&slideshows=" . $gantry->get('slider-jawslides') . "";

$query = new WP_Query($query_string);


?>
<div class="slider" id="slider">
    <div class="minus" id="slider_max">
        <img src="<?php echo get_template_directory_uri(); ?>/images/body/arrow_left.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
                $counter = 0;
                while($query->have_posts()) { 
                     $query->the_post(); ?>
                    <li>
                    <?php
                    $image = wp_get_attachment_image_src ( get_post_thumbnail_id ( get_the_id()) , 'single-post-thumbnail' );
                    $slider_image = 'mainimg_small';
                    ?>                        
                        <img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&amp;h=100&amp;w=162&amp;zc=1&amp;f=2" alt="img" class="img-grayscale" />
                        <img style="display: none;" src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&amp;h=100&amp;w=162&amp;zc=1" alt="img" class="img-grayscale" />
                        <div class="slider_tit" style="display:none"> / <?php echo $query->post->post_title; ?> / </div>
                        <a class="slider_desc" title="<?php echo $counter; ?>" style="display:none" href="<?php echo $image[0]; ?>"><?php echo $query->post->post_content; ?></a>
                        <a class="slider_img" title="<?php echo get_post_meta($query->post->ID, 'jaw_slide_linktype', true); ?>"  style="display:none" href="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&amp;w=920&amp;zc=1&amp;f=2"></a>

                    </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(); ?>/images/body/arrow_right.png" class="sign" id="sign_min" alt="plus" />                
    </div><!--  END "slider_min"  //-->
</div><!--  END "slider"  //-->