
function galleryFade(id){

	$(".gallery_images .fadein").css({ display: 'none' });
	
	$("#fadeIn_"+id).fadeOut("fast", function(){
		$("#fadeIn_"+id).fadeIn(300);
		$("#fadeIn_"+id).css({ display: 'block' });
	}); 
	
	$(".gallery_numbers .button").removeClass("act");
	$("#fadeInNumber_"+id).addClass("act");

}

$(function () {

	$('.var_homes img').mouseenter(function () {
		if (!$(this).hasClass('act')){
			$('.var_homes img').not('.act').css({ opacity: 0.7 });
			$(this).css({ opacity: 1 });
		}
	});
	
	$('.var_homes img').mouseout(function () {
		if (!$(this).hasClass('act')){
			$(this).css({ opacity: 0.7 });
		}
	});
	
	$('.var_homes img').click(function () {
		if (!$(this).hasClass('act'))
		{
			$('.var_homes img').removeClass('act');
			$('.var_homes img').css({ opacity: 0.7 });
			$(this).addClass('act');
			$(this).css({ opacity: 1 });
			var index = $(this).attr("id").substr(2, 1);
			$('.leshome').css({ display: 'none' });
			$('#home_'+index).fadeIn(300);
			$('#home_'+index).css({ display: 'block' });
		}
		return false;
	});
	
});



