var mycarousel_itemList = [ 
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463300-01&region=2071', image: 'http://secure.adpay.com/images/items/5497755.Jpg', title: '2004 CHEVROLET IMPALA Leatther 2004 CHEVROLET IMPA'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463303-01&region=2071', image: 'http://secure.adpay.com/images/items/5497749.Jpg', title: '2004 MERCURY SABLE, $2600, 361 2004 MERCURY SABLE,'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463304-01&region=2071', image: 'http://secure.adpay.com/images/items/5497743.Jpg', title: '1993 LINCOLN MARK 8,71K Miles 1993 LINCOLN MARK 8'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463301-01&region=2071', image: 'http://secure.adpay.com/images/items/5497734.Jpg', title: '2003 BUICK CENTURYRuns Great, 2003 BUICK CENTURY'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463187-01&region=2071', image: 'http://secure.adpay.com/images/items/5497164.Jpg', title: '2007 Classic CHEVROLET SILVERA 2007 Classic CHEVRO'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463205-01&region=2071', image: 'http://secure.adpay.com/images/items/5496633.Jpg', title: '2008 CARDINAL 5th wheel RV, ha 2008 CARDINAL 5th w'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463335-01&region=2071', image: 'http://secure.adpay.com/images/items/5496613.Jpg', title: '3 bed/2 bath on 1/2 acre IN TOWN 207 Dundee - Nort'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463173-02&region=2071', image: 'http://secure.adpay.com/images/items/5495737.jpg', title: '2004 NISSAN Titan LE 113894 mi 2004 NISSAN Titan L'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463170-02&region=2071', image: 'http://secure.adpay.com/images/items/5495736.jpg', title: '2010 DODGE Ram 1500 SLT 69270  2010 DODGE Ram 1500'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463154-02&region=2071', image: 'http://secure.adpay.com/images/items/5495735.jpg', title: '2010 CHEVROLET Colorado LT w/2 2010 CHEVROLET Colo'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463165-02&region=2071', image: 'http://secure.adpay.com/images/items/5495734.jpg', title: '2005 CHEVROLET Silverado 1500  2005 CHEVROLET Silv'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463156-02&region=2071', image: 'http://secure.adpay.com/images/items/5495733.jpg', title: '2008 CHRYSLER Town & Country T 2008 CHRYSLER Town '},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463148-02&region=2071', image: 'http://secure.adpay.com/images/items/5495732.jpg', title: '2011 CHEVROLET HHR LT w/1LT 19 2011 CHEVROLET HHR '},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463149-02&region=2071', image: 'http://secure.adpay.com/images/items/5495731.jpg', title: '2010 SATURN Vue XE w/1SB 23034 2010 SATURN Vue XE '},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463157-02&region=2071', image: 'http://secure.adpay.com/images/items/5495730.jpg', title: '2010 JEEP Liberty Sport 30567  2010 JEEP Liberty S'},
{url: 'http://secure.crossroadsfinder.com/ClickNBuy.aspx?p=2071&adid=0000463176-02&region=2071', image: 'http://secure.adpay.com/images/items/5495729.jpg', title: '2010 CHEVROLET HHR LT w/1LT 38 2010 CHEVROLET HHR '},
 ];

//<![CDATA[
        function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt) {
          // The index() method calculates the index from a
          // given index who is out of the actual item range.
          var idx = carousel.index(i, mycarousel_itemList.length);
          carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
          $('img').error(function(){
              $(this).attr('src', '/images/no-image.png');
          });
        };

        function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt) {
          carousel.remove(i);
        };
        /** Item html creation helper */
        function mycarousel_getItemHTML(item) {
          return '<div><a href="' + item.url + '" title="' + item.title + '"><img src="' + item.image + '" width="120" height="76.562" alt="' + item.title + '" ><\/a><\/div>';
        };

        function mycarousel_initCallback(carousel) {
          // Pause autoscrolling if the user moves with the cursor over the clip.
          carousel.clip.hover(function() {
            carousel.stopAuto();
          }, function() {
            carousel.startAuto();
          });
        };
    jQuery(document).ready(function() {
      jQuery('#mycarousel').jcarousel({
        wrap: 'circular',
        scroll: 1,
        auto: 4,
        animation: 'slow',
        itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
        itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback},
        initCallback: mycarousel_initCallback
      });
    });
  //]]>

