	function initialize_scrollcats (catID, sub) {
		jQuery.get(siteurl+"/jquery?call=topcats&catID="+catID+"&sub="+sub, function(data) {
			jQuery('#scrollcats').html(data);
			jQuery("#scrollcats").jcarousel({
		        scroll: 1,
		        initCallback: cat_initCallback,
		        buttonNextHTML: null,
			buttonPrevHTML: null,
			itemLastOutCallback: {onAfterAnimation: disableCustomButtons},
			itemLastInCallback: {onAfterAnimation: disableCustomButtons}
		    });
		});
		jQuery.get(siteurl+"/jquery?call=getdata&catID="+catID+'&sub='+sub, function(data) {
			jQuery('#scrollcontent').html(data);
			jQuery('.scrollable').scrollable();
		});
	}
	function cat_initCallback(carousel) {
		jQuery('a.catcarousel-next').click(function(e) {
	    	e.preventDefault();
	        carousel.next();
	        return false;
	    });
		jQuery('a.catcarousel-prev').click(function(e) {
	    	e.preventDefault();
	        carousel.prev();
	        return false;
	    });
	}
	function disableCustomButtons(carousel){
//	    alert(carousel.first+" "+carousel.size()+" "+carousel.last);
	    if (carousel.first == 1) {
		jQuery('.catcarousel-prev').hide();
	    } else {
	        jQuery('.catcarousel-prev').show();
	    }
	    if (carousel.last == carousel.size()) {
		jQuery('.catcarousel-next').hide();
	    } else {
		jQuery('.catcarousel-next').show();
	    }
	};
