I'm attempting to use jcarousel to exhibit related posts that may be scrolled through, the code I am using to exhibit related posts is:

$orig_post = $post;
global $post;

$tags = wp_get_post_tags($post->ID);
if ($tags) {
    $tag_ids = array();
    foreach($tags as $individual_tag)
        $tag_ids[] = $individual_tag->term_id;
    $args = array(
        'tag__in' => $tag_ids,
        'post__not_in' => array($post->ID),
        'posts_per_page'=>4, // Number of related posts that will be shown.
        'caller_get_posts'=>1,
        'post_type'=>'books'
    );
    $my_query = new wp_query( $args );
    if( $my_query->have_posts() ) {
        while( $my_query->have_posts() ) {
            $my_query->the_post(); ?>
            <ul id="mycarousel" class="jcarousel-skin-tango">
                <li>
                    <div class="relatedthumb">
                        <a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_post_thumbnail(); ?></a>
                    </div>
                </li>
        <? }
        echo '</ul></div>';
    }
} else {
    echo 'No Related Posts Found';
}
$post = $orig_post;
wp_reset_query();

and also the code to initialize jcarousel is:

<script type="text/javascript" src="../lib/jquery-1.4.2.min.js"></script>
<!--
  jCarousel library
-->
<script type="text/javascript" src="../lib/jquery.jcarousel.min.js"></script>
<!--
  jCarousel skin stylesheet
-->
<link rel="stylesheet" type="text/css" href="../skins/tango/skin.css" />

<script type="text/javascript">

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel();
});

</script>

This code works only if I've got a static unordered list. However when I'm calling their email list products dynamically it does not work. Help me sort this out.

The hyperlink towards the page I downloaded Jcarousel is http://sorgalla.com/jcarousel/ they've good examples regarding how to load dynamic content however i don't believe any one of their good examples affect my question, and so i would greatly thank you for help.

Edit: Nevermind. I believed it by myself. I'd the

<ul id="mycarousel" class="jcarousel-skin-tango">

within the wrong put it must have been known as before the attached publish code.