 $(document).ready(function(){
 	
 	//IE6 hover
 	if(getInternetExplorerVersion() <= 6){
		$("#menu li").hover( function(){ $(this).addClass("over"); }, function(){ $(this).removeClass("over"); });
 	}
 	
 	$("#menu .submenu-ul > li").hover(
 		function(){

 			var subsub_height = $(this).children('.col-2').height();
 			var submenu_height = $(this).parent().parent().height();

			if(subsub_height < submenu_height){
				$(this).children('.subsub').height(submenu_height);
				$(this).parent().parent().height(submenu_height);
			}
			else {
				$(this).parent().parent().height(subsub_height);
				$(this).children('.subsub').height(subsub_height);
			}

 		},
 		function(){
 			//Uncomment if height is not fixed to max
			//$(this).find('.subsub').css('height','auto');
			//$(this).parent().parent().css('height','auto');
 		}
 	);
 	
	 
});


function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}
