// JavaScript Document
jQuery(function($) {
	
	// get height of tallest column
	var t = [];
	$("#main").children().each(function(){
		t.push($(this).height());
	});
	t = Math.max.apply(Math, t);
	
	// set all columns to tallest height. Or, if page < window, make up the difference.
	var w = $(window).height() - ($('#header').height() + 24 + 38 + t);
	h = Math.max(w+t, t);
	
	// set height
	$("#main").children().height(h);
	
	$(window).resize(function(){
		w = $(window).height() - ($('#header').height() + 24 + 38 + t);
		h = Math.max(w+t, t);
		$("#main").children().height(h);
	});
	
	if ( $("body").hasClass('home') ) {
		$(".page-item-451").addClass('current_page_parent');
	}
	$(".current_page_item").addClass('current_page_parent');
	$("ul.sf-menu").superfish({ 
		pathClass:  'current_page_parent' 
	});
	
	$('#blog-description').click(function() {window.open("http://www.brennanrealestate.com")}).css('cursor', 'pointer');
	$('a[href$=".pdf"]').addClass('pdf').attr('target', '_blank');
	
});

