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 = function() {
    externalLinks();   

	$("div.gallery").find("a").hover(
		function() { $(this).css({opacity: 0.5});  },
		function() { $(this).css({opacity: 1.0});  }
	);  

	$("ul#menu").find("li").hover(
		function() { $(this).addClass("over");  },
		function() { $(this).removeClass("over");  }
	);

    $(".txtDate").datepicker({showOn: 'both', buttonImage: '/img/date.gif', buttonImageOnly: true});

}