function setThreeDots() {
    $('.item_short').ThreeDots({
        max_rows: 1,
        whole_word: true,
        ellipsis_string: '...'
    });
//    $('.item_short2').ThreeDots({
//        max_rows: 1,
//        whole_word: true,
//        ellipsis_string: '...'
//    });
}

$(document).ready(function () {
    setThreeDots();
});

var delay = 5000;
var count = 20;
var showing = 5;
var i = 0;
function move(i) {
    return function() {
      $('#recent'+i).remove().css('display', 'none').prependTo('.items');
    }
}
function shift() {
var toShow = (i + showing) % count;
$('#recent'+toShow).slideDown(1000, move(i));
$('#recent'+i).slideUp(1000, move(i));
i = (i + 1) % count;
setTimeout('shift()', delay);
}
$(document).ready(function() {
setTimeout('shift()', delay);
});

