/**
 * 
 */

// JavaScript Document
$('#mypic').hover(function() {
	$('#mypic').animate({
		top : -50
	}, 400);
}, function() {
	$('#mypic').animate({
		top : 0
	}, 130);
});


$(document).ready( function() {
	
    setInterval('doAnimation()', 0);
});


function cloudRBottom() {
	
		 $('#cloud-r-bottom').animate({
			    opacity: 0.0,
			    left: '+=50'
			  }, 10000, function (){ 
				  console.log('wtf');
				  $('#cloud-r-bottom').css({'left':'600px','opacity':'1.0'});	
			  });

};



function doAnimation() {
	
	$('#cloud-r-bottom').animate({
	    opacity: 0.0,
	    left: '+=100'
	  }, 20000, function (){ 
		  $('#cloud-r-bottom').remove();
	  });

	
    animateMiddleCloud();
    animateBigCloud();
    animateLeftCloud();
   
}
function animateMiddleCloud() {
	$('#cloud-middle').animate({
	    opacity: 0.0,
	    left: '+=300'
	  }, 30000, function (){ 
		  $('#cloud-middle').remove();
	  });
	}

function animateBigCloud() {
	$('#big-cloud').animate({
	    opacity: 0.0,
	    left: '700'
	  }, 100000, function (){ 
		  $('#big-cloud').remove();
	  });
	}

function animateLeftCloud() {
	$('#cloud-left').animate({
	    opacity: 0.0,
	    left: '700'
	  }, 
	  70000, function (){ 
		  $('#cloud-left').remove();
	  });
	}




