// JavaScript Document

var lengths = new Array();

$(document).ready(function(){
	$(".menuItem").each(function(i) {
		lengths.push(Math.round(Math.random()*10+1)*10);
		$(this).attr("i",lengths[i]);
	});
	$(".menuItem").mouseenter(function () {
		$(this).animate({height:(Number($(this).attr("i"))+100)+'px'},{duration:100,queue:false});
	});
	$(".menuItem").mouseleave(function () {
		$(this).animate({height:'100px'},{duration:500,queue:false});
	});
});

function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}
window.onload = externalLinks; 
