// JavaScript Document
/************* REQUIRES JQUERY FRAMEWORK!!! ***************/
// column borders
var maxHeight = 0;
var winner = '';

$(document).ready(function() {
	$('.colfix').each(function(i) {
		$(this).css('border', 'none');
		// find highest
		if ($(this).height() > maxHeight) {
			maxHeight = $(this).height();
			winner = $(this);
		}
	});

	// add border
	switch (winner.attr('id')) {
		case 'col1':
			$('#col3')
				.height(winner.height())
				.css("border-left", "1px solid #9F9D99");
			winner.css("border-right", "1px solid #9F9D99");
			break;
		case 'col2':
			winner.css( { 'border-right': '1px solid #9F9D99', 'border-left': '1px solid #9F9D99' } );
			break;
		case 'col2wide':
			winner.css('border-left', '1px solid #9F9D99');
			break;
		case 'col3':
			$('#col1')
				.height(winner.height())
				.css("border-right", "1px solid #9F9D99");
			winner.css("border-left", "1px solid #9F9D99");
			break;
	}
	// this corrects a render bug in IE7 where the in-context editor wipes away the H2 from the page
	$('h2').css( {'display': 'block', 'visibility': 'visible'} );
	
	// temp fix for text
	$('#quick-links .header h2').html('Quick Test');
});
