/*function animate(element) {
if (element.css("left").replace("px", "") >= 200) {
element.animate({
left: "0"

}, 3000);
}
if (element.css("left").replace("px", "") < 460) {
element.animate({
left: "+=150"
           
}, 3000);
} 
}*/
var j = jQuery.noConflict();


j(function() {
    /*$(".boxAutoNuova").each(function(i) {
    var element = $(this);
    setInterval(function() { animate(element) }, (i * 3000) + 6000);
    });*/
    setInterval(function() { move() }, 5000);
});

function move() {
    j(".boxAutoNuova").first().animate(
            { marginLeft: "+=156" },
            1000,
            function() {
                var first = j(".boxAutoNuova").first();
                var last = j(".boxAutoNuova").last();
                var element = "<div class='boxAutoNuova'>" + last.html() + "</div>";
                j(element).insertBefore(first);
                j(".boxAutoNuova").first().hide().fadeIn();
                last.remove();
                first.css({ marginLeft: "0px" });
            }
        );
}

