I am using two jcarousels one the same page and only one of them works.for the second one that is placed (after the first one)on the footer of the page the prev-next buttons just perform the default action and navigate to the home page.(even when i used the prevent default method for jquery the button does nothing)
I discovered this while i was trying to make a third one on the sidebar of the page, and by giving the same div ids with the first one(as itried to use the same piece of code), the latter one would navigate the new one i tried to insert. Is there a way of distinguishing the carousels so that both function correctly? 

sorry for the misleading explanation of my problem. for the first two carousels you are correct,theu should not have the sam eids.the third one i tried to add, i wrote the html and js code with different elements and the one i added does not work.
I provide the code above.

```
    <xsl:if test="count(//image) &gt; 1">
        <script type="text/javascript">
            <xsl:text disable-output-escaping="yes"><![CDATA[
      function drawCarousel(index,position) {
        $('#rightCarousel').stop(true, false);
        $('#rightCarousel').animate({left: -130*(index-1)}, 500);
        $('#rightCarousel').get(0).carouselIndex = index;
      }

      jQuery(document).ready(function() {
      var carouselIndex = 1;
      $('#rightCarousel').get(0).carouselIndex = carouselIndex;

      jQuery('#rightCarousel-next').bind('click', function() {
      var carouselIndex = $('#rightCarousel').get(0).carouselIndex;
      if (carouselIndex < ]]></xsl:text>
            <xsl:value-of select="count(//image) - 1"/>
            <xsl:text disable-output-escaping="yes"><![CDATA[) {
                      carouselIndex = carouselIndex + 1;
                          drawCarousel(carouselIndex,1);
                      }
                      return false;
                  });

              jQuery('#rightCarousel-prev').bind('click', function() {
                  var carouselIndex = $('#rightCarousel').get(0).carouselIndex;
                  if (carouselIndex > 1) {
                  carouselIndex = carouselIndex - 1;
                      drawCarousel(carouselIndex,-1);
                    }
                  return false;
              });

              });
    ]]></xsl:text>
        </script>
    </xsl:if>

    <div class="event_photos">
        <div class="article">
            <p class="date">
                <xsl:value-of select="ms:format-date(//@date, 'dd MMM, yyyy', $Locale)"/>
            </p>
            <p class="legend">
                <a href="{//@url}">
                    <xsl:value-of select="//summary"/>
                </a>
            </p>
            <a href="{Urls:MakeFriendly(concat('/default.aspx?pid=29&amp;la=',$LanguageID))}">
                <h2>
                    <xsl:value-of select="Resource:GetConstant('events')"/>
                </h2>
            </a>

            <xsl:if test="count(//image) &gt; 0">
                <div class="gallery-right">

                    <div class="gal_cont" style="height: 190px;width:160px;overflow: hidden; position: relative;">
                        <ul id="rightCarousel" style="{concat('height:190px;width: ',200*count(//image),'px; position: absolute;')}">
                            <xsl:apply-templates select="//image" />
                        </ul>
                    </div>

                    <xsl:if test="count(//image) &gt; 1">
                        <div class="arrow-left">
                            <a id="rightCarousel-prev" title="{Resource:GetConstant('events_previusPhotos')}" href="#">προηγούμενη</a>
                        </div>
                    </xsl:if>

                    <xsl:if test="count(//image) &gt; 1">
                        <div class="arrow-right">
                            <a id="rightCarousel-next" title="{Resource:GetConstant('events_nextPhotos')}" href="#">επόμενη</a>
                        </div>
                    </xsl:if>

                </div>
            </xsl:if>
        </div>
    </div>
</xsl:template>

<xsl:template match="//image">
    <xsl:if test="string-length(//image/@file) &gt; 0">
        <li class="img" style="display:inline;overflow: hidden;width:135px;margin:8px">
            <img src="{Image:Fit(//image/@file,130,178)}" alt="{@title}" style="max-width:130px"/>
        </li>
    </xsl:if>
</xsl:template>

```