<div id="featuredList_rotator">
<div style="display:none;">
<?php
rewind_posts();
query_posts("showposts=5&post_type=slider");//get slider items
while(have_posts()):the_post();
$thumbnailer=get_the_post_thumbnail($post->ID,"slider");
preg_match ('/src="(.*)" class/',$thumbnailer,$link);
$custom_link = get_post_meta($post->ID, "link", true);
$custom_caption = get_post_meta($post->ID, "subline", true);
?>
<?php
$attr = array('class' => "");
the_post_thumbnail('image_xxl',$attr);
?>
<?php endwhile;?>
</div>
<div class="main_image">
<?php
rewind_posts();
query_posts("showposts=1&post_type=slider");//get slider items
while(have_posts()):the_post();
$thumbnailer=get_the_post_thumbnail($post->ID,"slider");
preg_match ('/src="(.*)" class/',$thumbnailer,$link);
$custom_link = get_post_meta($post->ID, "link", true);
$custom_caption = get_post_meta($post->ID, "subline", true);
?>
<?php
$attr = array('class' => "");
the_post_thumbnail('image_xxl',$attr);
?>
<div class="desc">
<div class="block">
<h4><?php echo the_title();?></h4>
<small><?php echo $custom_caption;?></small>
</div>
</div>
<?php endwhile;?>
</div>
<div class="image_thumb">
<ul><?php
rewind_posts();
query_posts("showposts=5&post_type=slider");//get slider items
while(have_posts()):the_post();
$thumbnailer=get_the_post_thumbnail($post->ID,"slider");
preg_match ('/src="(.*)" class/',$thumbnailer,$link);
$custom_link = get_post_meta($post->ID, "link", true);
$custom_caption = get_post_meta($post->ID, "subline", true);
?>
<li>
<a href="<?php $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'image_xxl'); echo $thumb[0];?>"><?php
$attr = array('class' => "");
the_post_thumbnail('image_s',$attr);
?></a>
<div class="block">
<h5><?php echo the_title();?></h5>
<small><?php echo $custom_caption;?></small>
</div>
</li>
<?php endwhile;?>
</ul>
</div>
</div>
<?php } ?>