var mycarousel_itemList = [
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/MBaseball.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/MGolf.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/MGym.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/MIceHockey.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/MSoccer.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/MTennis2.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/MWaterPolo.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/MWrestling.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WFencing.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WField.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WFieldHockey.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WIceHockey.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WRow.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WSki.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WSoccer2.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WSoftball.jpg", title: "Flower1"},
{url: "http://web1.ncaa.org/web_files/ui/images/publicGallery/WSwim.jpg", title: "Flower1"}
];

function mycarousel_itemLoadCallback(carousel, state)
{
    for (var i = carousel.first; i <= carousel.last; i++) {
        if (carousel.has(i)) {
            continue;
        }

        if (i > mycarousel_itemList.length) {
            break;
        }

        carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[i-1]));
    }
};

/**
 * Item html creation helper.
 */
function mycarousel_getItemHTML(item)
{
    return '<img src="' + item.url + '" width="183" height="126" alt="' + item.url + '" />';
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        size: mycarousel_itemList.length,
		scroll: 1,
		auto: 4,
        itemLoadCallback: {onBeforeAnimation: mycarousel_itemLoadCallback}
    });
});

