Hello I'm looking to get the jQuery Cycle to utilize WordPress. All is effective aside from the page anchor builder.

I have to make use of this part:

 jQuery('#imagegallerysingle').after('<ul id="nav-images">').cycle({
       fx:     'fade', 
    containerResize: 1,
    height: 'auto',
    speed:  4000,
    timeout: 8000,
    delay: -2000,
    prev: '#prev',
    next: '#next',
    pauseOnPagerHover: true,
    cleartype:  1,
    pager:  '#nav-images', 
       pagerAnchorBuilder: function(idx, slide) { 
                    return 'something-that-goes-here-to-get-my-images'; 
    }
}); 

I want it to fetch my images out of this loop and make the pictures:

<?php $args = array(
'post_type' => 'attachment',
'post_parent' => $post->ID,
'numberposts' => -1,
'post_status' => NULL,
'order_by' => date,
'order' => 'ASC',
'exclude' => get_post_thumbnail_id()
);
$attachs = get_posts($args);
if (!empty($attachs)) {
foreach ($attachs as $att) { 

echo '<div class="slide">' . wp_get_attachment_image($att->ID, 'ag_slide') . '</div>';

} } else { } ?>

Any help could be awesome!