jQuery(document).ready(function(){

	/* This checks the current screen resolution and if it's over xxx we add a column */
	
	// bbnote - insert resolution check here
	$(window).resize(
		function(){
			
			var w = $(window).width();
			if(w > 1195){
				var cols = 3;	
			}else{
				var cols = 2;	
			}
			
			if(cols == 3){
					
				// Update assorted widths
				$('#OuterBox').width(1185);
				$('#InnerBox').width(1185);
				
				// Display col3
				$('#Col1_3Col').css('display','block');
				$('#Col2_3Col').css('display','block');
				$('#Col3').css('display','inline');
				
				$('#Col1_2Col').css('display','none');
				$('#Col2_2Col').css('display','none');
				
			
				/* Explore */
				$('.ExploreCol3').css('display','inline');
				$('.Explore').addClass('Explore3Col');
			
				// Hide col3 boxes in col 1 and 2
				$('.ExploreCol1 .InCol3').hide();
				$('.ExploreCol2 .InCol3').hide();
				
				/* Footer */
				$('#Footer').addClass('Foot3Col');

			}else{
				// Update assorted widths
				$('#OuterBox').width(790);
				$('#InnerBox').width(790);
				
				// Display col3
				$('#Col1_3Col').css('display','none');
				$('#Col2_3Col').css('display','none');
				$('#Col3').css('display','none');

				$('#Col1_2Col').css('display','block');
				$('#Col2_2Col').css('display','block');
				
				/* Explore */
				$('.ExploreCol3').css('display','none');
				$('.Explore').removeClass('Explore3Col');
				
				// Hide col3 boxes in col 1 and 2
				$('.ExploreCol1 .InCol3').show();
				$('.ExploreCol2 .InCol3').show();
				
				/* Footer */
				$('#Footer').removeClass('Foot3Col');
			}
			
			box_links_setHeights();
		});

	$(window).resize();

});

