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;
		});
};


function next(){
	photo_init++;
	if(photo_init > max_photo){
		photo_init = max_photo;
	}
}

function prev(){
	photo_init--;
	if (photo_init < 1) {
		photo_init = 1;
	}
}


var max_photo;
//var photo_init = 1;
var now_id;

jQuery(document).ready(function() {
		jQuery("#mycarousel").jcarousel({
                        start: nr_obrazka,
			scroll: 3,
			initCallback: mycarousel_initCallback,
			buttonNextHTML: null,
			buttonPrevHTML: null
		});
});
