jQuery(document).ready(function() {
	// INIT Carosuel
	function mycarousel_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);
		});
		
		jQuery('.jcarousel-control a').bind('click', function() {
			carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
			return false;
		});
		
		jQuery('#wd-intro a').bind('click', function() {
			carousel.scroll(jQuery.jcarousel.intval(jQuery(this).attr('rel')));
			return false;
		});
	
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	}
	
	jQuery('#serviceslist').jcarousel({
		auto: 15,
		scroll: 1,
		wrap: 'last',
        initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
        buttonPrevHTML: null
	});
});
