// JavaScript Document


$(window).load( function() {
	
	// adjust column height
	var $leftHeight = $('#left').height();
	var $rightHeight = $('#right').height();
	if($rightHeight==null){
		$rightHeight = 0;	
	}
    var $centerHeight = $('#center').height();
	if($centerHeight==null){
		$centerHeight = 0;	
	}
	var $wideHeight = $('#wide').height();
	if($wideHeight==null){
		$wideHeight = 0;	
	}
	
	//alert('left:'+ $leftHeight + ', right:'+ $rightHeight + ', center:'+ $centerHeight  + ', wide:'+ $wideHeight );
	var array = [$leftHeight, $rightHeight, $centerHeight, $wideHeight];
	var maxHeight = Math.max.apply(Math, array);
	$('#center').height(maxHeight);
	$('#left').height(maxHeight);
	$('#right').height(maxHeight);
	$('#wide').height($wideHeight + 'px');
	
	
	 
	
	$('#menu li a').hover(
	  function () {
		$(this).parent().addClass("hover");
	  },
	  function () {
		$(this).parent().removeClass("hover");
	  }
	);
	
});

$(document).ready(function(){
		$("a[href^='http:']").not("[href*='amlalliance.com']").attr('target','_blank');
	});
