$(document).ready(function(){
	
	$('.floorplan').css('display', 'none');
	
	var $roomLabel = $('.floorplan th:eq(0)').html();
	var $sizeLabel = $('.floorplan th:eq(1)').html();
	var $sqLabel = $('.floorplan th:eq(2)').html();
	var $theatreLabel = $('.floorplan th:eq(3)').html();
	var $classLabel = $('.floorplan th:eq(4)').html();
	
	$('.floorplan th').each(function(){	
									
		var $targetHtml = $(this).html();							 
		
		switch($targetHtml ){
			case $roomLabel:
				$(this).css('width', '90px');
				break;
				
			case $sizeLabel:
			$(this).css('width', '60px');
				break;
				
			case $sqLabel:
				$(this).css('width', '60px');
				break;
				
			case $theatreLabel:
				$(this).css('width', '80px');
				break;
				
			case $classLabel:
				$(this).css('width', '100px');
				break;		
		}
		
 	});
	
	$('#nav-floorplan ul li a').each(function(index){
		$(this).attr({'href': 'javascript:void(0)'});
		
		var section = $(this).attr('rel');
		
		$(this).click(function(){
			var targetDiv = $('#'+section);
			
			$('.floorplan').css('display', 'none');
						
			targetDiv.css('display', 'inline');
			
		});		
	})						   
});
