function initMenu()
{
var _nav = document.getElementById("nav");
if (_nav) {
   var nodes = _nav.getElementsByTagName("li");
   for (var i=0; i<nodes.length; i++) {
      nodes[i].onmouseover = function()
      {
         if (this.className.indexOf('hover') == -1)
            this.className += " hover";
      }
      nodes[i].onmouseout = function()
      {
         this.className = this.className.replace(" hover", "");
      }
   }
}
}
if (document.all && !window.opera) attachEvent("onload", initMenu);


function bookmarksite(title, url) { 
	if (document.all) {
		window.external.AddFavorite(url, title); 
	}
	else if (window.sidebar) {
		window.sidebar.addPanel(title, url, "");
	}
} 

$(document).ready(function(){
	$("#article a").each(
		function(){
			if($(this).attr('href').indexOf('http') == 0){
				$(this).attr('target','_blank');
			}
		}
	);
	$(".logo").click(function(){
		document.location.href = '/';
	});
	$(".bottom-link").click(function(){
		document.location.href = '/discover-tec';
	});
	
	
	
	var chairboxheight = $("#featuredchaircontent").height();
	var memberboxheight = $("#featuredmembercontent").height();
	var speakerboxheight = $("#featuredspeakercontent").height();
	var h = Math.max(chairboxheight,memberboxheight,speakerboxheight);
	
	 $("#featuredchaircontent").height(h);
	 $("#featuredmembercontent").height(h);
	 $("#featuredspeakercontent").height(h);
	$("#searchgo").click(function(){
		tecsearchsubmit();
	});
	
	$("#tecsearch").submit(function(){
		tecsearchsubmit();
		return(false);
	});

});
function tecsearchsubmit(){
	document.location.href='/search?q='+$("#searchtext").val();
	//alert('/search/?q='+$("#searchtext").val());
}
