function nBubbles(maxBubbles)
{
	var numBubbles = 0;
	
	$(document).mousemove(function(e)
	{
	    var produceBubble = Math.floor(Math.random()*10);
	
	    if (produceBubble > 5 && numBubbles < maxBubbles)
	    {
	        numBubbles++;
	    
	        var randomSize = Math.floor(Math.random() * 10);
	        var minSize = 16;
	        var x = e.pageX;
	        var y = e.pageY;
	        $('body').append($('<img src="assets/img/content/bubble.png" id="bubble_' + x + '_' + y + '" class="bubble"/>'));
	        $('#bubble_' + x + '_' + y).css({top:y,left:x,height:minSize+randomSize,width:minSize+randomSize}).animate(
	        {top:0,opacity:0.8},
	        {
	            easing:'easeInOutSine',
	            duration: 3000 + randomSize,
	            complete: function()
	            {
	                $(this).animate({opacity:0,height:100,width:100,marginTop:-50,marginLeft:-50},400,function(){$(this).remove(); numBubbles--;});
	            }
	        });
	    }
	});
}
