function mycarousel_initCallback(carousel) {
   jQuery('.jcarousel-control a').bind('click', function() {
		carousel.scroll(jQuery.jcarousel.intval(jQuery(this).attr("rel")));
        return false;
    });
};

var clicked; // cliccato	
function mycarousel_itemFirstInCallback(carousel, item, idx, state) {	
	jcar = jQuery('.jcarousel-control')
	
	$("img[rel='"+idx+"']", jcar).attr("src", "wp-content/themes/drop/images/bullet_ctrl_over.gif");
	if (clicked!=undefined){
		clicked.attr("src", "wp-content/themes/drop/images/bullet_ctrl.gif");
	}
	
	clicked = $("img[rel='"+idx+"']", jcar);
};


// Carousel TOP
jQuery(document).ready(function() {
								
    jQuery("#mycarousel").jcarousel({
        initCallback: mycarousel_initCallback,
        itemFirstInCallback: mycarousel_itemFirstInCallback,
        easing: 'easeInOutExpo',
        wrap: 'last',
        auto: 5,
        animation: 1200,
        scroll:1
    });
});

// Carousel Clienti
jQuery(document).ready(function() {
    jQuery("#mycarousel-clienti").jcarousel();});



