var idBallon = 0; //Id do balão que está sendo exibido no momento
var animate = true;


function openBallon(){
   $('.animated_box .ballon').hide();
   $('#pos'+idBallon+' .ballon').fadeIn('fast');
}

function animateBallons(){
  
  if(animate==true){
    if(idBallon>=4){
      idBallon = 1;
    }
    else{
      idBallon += 1;
    }
    
    openBallon();
    setTimeout(
      function(){
          $('#pos'+idBallon+' .ballon').fadeOut('normal', animateBallons);
      }, 5000
    );
  }
  else{
    setTimeout('animateBallons()', 500);
  }
}

var lala;



jQuery(document).ready(function(){

    $("#list-roll-games").jcarousel({
				scrol: 1,
        auto: 4,
				wrap: 'both',
        initCallback: function(x){
            $('#list-roll-games').mouseenter(function(){
                x.stopAuto();
            }).mouseleave(function(){
                x.startAuto();
            })
        }
    });
    
/*
    $('.animated_box .ballon').hide();
    $(".main").mouseenter(function() {
			animate = false;
		});
		$(".main").mouseleave(function() {
			animate = true;
		});
    animateBallons();
    $('.animated_box').mouseover(
      function() {
         $('.animated_box .ballon').hide();
         $('.ballon', this).show();
      }
    );
*/

});




