$(document).ready(function() {
		var link = $("#link_pdf").attr("href");
$("#link_pdf").click(function(event) {

   	var tipo = $('.radio_pagamento:checked').val();
		$(this).attr("href",link +"tipo:"+tipo);
});
			//tolgo la prima immagine
			$("#a3")
				.css("cursor","default")
				.click(function(event) {
				  event.preventDefault();
			});
			$("#a10951")
				.css("cursor","default")
				.click(function(event) {
				  event.preventDefault();
			});

			
			$(".div_main_menu .livello1 a").each(function(){
				if($(this).hasClass("selected2")) {
					
					$(this).find(".sss").show();
					$(this).find(".def").hide();
					//$(this).parent().find("ul").show();
					$(this).parent().find("ul").addClass("selected");
					
					
				}
			});
			
			$(".div_main_menu a").hover(function(){
				
				$(this).parent().parent().find(".livello2").hide();
				$(this).parent().parent().find(".sss").hide();
				$(this).parent().parent().find(".def").show();

				$(this).find(".def").hide();
				
				$(this).find(".sss").show();
				
				$(this).parent().find("ul").show();
				
			},function(){
				
				$(this).parent().parent().find(".sss").hide();
				$(this).parent().parent().find(".def").show();
				
			});
			
			$(".div_main_menu .livello2").hover(function(){
					
					$(this).prev().find(".sss").show();
					$(this).prev().find(".def").hide();
					
					
				},function(){
					$(this).prev().find(".sss").hide();
					$(this).prev().find(".def").show();
					
				});
				
			$(".div_main_menu").hover(function(){
				
			},function(){
				$(this).find(".livello2").hide();
				//$(this).find(".selected").show();
				
				if($(this).find("a").hasClass("selected2")) {
					
					$(this).find(".selected2").find(".sss").show();
					$(this).find(".selected2").find(".def").hide();
				}
			});
});	



