if( !console ) { var console = { log: function(msg) { alert(msg); } } }

function measureCol2(){
	var getleftContentCol1Height = $('.leftContentContainer .col1').height();
	var getleftContentCol2Height = $('.leftContentContainer .col2').height();
	if ( getleftContentCol2Height < getleftContentCol1Height) {
		$('.smallContainerDiv').height((getleftContentCol1Height - 44));
	}
	var getleftContentBoxHeight = $('.leftContentBox').height();
	var getrightContentBoxHeight = $('.rightContentBox').height();
		var findShowHideDiv = $().find('.showHideDiv');
		var findMembershipDiv = $().find('.matchHeightContainer');
	if ( getleftContentBoxHeight < getrightContentBoxHeight) {
	//console.log(getleftContentBoxHeight, getrightContentBoxHeight);
		$('.leftContentBox dl').height(getrightContentBoxHeight);
	} else {
		if (findShowHideDiv != "") {
			$('.rightContentBox .showHideDiv').height(getleftContentBoxHeight);
		}//findShowHideDiv
		else { $('.rightContentBox dl').height(getleftContentBoxHeight);
		}
		if (findMembershipDiv != "") {
			$('.rightContentBox .matchHeightContainer').height(getleftContentBoxHeight);
		}//findMembershipDiv
		else { $('.leftContentBox dl').height(getrightContentBoxHeight);
		}
	}
}

window.onload = measureCol2;

$().ready(function() {
	//Top menu nav effect on hover
	$('.navMenu ul').hover(
      function () {
		var getlastColunmNav = $(this).attr('id');
       $(this).addClass("over");
		if(getlastColunmNav == 'col6'){ $('.signUp').addClass("fontWhite"); }
      }, 
      function () {
		var getlastColunmNav = $(this).attr('id');
       $(this).removeClass("over");
	   if(getlastColunmNav == 'col6'){ $('.signUp').removeClass("fontWhite"); }
      }
    );//end
	//show and hide Opportunities - Volunteers
	$('.showHideDiv dl').find('dd').hide().end().find('dt').click(function() {
		$('.showHideDiv').css('height','auto');
		 var details = $(this).next();
		 if (details.is(':visible')) {
			 $(this).removeClass('open').addClass('close');
			 details.hide();
			 measureCol2();
		 } else {
			 $(this).removeClass('close').addClass('open');
			 details.show();
			 measureCol2();
		 }
	});//end

});//main
