var nextPhotoreport = 6;
function carousel_callback_photoreports( carousel, state, nameofid) {
	  $('.PhotoreportsSSlider .jcarousel-next').click( function( evt ) {
	  	var last_elem = jQuery('#' + nameofid + ' li').length;
	  	var component_name = 'tltonline:photoreports_slider';
	  	    $.ajax({
	  	        type: 'POST',
	  	        url:'/ajax.php',
	  	        dataType:'json',
	  	        cache:false,
	  	        data:{page: nextPhotoreport, component:component_name, ajax:true},
	  	        success:function(data){
	  	        	carousel.add((last_elem+1), data['html']);
	  	        	nextPhotoreport = data['next_filmaff'];
	  	            carousel.size((last_elem+1));
	  	        }
	  	    });
	  	    return false;    	
	  });
	}
$(document).ready(function() {
  $('#PhotoreportsSSlider').jcarousel( {
  	scroll: 2,
  	nameofid: 'PhotoreportsSSlider',
      initCallback: carousel_callback_photoreports
  });
});
