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

	jQuery('#mycarousel-prev').bind('click', function() {
	carousel.prev();
	
	return false;
	});
	
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

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

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




// mybanner
function mybanner_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

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

jQuery(document).ready(function() {
    jQuery('#mybanner').jcarousel({
        auto: 5,
        wrap: 'circular',
        scroll:1,
        initCallback: mybanner_initCallback
    });
});




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

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

jQuery(document).ready(function() {
	jQuery('#mygallery').jcarousel({
		scroll: 1,
		initCallback: mygallery_initCallback,
		// This tells jCarousel NOT to autobuild prev/next buttons
		buttonNextHTML: null,
		buttonPrevHTML: null
	});
});


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

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

jQuery(document).ready(function() {
	jQuery('#mypartners').jcarousel({
		scroll: 1,
		initCallback: mypartners_initCallback,
		// This tells jCarousel NOT to autobuild prev/next buttons
		buttonNextHTML: null,
		buttonPrevHTML: null
	});
});
