$(document).ready(function(e){
	$("#col_sx .video a").click( function() {
		var url = $("#col_sx .video a").attr("href").replace("http://www.youtube.com/watch?v=", "");
		$("#popup .popup_video .content").html("<iframe class=\"youtube-player\" type=\"text/html\" width=\"860\" height=\"513\" src=\"http://www.youtube.com/embed/"+ url +"\" frameborder=\"0\"></iframe>");
		$("#popup .popup_video").css({"display" : "block"})
		return false
	});
	
	$("#popup .chiudi").click( function(){
		$("#popup .popup_video").css({"display" : "none"});
		$("#popup .popup_video .content").html("");
		return false
	});
	
	
	$("a.link_blank, .l_pizze a, .allegati a").click( function() {
		$(this).attr("target", "blank");
	});
	
	
	$("#col_dx .box a").hover(
		function() {
			var content = $(this).closest(".box").find(".over").html();
			$("#popup .popup_over").html(content);
			$("#popup .popup_over").css({"display" : "block"})
			$(this).closest(".box").addClass("over");
			
			},
		function() {
			$("#popup .popup_over").css({"display" : "none"});
			$(this).closest(".box").removeClass("over");
			$("#popup .popup_over").html("");
			}
	);
	$('a.lb').colorbox();
	$('a.info').colorbox({width:"550px", height:"400px", iframe:true});

	$("#slideshow li").css({"opacity":"0"});
	setInterval( "$(\"#slideshow li.imgA\").animate({opacity: 1.0}, {duration:3000, queue:false}, function() { })", 5000 );
	setInterval( "$(\"#slideshow li.imgB\").animate({opacity: 1.0}, {duration:3000, queue:false}, function() { })", 16000 );

});








































