function highlight(carousel, obejctli,liindex,listate){
     jQuery('.jcarousel-control a:nth-child('+ liindex +')').attr("class","selected");
}

function removehighlight(carousel, obejctli,liindex,listate){
     jQuery('.jcarousel-control a:nth-child('+ liindex +')').removeAttr("class","selected");
}

function mycarousel_initCallback(carousel)
{
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });

    jQuery('.jcarousel-scroll select').bind('change', function() {
        carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);
        return false;
    });

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

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

};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 6,
		scroll: 1,
		visible: 1,
        wrap: 'both',
        easing: 'easeInOutQuad',
        animation: 750,
		buttonNextHTML: null,
		buttonPrevHTML: null,
        itemVisibleInCallback:  highlight,
    	itemVisibleOutCallback: removehighlight,
        initCallback: mycarousel_initCallback
    });
 });
