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();
    $("#menu>li").mouseover(function(){ 
      $(this).addClass("over");
    }).mouseout(function(){
      $(this).removeClass("over");
    });

    $("#rightMenu").find("li").mouseover(function(){ 
      $(this).addClass("over");
    }).mouseout(function(){
      $(this).removeClass("over");
    });

	$(".objekt").click(function() {
		window.location.href = $(this).find("a.link").attr("href");
		}
	);

    $(".objDetail").find(".objekt").unbind("click");
    $(".item").unbind("click");

}
    function openWindow(path, name, width, height) {

        var winl = (screen.width - width) / 2;
        var wint = (screen.height - height) / 2;

        style = eval("'status=no,width="+width+",height="+height+",left="+winl+",top="+wint+",resizable=yes,menubar=no,scrollbars=yes,toolbar=no'");
        window.open(path, name, style) ;
    }
