var mycarousel_itemList = [
    {id: "rec", loc: "/results/?id=1", name: "rec"},
	{id: "trophy3", loc: "/results/?id=2", name: "trophy3"},
	{id: "rosette2", loc: "/results/?id=3", name: "rosette2"},
    {id: "trophy", loc: "/results/?id=4", name: "trophy"},
    {id: "trophy4", loc: "/results/?id=5", name: "trophy4"},
	{id: "rosette", loc: "/results/?id=6", name: "rosette"},
    {id: "trophy2", loc: "/results/?id=7", name: "trophy2"},
    {id: "certificate", loc: "/results/?id=8", name: "certificate"}
];

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]));
};

function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
{
    carousel.remove(i);
};


/**
 * Item html creation helper.
 */
function mycarousel_getItemHTML(item)
{
    return '<a href="' + item.loc + '" id="' + item.id + '"><span>' + item.name + '</span></a>';
};
