/*********************************************************************************
							--jQuery image preloader--
**********************************************************************************/
		
		jQuery(function () {
			jQuery('.gallery img').hide();//hide all the images on the page
		});
		
		var i = 0;//initialize
		var int=0;//Internet Explorer Fix
		jQuery(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
			var int = setInterval("doThis(i)",500);//500 is the fade in speed in milliseconds
		});

		function doThis() {
			var imgs = jQuery('.gallery img').length;//count the number of images on the page
			if (i >= imgs) {// Loop the images
				clearInterval(int);//When it reaches the last image the loop ends
			}
			$('.gallery img:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
			i++;//add 1 to the count
		}
		


jQuery(document).ready(function(){
	jQuery(".kwicks li img").fadeTo("slow", 0.5); // This sets the opacity of the thumbs to fade down to 30% when the page loads
	jQuery(".kwicks li img").hover(function(){
	jQuery(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
	jQuery(this).fadeTo("slow", 0.5); // This should set the opacity back to 30% on mouseout
	});
});

jQuery(document).ready(function(){
	jQuery("#gallery2 ul li img.a").fadeTo("slow", 0); // This sets the opacity of the thumbs to fade down to 30% when the page loads
	jQuery("#gallery2 ul li img.a").hover(function(){
	jQuery(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
	jQuery(this).fadeTo("slow", 0); // This should set the opacity back to 30% on mouseout
	});
});

jQuery(document).ready(function(){
	jQuery("#gallery3 ul li img.a").fadeTo("slow", 0); // This sets the opacity of the thumbs to fade down to 30% when the page loads
	jQuery("#gallery3 ul li img.a").hover(function(){
	jQuery(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
	jQuery(this).fadeTo("slow", 0); // This should set the opacity back to 30% on mouseout
	});
});
