Individualize jQuery cookie function

That was a typo probably. I just found out that I had the wrong link. @Paul_Wilkins thank you so much for the link you provided. Also getting it to work properly has been a heck of a problem for me. It works now, though not perfect. Trying to make it leaner and faster. Question, how do I update the cookie to say that it is closed? the code now looks as below.

// Mobile Nav Display condition //

var $ = jQuery.noConflict();


// Alert session cookie starts here 
$(document).ready(function(){

 $('.alert-box').attr('id', function(i) {
   return 'alert'+(i+1);
});

function closeBox(){	
	  
		var closeBox = $('#alert1').remove();
    // - Notice how we pass a function and get an integer
		$.cookie('Box-closed', true, {path: '/'});
		
	}
    
	// - Simply checks the alert box above
	if($.cookie('Box-closed')){
		console.log('Closing the alert box automatically...');
		closeBox();
		
	}
	
		// Close the box on click
	$('#alert1 .alert-switch').click(function () {
           
		   closeBox();
        
    });    
    
    
    function closeBox2(){		  
		var closeBox2 = $('#alert2').remove();
    // - Notice how we pass a function and get an integer
		$.cookie('Box2-closed', true, {path: '/'});
		
	}
    
	// - Simply checks the alert box above
	if($.cookie('Box2-closed')){
		console.log('Closing the alert box automatically...');
		closeBox2();
		
	}
	
		// Close the box on click
	$('#alert2 .alert-switch').click(function () {
           
		   closeBox2();
        
    });
    
    
    
    function closeBox3(){		  
		var closeBox3 = $('#alert3').remove();
    // - Notice how we pass a function and get an integer
		$.cookie('Box3-closed', true, {path: '/'});
		
	}
    
	// - Simply checks the alert box above
	if($.cookie('Box3-closed')){
		console.log('Closing the alert box automatically...');
		closeBox3();
		
	}
	
		// Close the box on click
	$('#alert3 .alert-switch').click(function () {
           
		   closeBox3();
        
    });
    

	});