Carousel using a function passed a target element
You can remove the active class along with the other classes, and you can chain the prev and next calls:

var render = function (cont) {
  cont.parent().children().removeClass('active next prev next_next prev_prev');
  cont.addClass('active');
  cont.next().addClass('next').next().addClass('next_next');
  cont.prev().addClass('prev').prev().addClass('prev_prev');      
};