$(document).ready(function() {
	$(".thumbs img.main").fadeTo("fast", 1.0); // Opacity when page loads
	$(".thumbs img.main")
		.mouseenter(
			function() {
				if ($(this).hasClass('swap')) {
					$(this).fadeTo(1000, 0.0); // Opacity on hover
				} else {
					$(this).fadeTo("fast", 0.8); // Opacity on hover
				}
			}
		)
		.mouseleave(
			function() {
				if ($(this).hasClass('swap')) {
					$(this)
						.stop(true, true)
						.fadeTo(100, 1.0); // Opacity on hover
				} else {
					$(this).fadeTo("fast", 1.0); // Opacity on hover
				}
			}
		);
});
