//<?php header('Content-Type: application/javascript; charset=UTF-8'); ?>

function mainmenu(){
$(" #nav ul ").css({display: "none"}); // Opera Fix
$(" #nav li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
		},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
		});
}
 
$(document).ready(function(){					
	mainmenu();
	
	//galleria immagini PHG1
	$(".phg1-thumbnail").click(function (e) {
	$("#phg1-thumbnailsWrapper").children().removeClass("selected");
	$(this).addClass("selected");
	thesrc = $(this).find("img").attr("src");
	zoomsrc = $(this).find("img").attr("alt");
	//zoomsrc = thesrc.replace("_th","_zoom");
	//$("#phg1-zoomWrapper").html('<img src="'+$(this).find("img").attr("src").replace("_th","_zoom")+'" />');
	$("#phg1-zoomWrapper").html('<img src="'+$(this).find("img").attr("alt")+'" />');
	});


	$(".zoomable").fancybox({
		'overlayShow': true,
		'imageScale': false
	});
	
	$(".refCountry").fancybox({
		'overlayShow': true,
		'frameWidth': 533,
		'frameHeight': 300
	});
	
	$("#lingua-tendina").hover(
	 function () {
		$("#lingua-tendina-lista").css({visibility: "visible",display: "none"}).slideDown();
      }, 
      function () {
		$("#lingua-tendina-lista").css({visibility: "hidden"});
      }
	);
	
	//contenuti-prod
	$(".people-service-simone-franchi").click(
		function() {
			$("#contenuti-prod").load("/shared/ajax/service.php",{persona: 'simone-franchi', url: location.href});
		}
	);
	$(".people-service-vincenzo-tripodi").click(
		function() {
			$("#contenuti-prod").load("/shared/ajax/service.php",{persona: 'vincenzo-tripodi', url: location.href});
		}
	);
	$(".people-service-fausta-mavilla").click(
		function() {
			$("#contenuti-prod").load("/shared/ajax/service.php",{persona: 'fausta-mavilla', url: location.href});
		}
	);
	$(".people-service-elisa-pelati").click(
		function() {
			$("#contenuti-prod").load("/shared/ajax/service.php",{persona: 'elisa-pelati', url: location.href});
		}
	);

});