
	function mycarousel_initCallback(carousel)
	{
	    // Disable autoscrolling if the user clicks the prev or next button.
		$('#slider_nav_next').bind('click', function() {
			carousel.startAuto(0);
			if (carousel.last == carousel.size()) {return false} else{			
	        carousel.next();
			}
	        return false;
	    });

		$('#slider_nav_prev').bind('click', function() {
	        carousel.startAuto(0);
	    	if (carousel.first == 1) {return false} else{           
		        carousel.prev();
		    	}
		        return false;
	    });

	    // Pause autoscrolling if the user moves with the cursor over the clip.
	    carousel.clip.hover(function() {
	        carousel.stopAuto();
	    }, function() {
	        carousel.startAuto();
	    });
	};

$(document).ready(function() {
	
	
	//  slideshow
	



	    $('#slider').jcarousel({
	    	 auto:2,
	         wrap: 'last',
	         scroll: 1,
	         initCallback: mycarousel_initCallback,
	         buttonNextHTML: null,
	         buttonPrevHTML: null
	    });

	    $('#slide_neigh').jcarousel({
	    	 auto:2,
	         wrap: 'last',
	         scroll: 1,
	         initCallback: mycarousel_initCallback,
	         buttonNextHTML: null,
	         buttonPrevHTML: null
	    });	
});
