jQuery.noConflict();
/**
 * We use the initCallback callback
 * to assign functionality to the controls
 */
function mycarousel_initCallback(carousel) {
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
		carousel.startAuto(0);
        return false;
    });

    jQuery('#mycarousel-next').bind('click', function() {
        carousel.next();
		carousel.startAuto(0);
        return false;
    });

    jQuery('#mycarousel-prev').bind('click', function() {
        carousel.prev();
		carousel.startAuto(0);
        return false;
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    jQuery(".jcarousel-item").hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
	// Ride the carousel...
    jQuery("#mycarousel").jcarousel({
		auto: 3,
		wrap: 'last',
        scroll: 1,
        initCallback: mycarousel_initCallback,
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null
    });
	
});
