$(document).ready(function() {
			// Preload dei rollover
			$("#categoriehome img").each(function() {
				// Prende l'url originale
				rollsrc = $(this).attr("src");
				rollON = rollsrc.replace(/.jpg$/ig,"_over.jpg");
				$("<img>").attr("src", rollON);
			});
			
			//over del mouse
			$("#categoriehome a").mouseover(function(){
				imgsrc = $(this).children("img").attr("src");
				matches = imgsrc.match(/_over/);
				// non compie il rollover se il mouse e gia over
				if (!matches) {
					imgsrcON = imgsrc.replace(/.jpg$/ig,"_over.jpg"); // esclude l'estensione del file
					$(this).children("img").attr("src", imgsrcON);
				}
			});
			
			//out del mouse
			$("#categoriehome a").mouseout(function(){
				$(this).children("img").attr("src", imgsrc);
			});
			
			
			$('#categoriehome a').children().each(function(){
		$(this).hover(
			function(){				
				$(this).fadeTo(300,0).fadeTo(300,1);							
			},
			function(){
				//
			}
		);
	});
			
			


			// Preload dei rollover
			$("#menu img").each(function() {
				// Prende l'url originale
				rollsrc = $(this).attr("src");
				rollON = rollsrc.replace(/.jpg$/ig,"_over.jpg");
				$("<img>").attr("src", rollON);
			});
			
			//over del mouse
			$("#menu a").mouseover(function(){
				imgsrc = $(this).children("img").attr("src");
				matches = imgsrc.match(/_over/);
				// non compie il rollover se il mouse e gia over
				if (!matches) {
					imgsrcON = imgsrc.replace(/.jpg$/ig,"_over.jpg"); // esclude l'estensione del file
					$(this).children("img").attr("src", imgsrcON);
				}
			});
			
			//out del mouse
			$("#menu a").mouseout(function(){
				$(this).children("img").attr("src", imgsrc);
			});
			
			
			$('#menu a').children().each(function(){
		$(this).hover(
			function(){				
				$(this).fadeTo(300,0.33).fadeTo(300,1);							
			},
			function(){
				//
			}
		);
	});
			
			
});