// Freaking A. Make this not stupid
jQuery(document).ready(function() {
  jQuery('.gallery-carousel').each( function(i,oDiv) {
    var list = $(oDiv).find('ul'); 
    var size = $(list).children('li').size(); 
    if(size) {
      $(list).jcarousel({
      scroll: 1,
      visible: 4,
      wrap: 'both'
      });
    }


		if(size<=3) {
			$(oDiv).find('.jcarousel-next').remove(); 
			$(oDiv).find('.jcarousel-prev').remove(); 
		}

		if (!size) {
			$(oDiv).remove();
		}
  });
});
