
function mycarousel_initCallback(carousel) {
    
	jQuery('.next_thumb, .gallery_wrapper img').bind('click', function() {
        carousel.next();
        return false;
    });

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

// Ride the carousel...
jQuery(document).ready(function() {
	$('ul#thumbs li:nth-child(1n)').addClass('active');      
	$("#thumbs").jcarousel({
		scroll: 1,
		wrap: 'both',
        initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
        buttonPrevHTML: null 
    });
	$('.jcarousel-prev, .jcarousel-next').css('opacity', 0.2); 
	$('.jcarousel-prev, .jcarousel-next').hover(function () {
            // on hover
            $(this).stop().fadeTo(400, .75);
        }, function () {
            // off hover
            $(this).stop().fadeTo(800, 0.2);
    });
}); 
        