$(function() {
		// When a thumbnail is clicked
		$("#thumbnails1 a").click(function() {
			// Get enlarged image attributes
			var largeImg = $("#feature1 img");	
			var largeImgPath = $(this).attr("href");
			var largeImgTitle = $(this).children("img").attr("alt");
			var largeThumbnail = $(this);
			// Fade out enlarged image
			$(largeImg).fadeOut('slow', function() {	
				// Change the attributes of the enlarged large image
				$(largeImg).attr({ src: largeImgPath, alt: largeImgTitle, title: largeImgTitle }).load(function() {
					// Once image is loaded:
					// Remove class="current" from all thumbnails and add to clicked thumbnail
					$("#humbnails1").children().removeClass("current");
					$(largeThumbnail).addClass("current");
					// Fade in enlarged image
					$(largeImg).fadeIn('slow');	
				});
			});
			return false;
		});
		
		$("#thumbnails2 a").click(function() {
			// Get enlarged image attributes
			var largeImg = $("#feature2 img");	
			var largeImgPath = $(this).attr("href");
			var largeImgTitle = $(this).children("img").attr("alt");
			var largeThumbnail = $(this);
			// Fade out enlarged image
			$(largeImg).fadeOut('slow', function() {	
				// Change the attributes of the enlarged large image
				$(largeImg).attr({ src: largeImgPath, alt: largeImgTitle, title: largeImgTitle }).load(function() {
					// Once image is loaded:
					// Remove class="current" from all thumbnails and add to clicked thumbnail
					$("#humbnails2").children().removeClass("current");
					$(largeThumbnail).addClass("current");
					// Fade in enlarged image
					$(largeImg).fadeIn('slow');	
				});
			});
			return false;
		});
		
		$("#thumbnails3 a").click(function() {
			// Get enlarged image attributes
			var largeImg = $("#feature3 img");	
			var largeImgPath = $(this).attr("href");
			var largeImgTitle = $(this).children("img").attr("alt");
			var largeThumbnail = $(this);
			// Fade out enlarged image
			$(largeImg).fadeOut('slow', function() {	
				// Change the attributes of the enlarged large image
				$(largeImg).attr({ src: largeImgPath, alt: largeImgTitle, title: largeImgTitle }).load(function() {
					// Once image is loaded:
					// Remove class="current" from all thumbnails and add to clicked thumbnail
					$("#humbnails3").children().removeClass("current");
					$(largeThumbnail).addClass("current");
					// Fade in enlarged image
					$(largeImg).fadeIn('slow');	
				});
			});
			return false;
		});
	
	$("#thumbnails4 a").click(function() {
			// Get enlarged image attributes
			var largeImg = $("#feature4 img");	
			var largeImgPath = $(this).attr("href");
			var largeImgTitle = $(this).children("img").attr("alt");
			var largeThumbnail = $(this);
			// Fade out enlarged image
			$(largeImg).fadeOut('slow', function() {	
				// Change the attributes of the enlarged large image
				$(largeImg).attr({ src: largeImgPath, alt: largeImgTitle, title: largeImgTitle }).load(function() {
					// Once image is loaded:
					// Remove class="current" from all thumbnails and add to clicked thumbnail
					$("#humbnails4").children().removeClass("current");
					$(largeThumbnail).addClass("current");
					// Fade in enlarged image
					$(largeImg).fadeIn('slow');	
				});
			});
			return false;
		});
	
		$("#thumbnails5 a").click(function() {
			// Get enlarged image attributes
			var largeImg = $("#feature5 img");	
			var largeImgPath = $(this).attr("href");
			var largeImgTitle = $(this).children("img").attr("alt");
			var largeThumbnail = $(this);
			// Fade out enlarged image
			$(largeImg).fadeOut('slow', function() {	
				// Change the attributes of the enlarged large image
				$(largeImg).attr({ src: largeImgPath, alt: largeImgTitle, title: largeImgTitle }).load(function() {
					// Once image is loaded:
					// Remove class="current" from all thumbnails and add to clicked thumbnail
					$("#humbnails5").children().removeClass("current");
					$(largeThumbnail).addClass("current");
					// Fade in enlarged image
					$(largeImg).fadeIn('slow');	
				});
			});
			return false;
		});
	
	$("#thumbnails6 a").click(function() {
			// Get enlarged image attributes
			var largeImg = $("#feature6 img");	
			var largeImgPath = $(this).attr("href");
			var largeImgTitle = $(this).children("img").attr("alt");
			var largeThumbnail = $(this);
			// Fade out enlarged image
			$(largeImg).fadeOut('slow', function() {	
				// Change the attributes of the enlarged large image
				$(largeImg).attr({ src: largeImgPath, alt: largeImgTitle, title: largeImgTitle }).load(function() {
					// Once image is loaded:
					// Remove class="current" from all thumbnails and add to clicked thumbnail
					$("#humbnails6").children().removeClass("current");
					$(largeThumbnail).addClass("current");
					// Fade in enlarged image
					$(largeImg).fadeIn('slow');	
				});
			});
			return false;
		});
	

	$("#thumbnails7 a").click(function() {
			// Get enlarged image attributes
			var largeImg = $("#feature7 img");	
			var largeImgPath = $(this).attr("href");
			var largeImgTitle = $(this).children("img").attr("alt");
			var largeThumbnail = $(this);
			// Fade out enlarged image
			$(largeImg).fadeOut('slow', function() {	
				// Change the attributes of the enlarged large image
				$(largeImg).attr({ src: largeImgPath, alt: largeImgTitle, title: largeImgTitle }).load(function() {
					// Once image is loaded:
					// Remove class="current" from all thumbnails and add to clicked thumbnail
					$("#humbnails7").children().removeClass("current");
					$(largeThumbnail).addClass("current");
					// Fade in enlarged image
					$(largeImg).fadeIn('slow');	
				});
			});
			return false;
		});
	
	});