		jQuery(document).ready(function(){

			//LINK AGGIUSTA
			jQuery("a[href$='.jpeg'],a[href$='.jpg'],a[href$='.png'],a[href$='.gif']").attr("rel","prettyPhoto");
			jQuery("a[rel^='prettyPhoto']").prettyPhoto();
			
			//PRIMO PIANO - SLIDE
			jQuery("td#slide table.tbBeige:not(:first)").hide();
			jQuery("td#slide div#sp:first").hide();
			//jQuery("td#centerCcolumn table.tbBeige").hide();
			//jQuery("table#tableBlock span#textSPAN8").hide();
			/*jQuery("td#slide span.up:first").hide();
			jQuery("td#slide span.down:not(:first)").hide();
			jQuery("span.primopiano:not(:first)").hide();
			jQuery("span.secpagina:not(:first)").hide();
			jQuery("span.primopiano:first").toggleClass("evidenzia");*/
			
			//ARTICOLI BOX HOME PAGE
			jQuery("table#tableBlock span#textSPAN1:not(:first)").hide();
			jQuery("table#tableBlock span#textSPAN2:not(:first)").hide();
			jQuery("table#tableBlock span#textSPAN3:not(:first)").hide();
			jQuery("table#tableBlock span#textSPAN4:not(:first)").hide();
			jQuery("table#tableBlock span#textSPAN5:not(:first)").hide();
			jQuery("table#tableBlock span#textSPAN6:not(:first)").hide();
			
			jQuery("td#centerCcolumn td#tdCat").height(1);
			jQuery("td#centerCcolumn span.down").hide();

			jQuery("table#tableBlock span#downCat1:first").hide();
			jQuery("table#tableBlock span#downCat2:first").hide();
			jQuery("table#tableBlock span#downCat3:first").hide();
			jQuery("table#tableBlock span#downCat4:first").hide();
			jQuery("table#tableBlock span#downCat5:first").hide();
			jQuery("table#tableBlock span#downCat6:first").hide();

			jQuery("table#tableBlock span#downCat1:not(:first)").siblings(".itemTitle").addClass("itemTitleLittle");
			jQuery("table#tableBlock span#downCat2:not(:first)").siblings(".itemTitle").addClass("itemTitleLittle");
			jQuery("table#tableBlock span#downCat3:not(:first)").siblings(".itemTitle").addClass("itemTitleLittle");
			jQuery("table#tableBlock span#downCat4:not(:first)").siblings(".itemTitle").addClass("itemTitleLittle");
			jQuery("table#tableBlock span#downCat5:not(:first)").siblings(".itemTitle").addClass("itemTitleLittle");
			jQuery("table#tableBlock span#downCat6:not(:first)").siblings(".itemTitle").addClass("itemTitleLittle");
			
		});
		
		var config = {    
						 sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
						 interval: 200, // number = milliseconds for onMouseOver polling interval    
						 over: tooltipShowSP, // function = onMouseOver callback (REQUIRED)    
						 timeout: 500, // number = milliseconds delay before onMouseOut    
						 out: tooltipHideSP // function = onMouseOut callback (REQUIRED)    
					};

		var config2 = {    
						 sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
						 interval: 200, // number = milliseconds for onMouseOver polling interval    
						 over: littleShow, // function = onMouseOver callback (REQUIRED)    
						 timeout: 500, // number = milliseconds delay before onMouseOut    
						 out: littleHide // function = onMouseOut callback (REQUIRED)    
					};

		/*var config3 = {    
						 sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
						 interval: 200, // number = milliseconds for onMouseOver polling interval    
						 over: tooltipShowPP, // function = onMouseOver callback (REQUIRED)    
						 timeout: 500, // number = milliseconds delay before onMouseOut    
						 out: tooltipHide // function = onMouseOut callback (REQUIRED)    
					};*/
					
		var config4 = {    
						 sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
						 interval: 200, // number = milliseconds for onMouseOver polling interval    
						 over: tooltipShowED, // function = onMouseOver callback (REQUIRED)    
						 timeout: 500, // number = milliseconds delay before onMouseOut    
						 out: tooltipHideED // function = onMouseOut callback (REQUIRED)    
					};
					
		
		jQuery("div#sp").hoverIntent(config);
		//jQuery("div#pp").hoverIntent(config3);
		//jQuery("div#ed").hoverIntent(config4);
		
		//jQuery("img#pp").click(tooltipShowPP);
		//jQuery("DIV#sp").click(tooltipShowSP);
		//jQuery("img#ed").click(tooltipShowED);
		


		jQuery("table#tableBlock span#downCat1:not(:first)").siblings(".itemTitle").hoverIntent(config2);
		jQuery("table#tableBlock span#downCat2:not(:first)").siblings(".itemTitle").hoverIntent(config2);
		jQuery("table#tableBlock span#downCat3:not(:first)").siblings(".itemTitle").hoverIntent(config2);
		jQuery("table#tableBlock span#downCat4:not(:first)").siblings(".itemTitle").hoverIntent(config2);
		jQuery("table#tableBlock span#downCat5:not(:first)").siblings(".itemTitle").hoverIntent(config2);
		jQuery("table#tableBlock span#downCat6:not(:first)").siblings(".itemTitle").hoverIntent(config2);
		//jQuery("table#tableBlock span#downCat8:first").siblings(".itemTitle").hoverIntent(config2);
		
/*		function tooltipShowPP() {
			
			jQuery("td#slide table.tbBeige:not(:first)").slideUp("fast",function() {
				jQuery("td#centerCcolumn table.tbBeige").slideUp("fast",function() {
					jQuery("td#slide table.tbBeige:first").slideDown("slow");
				});
			});
			
		};*/
		
		function tooltipShowSP() {
			jQuery("td#slide table.tbBeige:not(:first)").fadeIn("fast");
		};
		function tooltipHideSP() {
			jQuery("td#slide table.tbBeige:not(:first)").slideUp("fast");
		};
		
		function tooltipShowED() {
			jQuery("table#tableBlock span#textSPAN8").fadeIn("fast");
		};
		function tooltipHideED() {
			jQuery("table#tableBlock span#textSPAN8").slideUp("fast");
		};

		function tooltipHide() {

		};
		

		function littleShow() {
			jQuery(this).siblings("span:not(.down)").fadeIn("fast");
		};
		
		function littleHide() {
			jQuery(this).siblings("span:not(.down)").slideUp("fast");
		};

		
		jQuery("table#tableBlock span.down").click(function(){
			jQuery(this).siblings("span.itemTitle").unbind();
			jQuery(this).siblings("span:not(.itemTitle)").slideToggle("slow");
			jQuery(this).toggleClass("up");
			jQuery(this).toggleClass("down");
		});		

