    
var mycarousel_itemList = [
    { html: '<table id="Table_01" width="820" height="500" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <a href="/style/show.aspx?catid=1381&img=snowskoter/90.jpg"> <img src="http://cdn4.ridestore.se/sv/1-sclwwk.jpg" width="318" height="500" border="0" alt=""></a></td> <td> <a href="/style/show.aspx?catid=1440&img=snowski/107.jpg"> <img src="http://cdn4.ridestore.se/sv/1-npcgjv.jpg" width="242" height="500" border="0" alt=""></a></td> <td> <a href="/style/show.aspx?catid=1439&img=snowski/106.jpg"> <img src="http://cdn4.ridestore.se/sv/1-alitnm.jpg" width="260" height="500" border="0" alt=""></a></td> </tr> </table>' },
    { html: '<table id="Table_01" width="820" height="500" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <a href="/style/show.aspx?catid=1366&img=snowskoter/86.jpg"> <img src="http://cdn1.ridestore.se/slides/sv/snow/jan11/2/SNOW_110105_2_01.jpg" width="260" height="500" border="0" alt=""></a></td> <td> <a href="/style/show.aspx?catid=1367&img=snowski/87.jpg"> <img src="http://cdn1.ridestore.se/slides/sv/snow/jan11/2/SNOW_110105_2_02.jpg" width="279" height="500" border="0" alt=""></a></td> <td> <a href="/style/show.aspx?catid=1330&img=snowski/73.jpg"> <img src="http://cdn1.ridestore.se/slides/sv/snow/jan11/2/SNOW_110105_2_03.jpg" width="281" height="500" border="0" alt=""></a></td> </tr> </table>' },
    { html: '<table id="Table_01" width="820" height="500" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <a href="/style/show.aspx?catid=1344&img=snowskoter/75.jpg"> <img src="http://cdn1.ridestore.se/slides/sv/snow/jan11/3/SNOW_110105_3_01.jpg" width="250" height="500" border="0" alt=""></a></td> <td> <a href="/style/show.aspx?catid=1303&img=snowskoter/67.jpg"> <img src="http://cdn1.ridestore.se/slides/sv/snow/jan11/3/SNOW_110105_3_02.jpg" width="226" height="500" border="0" alt=""></a></td> <td> <a href="/style/show.aspx?catid=1333&img=snowski/74.jpg"> <img src="http://cdn1.ridestore.se/slides/sv/snow/jan11/3/SNOW_110105_3_03.jpg" width="344" height="500" border="0" alt=""></a></td> </tr> </table>' }
];

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);

    jQuery('#stylecontrol-pager a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        carousel.stopAuto();
        return false;
    });

    $("#stylecontrol-pager a").removeClass("selected");
    $("#stylecontrol-pager a:eq(" + (idx - 1) + ")").addClass("selected");

    carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
};

function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt) {
    carousel.remove(i);
};

/**
* Item html creation helper.
*/
function mycarousel_getItemHTML(item) {
    return item.html;
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        wrap: 'circular',
        itemVisibleInCallback: { onBeforeAnimation: mycarousel_itemVisibleInCallback },
        itemVisibleOutCallback: { onAfterAnimation: mycarousel_itemVisibleOutCallback },
        auto: 6,
        scroll: 1
    });

});
