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";
	}
}


jQuery(document).ready(function() {  // do things when DOM is ready

	//Privacy text
	/*
	jQuery('#OpenInfo').click(function(){
		jQuery('#Informativa').show("slow");
	});

	//Un link class close fa scomparire il tag "nonno" :)
	jQuery('.close').click(function(){
		jQuery(this).parent().parent().hide("slow");
	});
	jQuery('#Informativa').click(function(){
		jQuery(this).hide("slow");
	});
	*/


	//Main Menu
	/*
	jQuery('#MainMenu ul').hide();

	jQuery("#MainMenu li:has(ul)").hover(function() {
		jQuery(this).addClass("current-cat");
		//jQuery(this).children("ul").css("display", "none"); Hides sub-sub-menu
		jQuery(this).children("ul").slideDown("normal");
		},
		function(){
			jQuery(this).children("ul").slideUp("fast");
			jQuery(this).removeClass("current-cat"); // Specificato per far funzionare IE
		}
	);
	*/

	//Un link class close fa scomparire il tag "nonno" :)
	jQuery('.close').click(function(){
		jQuery(this).parent().parent().hide("slow");
	});

	//News galleries opacity

	/*
	jQuery(".ngg-galleryoverview img,img.carlist").animate({opacity: 0.85}, 0);
	jQuery(".ngg-galleryoverview img,img.carlist").hover(function () {
      jQuery(this).animate({
          opacity: 1
      }, 250);
    }, function () {
      jQuery(this).animate({
          opacity: 0.75
      }, 250);
    });
	*/

	//Annullo il thickbox
	//jQuery(".ngg-galleryoverview img:eq(0)").click(function () {return false}); //.ngg-galleryoverview img,img.carlist
	//jQuery(".ngg-galleryoverview img:eq(0)").css('cursor','default');



	externalLinks();


});
