/**
 * @author dot4all S.r.l.
 */
document.write('<style type="text/css">');
document.write('.thumb img{');
document.write('display:none;');
document.write('}');
document.write('</style>');
$(document).ready(function(){

	$(window).bind("load",function(){
	
		//Configuration Options
		var max_width = 400; 	//Sets the max width, in pixels, for every image
		var max_height = 300; 	//Sets the max height, in pixels, for every image
		var selector = '.thumb img'; 	//Sets the syntax for finding the images.  Defaults to all images.
				//For images inside of a particular element (id="abc") or class (class="abc"),
				//use '.abc img' or '#abc img' respectively.  Don't leave off the img tag!!!
		//End configuration options.  You don't need to change anything below here.
		
		$(selector).each(function(){
			var width = $(this).width();
			var height = $(this).height();
			var selector = '.resize';

			if (width > max_width) {
				
				//Set variables	for manipulation
				var ratio = (height / width );
				var new_width = max_width;
				var new_height = (new_width * ratio);
					
				//Shrink the image and add link to full-sized image
				$(this).height(new_height).width(new_width);
				
				width = new_width;
				height = new_height;
				
			} //ends if statement
					
			if (height > max_height) {
				
				//Set variables	for manipulation
				var ratio = (width / height );
				var new_height = max_height;
				var new_width = (new_height * ratio);
					
				//Shrink the image and add link to full-sized image
				$(this).height(new_height).width(new_width);

			} //ends if statement
			//$(this).css('margin-top','-10px')
			//$(this).css('margin-left','-10px')
			//$(this).css('display','block')
			
			//visualizzo le foto
			//$(this).css("visibility","visible")
			$(this).fadeIn("slow")
		})
	}) //ends each function
})<!-- 

 -->