var current = 0; setTimeout("animation()",1000); $('#box').velocity({ translateY: [0,500] },{ duration : 1500, easing: [70,8], }); function animation(){ nuage1start(); nuage1(); nuage2start(); nuage2(); } function nuage1start(){ $("#nuage1").animate({left:"1280px"},12000).animate({left:"-381px"},1) } function nuage1(){ $("#nuage1").animate({left:"1280px"},15000).animate({left:"-381px"},1) setTimeout("nuage1()",12000); } function nuage2start(){ $("#nuage2").animate({left:"1280px"},12000).animate({left:"-381px"},1) } function nuage2(){ $("#nuage2").animate({left:"1280px"},18000).animate({left:"-381px"},1) setTimeout("nuage2()",12000); } /*$('#box,h2,input').velocity('transition.bounceUpIn',{duration: 1000, delay: 100});*/