﻿jQuery.noConflict();

jQuery(document).ready(function () {

var a = jQuery('#bigImg');


// Пролистываем картинки
jQuery('#aNext, #aPrev').click(function (eventObject) {
	
		
	a.hide().attr('src',jQuery(this).attr('href'));
    a.load(function() {
        jQuery(this).fadeIn(500);
    });
    eventObject.preventDefault();
	
	jQuery('#rotateBack').css({
		'display' : 'block'
	});
	
	jQuery('#rotateFront').css({
		'display' : 'none'
	});
	
	
	
	
	
	// Прячем и показываем ссылку "2 этаж", если он существует или нет соответственно
	if ( a.attr('src') == '/images/gal/pic2.png' || a.attr('src') == '/images/gal/pic2_n.png' || a.attr('src') == '/images/gal/pic11_n.png' || a.attr('src') == '/images/gal/pic11.png' || a.attr('src') == '/images/gal/pic12_n.png' || a.attr('src') == '/images/gal/pic12.png' ) {
		jQuery('#rotate2').css({'display' : 'none'});
	}
	
	else {
		jQuery('#rotate2').css({'display' : 'block'});
	}
	
	
	
	
	//дневные дома
	
	if (a.attr('src') == '/images/gal/pic1.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic12.png');
	jQuery('#aNext').attr('href', '/images/gal/pic2.png');
	jQuery('#prevMark').text('Баня 11-М');
	jQuery('#nextMark').text('Стелс');
	jQuery('#house').attr('value', 'Скандинавия');
	jQuery('.footerproj_int').html('<a href="/projects/300/skandinaviya.php"><h2>Проект «Скандинавия»</h2></a><br />Общая площадь 343 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
		

}

else if (a.attr('src') == '/images/gal/pic2.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic1.png');
	jQuery('#aNext').attr('href', '/images/gal/pic3.png');
	jQuery('#prevMark').text('Скандинавия');
	jQuery('#nextMark').text('Родовое гнездо');
	jQuery('#house').attr('value', 'Стелс');
	jQuery('#nz').text('Стелс');
	jQuery('.footerproj_int').html('<a href="/projects/300/stels.php"><h2>Стелс</h2></a><br />Общая площадь 326 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic3.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic2.png');
	jQuery('#aNext').attr('href', '/images/gal/pic4.png');
	jQuery('#prevMark').text('Стелс');
	jQuery('#nextMark').text('Тихая заводь');
	jQuery('#house').attr('value', 'Родовое гнездо');
	jQuery('.footerproj_int').html('<a href="/projects/300/rodovoe_gnezdo.php"><h2>Родовое гнездо</h2></a><br />Общая площадь 388 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic4.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic3.png');
	jQuery('#aNext').attr('href', '/images/gal/pic5.png');
	jQuery('#prevMark').text('Родовое гнездо');
	jQuery('#nextMark').text('Волшебный лес');
	jQuery('#house').attr('value', 'Тихая заводь');
	jQuery('.footerproj_int').html('<a href="/projects/250_300/tihaya_zavod.php"><h2>Тихая заводь</h2></a><br />Общая площадь 273,6 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic5.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic4.png');
	jQuery('#aNext').attr('href', '/images/gal/pic6.png');
	jQuery('#prevMark').text('Тихая заводь');
	jQuery('#nextMark').text('Орион');
	jQuery('#house').attr('value', 'Волшебный лес');
	jQuery('.footerproj_int').html('<a href="/projects/200_250/volshebny_les.php"><h2>Волшебный лес</h2></a><br />Общая площадь 224,3 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic6.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic5.png');
	jQuery('#aNext').attr('href', '/images/gal/pic7.png');
	jQuery('#prevMark').text('Волшебный лес');
	jQuery('#nextMark').text('Полярная звезда');
	jQuery('#house').attr('value', 'Орион');
	jQuery('.footerproj_int').html('<a href="/projects/250_300/orion.php"><h2>Орион</h2></a><br />Общая площадь 265,9 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic7.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic6.png');
	jQuery('#aNext').attr('href', '/images/gal/pic8.png');
	jQuery('#prevMark').text('Орион');
	jQuery('#nextMark').text('Солнечная долина');
	jQuery('#house').attr('value', 'Полярная звезда');
	jQuery('.footerproj_int').html('<a href="/projects/200_250/polyarnaya_zvezda.php"><h2>Полярная звезда</h2></a><br />Общая площадь 217,1 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic8.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic7.png');
	jQuery('#aNext').attr('href', '/images/gal/pic9.png');
	jQuery('#prevMark').text('Полярная Звезда');
	jQuery('#nextMark').text('Гостевой');
	jQuery('#house').attr('value', 'Солнечная долина');
	jQuery('.footerproj_int').html('<a href="/projects/100_200/solnechnaya_dolina.php"><h2>Солнечная долина</h2></a><br />Общая площадь 190,8 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic9.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic8.png');
	jQuery('#aNext').attr('href', '/images/gal/pic10.png');
	jQuery('#prevMark').text('Солнечная долина');
	jQuery('#nextMark').text('Золотая осень');
	jQuery('#house').attr('value', 'Гостевой');
	jQuery('.footerproj_int').html('<a href="/projects/100.php"><h2>Гостевой</h2></a><br />Общая площадь 99,1 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic10.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic9.png');
	jQuery('#aNext').attr('href', '/images/gal/pic11.png');
	jQuery('#prevMark').text('Гостевой');
	jQuery('#nextMark').text('Баня 11-М');
	jQuery('#house').attr('value', 'Золотая осень');
	jQuery('.footerproj_int').html('<a href="/projects/100_200/zolotaya_osen.php"><h2>Золотая осень</h2></a><br />Общая площадь 150,1 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic11.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic10.png');
	jQuery('#aNext').attr('href', '/images/gal/pic12.png');
	jQuery('#prevMark').text('Золотая осень');
	jQuery('#nextMark').text('Баня 11-Г');
	jQuery('#house').attr('value', 'Баня 11-М');
	jQuery('.footerproj_int').html('<a href="/projects/bani/"><h2>Баня 11-М</h2></a><br />Общая площадь 53,4 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic12.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic11.png');
	jQuery('#aNext').attr('href', '/images/gal/pic1.png');
	jQuery('#prevMark').text('Баня 11-М');
	jQuery('#nextMark').text('Скандинавия');
	jQuery('#house').attr('value', 'Баня 11-Г');
	jQuery('.footerproj_int').html('<a href="/projects/bani/"><h2>Баня 11-Г</h2></a><br />Общая площадь 45 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}



	//ночные дома
	
	if (a.attr('src') == '/images/gal/pic1_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic11_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic2_n.png');
	jQuery('#prevMark').text('Баня 11-М');
	jQuery('#nextMark').text('Стелс');
	jQuery('#house').attr('value', 'Скандинавия');
	jQuery('.footerproj_int').html('<a href="/projects/300/skandinaviya.php"><h2>Проект «Скандинавия»</h2></a><br />Общая площадь 343 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
	
}

else if (a.attr('src') == '/images/gal/pic2_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic1_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic3_n.png');
	jQuery('#prevMark').text('Скандинавия');
	jQuery('#nextMark').text('Родовое гнездо');
	jQuery('#house').attr('value', 'Стелс');
	jQuery('.footerproj_int').html('<a href="/projects/300/stels.php"><h2>Стелс</h2></a><br />Общая площадь 326 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic3_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic2_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic4_n.png');
	jQuery('#prevMark').text('Стелс');
	jQuery('#nextMark').text('Тихая заводь');
	jQuery('#house').attr('value', 'Родовое гнездо');
	jQuery('.footerproj_int').html('<a href="/projects/300/rodovoe_gnezdo.php"><h2>Родовое гнездо</h2></a><br />Общая площадь 388 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic4_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic3_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic5_n.png');
	jQuery('#prevMark').text('Родовое гнездо');
	jQuery('#nextMark').text('Волшебный лес');
	jQuery('#house').attr('value', 'Тихая заводь');
	jQuery('.footerproj_int').html('<a href="/projects/250_300/tihaya_zavod.php"><h2>Тихая заводь</h2></a><br />Общая площадь 273,6 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic5_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic4_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic6_n.png');
	jQuery('#prevMark').text('Тихая заводь');
	jQuery('#nextMark').text('Орион');
	jQuery('#house').attr('value', 'Волшебный лес');
	jQuery('.footerproj_int').html('<a href="/projects/200_250/volshebny_les.php"><h2>Волшебный лес</h2></a><br />Общая площадь 224,3 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic6_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic5_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic7_n.png');
	jQuery('#prevMark').text('Волшебный лес');
	jQuery('#nextMark').text('Полярная звезда');
	jQuery('#house').attr('value', 'Орион');
	jQuery('.footerproj_int').html('<a href="/projects/250_300/orion.php"><h2>Орион</h2></a><br />Общая площадь 265,9 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic7_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic6_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic8_n.png');
	jQuery('#prevMark').text('Орион');
	jQuery('#nextMark').text('Солнечная долина');
	jQuery('#house').attr('value', 'Полярная звезда');
	jQuery('.footerproj_int').html('<a href="/projects/200_250/polyarnaya_zvezda.php"><h2>Полярная звезда</h2></a><br />Общая площадь 217,1 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic8_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic7_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic9_n.png');
	jQuery('#prevMark').text('Полярная Звезда');
	jQuery('#nextMark').text('Гостевой');
	jQuery('#house').attr('value', 'Солнечная долина');
	jQuery('.footerproj_int').html('<a href="/projects/100_200/solnechnaya_dolina.php"><h2>Солнечная долина</h2></a><br />Общая площадь 190,8 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic9_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic8_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic10_n.png');
	jQuery('#prevMark').text('Солнечная долина');
	jQuery('#nextMark').text('Золотая осень');
	jQuery('#house').attr('value', 'Гостевой');
	jQuery('.footerproj_int').html('<a href="/projects/100.php"><h2>Гостевой</h2></a><br />Общая площадь 99,1 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic10_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic9_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic11_n.png');
	jQuery('#prevMark').text('Гостевой');
	jQuery('#nextMark').text('Баня 11-М');
	jQuery('#house').attr('value', 'Золотая осень');
	jQuery('.footerproj_int').html('<a href="/projects/100_200/zolotaya_osen.php"><h2>Золотая осень</h2></a><br />Общая площадь 150,1 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic11_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic10_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic12_n.png');
	jQuery('#prevMark').text('Золотая осень');
	jQuery('#nextMark').text('Баня 11-Г');
	jQuery('#house').attr('value', 'Баня 11-М');
	jQuery('.footerproj_int').html('<a href="/projects/bani/"><h2>Баня 11-М</h2></a><br />Общая площадь 53,4 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}

else if (a.attr('src') == '/images/gal/pic12_n.png') {
	jQuery('#aPrev').attr('href', '/images/gal/pic11_n.png');
	jQuery('#aNext').attr('href', '/images/gal/pic1_n.png');
	jQuery('#prevMark').text('Баня 11-М');
	jQuery('#nextMark').text('Скандинавия');
	jQuery('#house').attr('value', 'Баня 11-Г');
	jQuery('.footerproj_int').html('<a href="/projects/bani/"><h2>Баня 11-Г</h2></a><br />Общая площадь 45 м<sup>2</sup><br /> <div class="vse_proj"><a href="/projects/100.php">Все проекты</a></div>');
}


});

// Поворачиваем картинку назад
jQuery('#rotateBack').click(function(eventObject) {
	
	
	jQuery(this).css({
		'display' : 'none'
	});
	
	jQuery('#rotateFront').css({
		'display' : 'block'
	});
	
	
	if ( a.attr('src') == '/images/gal/pic1.png') {
	
		a.hide().attr('src','/images/gal/pic1_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic2.png') {
	
		a.hide().attr('src','/images/gal/pic2_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic3.png') {
	
		a.hide().attr('src','/images/gal/pic3_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a.attr('src') == '/images/gal/pic4.png') {
	
		a.hide().attr('src','/images/gal/pic4_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a.attr('src') == '/images/gal/pic5.png') {
	
		a.hide().attr('src','/images/gal/pic5_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a.attr('src') == '/images/gal/pic6.png') {
	
		a.hide().attr('src','/images/gal/pic6_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a.attr('src') == '/images/gal/pic7.png') {
	
		a.hide().attr('src','/images/gal/pic7_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic8.png') {
		a.hide().attr('src','/images/gal/pic8_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}

	else if ( a.attr('src') == '/images/gal/pic9.png') {
		a.hide().attr('src','/images/gal/pic9_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a.attr('src') == '/images/gal/pic10.png') {
		a.hide().attr('src','/images/gal/pic10_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a.attr('src') == '/images/gal/pic11.png') {
		a.hide().attr('src','/images/gal/pic11_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a.attr('src') == '/images/gal/pic12.png') {
		a.hide().attr('src','/images/gal/pic12_rot.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	
	if ( a.attr('src') == '/images/gal/pic1_n.png') {
		a.hide().attr('src','/images/gal/pic1_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic2_n.png') {
	
		a.hide().attr('src','/images/gal/pic2_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic3_n.png') {
	
		a.hide().attr('src','/images/gal/pic3_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic4_n.png') {
	
		a.hide().attr('src','/images/gal/pic4_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}

	else if ( a.attr('src') == '/images/gal/pic5_n.png') {
	
		a.hide().attr('src','/images/gal/pic5_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}

	else if ( a.attr('src') == '/images/gal/pic6_n.png') {
	
		a.hide().attr('src','/images/gal/pic6_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}

	else if ( a.attr('src') == '/images/gal/pic7_n.png') {
	
		a.hide().attr('src','/images/gal/pic7_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}

	else if ( a.attr('src') == '/images/gal/pic8_n.png') {
	
		a.hide().attr('src','/images/gal/pic8_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}

	else if ( a.attr('src') == '/images/gal/pic9_n.png') {
	
		a.hide().attr('src','/images/gal/pic9_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}

	else if ( a.attr('src') == '/images/gal/pic10_n.png') {
	
		a.hide().attr('src','/images/gal/pic10_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic11_n.png') {
	
		a.hide().attr('src','/images/gal/pic11_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic12_n.png') {
	
		a.hide().attr('src','/images/gal/pic12_rot_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	
	
	eventObject.preventDefault();
});

// Поворачиваем картинку вперед
jQuery('#rotateFront').click(function(eventObject) {
	
		
	jQuery(this).css({
		'display' : 'none'
	});
	
	jQuery('#rotateBack').css({
		'display' : 'block'
	});
	
	
	if ( a.attr('src') == '/images/gal/pic1_rot.png') {
	
		a.hide().attr('src','/images/gal/pic1.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic2_rot.png') {
	
		a.hide().attr('src','/images/gal/pic2.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic3_rot.png') {
	
		a.hide().attr('src','/images/gal/pic3.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic4_rot.png') {
	
		a.hide().attr('src','/images/gal/pic4.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic5_rot.png') {
	
		a.hide().attr('src','/images/gal/pic5.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic6_rot.png') {
	
		a.hide().attr('src','/images/gal/pic6.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic7_rot.png') {
	
		a.hide().attr('src','/images/gal/pic7.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic8_rot.png') {
	
		a.hide().attr('src','/images/gal/pic8.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic9_rot.png') {
	
		a.hide().attr('src','/images/gal/pic9.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic10_rot.png') {
	
		a.hide().attr('src','/images/gal/pic10.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic11_rot.png') {
	
		a.hide().attr('src','/images/gal/pic11.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic12_rot.png') {
	
		a.hide().attr('src','/images/gal/pic12.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	
	
	if ( a.attr('src') == '/images/gal/pic1_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic1_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic2_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic2_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic3_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic3_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic4_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic4_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic5_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic5_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic6_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic6_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic7_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic7_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic8_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic8_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic9_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic9_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic10_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic10_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}

	else if ( a.attr('src') == '/images/gal/pic11_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic11_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a.attr('src') == '/images/gal/pic12_rot_n.png') {
	
		a.hide().attr('src','/images/gal/pic12_n.png');
    	a.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}


	
	eventObject.preventDefault();
});

// 1 Этаж
jQuery('#rotate1').click(function(eventObject) {
	
	if ( a.attr('src') == '/images/gal/pic1_rot.png' || a.attr('src') == '/images/gal/pic1.png' || a.attr('src') == '/images/gal/pic1_n.png' || a.attr('src') == '/images/gal/pic1_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#1floor').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		/*jQuery('.scand1').css({'display':'block'});
		jQuery('.scand2, .rg2, .rg1, .stels').css({'display':'none'});*/
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.scand1').css({'display':'block'})
     		}
	
	else if ( a.attr('src') == '/images/gal/pic2_rot.png' || a.attr('src') == '/images/gal/pic2.png' || a.attr('src') == '/images/gal/pic2_n.png' || a.attr('src') == '/images/gal/pic2_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#1fst').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2, .scand1, .scand2, .rg2, .rg1').css({'display' : 'none'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.stels').css({'display':'block'})
    		}
	
	else if ( a.attr('src') == '/images/gal/pic3_rot.png' || a.attr('src') == '/images/gal/pic3.png' || a.attr('src') == '/images/gal/pic3_n.png' || a.attr('src') == '/images/gal/pic3_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		/*jQuery('.rg1').css({'display':'block'});
		jQuery('.rg2').css({'display':'none'});
		jQuery('.scand2, .scand1, .stels').css({'display':'none'});*/
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.rg1').css({'display':'block'})

		    		}
	else if ( a.attr('src') == '/images/gal/pic4_rot.png' || a.attr('src') == '/images/gal/pic4.png' || a.attr('src') == '/images/gal/pic4_n.png' || a.attr('src') == '/images/gal/pic4_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_tihz').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		/*jQuery('.tihz1').css({'display':'block'});
		jQuery('.tihz2').css({'display':'none'});
		jQuery('.scand2, .scand1, .stels').css({'display':'none'});*/
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.tihz1').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic5_rot.png' || a.attr('src') == '/images/gal/pic5.png' || a.attr('src') == '/images/gal/pic5_n.png' || a.attr('src') == '/images/gal/pic5_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_ww').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		/*jQuery('.ww1').css({'display':'block'});
		jQuery('.ww2').css({'display':'none'});
		jQuery('.scand2, .scand1, .stels').css({'display':'none'});*/
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.ww1').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic6_rot.png' || a.attr('src') == '/images/gal/pic6.png' || a.attr('src') == '/images/gal/pic6_n.png' || a.attr('src') == '/images/gal/pic6_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_orion').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.orion1').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic7_rot.png' || a.attr('src') == '/images/gal/pic7.png' || a.attr('src') == '/images/gal/pic7_n.png' || a.attr('src') == '/images/gal/pic7_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_pols').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.pols1').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic8_rot.png' || a.attr('src') == '/images/gal/pic8.png' || a.attr('src') == '/images/gal/pic8_n.png' || a.attr('src') == '/images/gal/pic8_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_soldol').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.soldol1').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic9_rot.png' || a.attr('src') == '/images/gal/pic9.png' || a.attr('src') == '/images/gal/pic9_n.png' || a.attr('src') == '/images/gal/pic9_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_guest').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.guest1').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic10_rot.png' || a.attr('src') == '/images/gal/pic10.png' || a.attr('src') == '/images/gal/pic10_n.png' || a.attr('src') == '/images/gal/pic10_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_zolos').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.zolos1').css({'display':'block'})
		    		}
	
	else if ( a.attr('src') == '/images/gal/pic11_rot.png' || a.attr('src') == '/images/gal/pic11.png' || a.attr('src') == '/images/gal/pic11_n.png' || a.attr('src') == '/images/gal/pic11_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_11m').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'display':'none'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.b11m').css({'display':'block'})
		    		}
	
	else if ( a.attr('src') == '/images/gal/pic12_rot.png' || a.attr('src') == '/images/gal/pic12.png' || a.attr('src') == '/images/gal/pic12_n.png' || a.attr('src') == '/images/gal/pic12_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#1f_11m').fadeIn(500);
		jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag2').css({'display':'none'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.b11m').css({'display':'block'})
		    		}
	
	
	eventObject.preventDefault();
});

// 2 этаж
jQuery('#rotate2').click(function(eventObject) {
	
	if ( a.attr('src') == '/images/gal/pic1_rot.png' || a.attr('src') == '/images/gal/pic1.png' || a.attr('src') == '/images/gal/pic1_n.png' || a.attr('src') == '/images/gal/pic1_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#2floor').fadeIn(500);
		jQuery('.etag2').css({'display' : 'inline', 'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none', 'margin-left':'20px'});
    	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'font-size':'16px', 'color':'#000000'});
		/*jQuery('.scand2').css({'display':'block'});
		jQuery('.scand1').css({'display':'none'});
		jQuery('.rg1, .rg2, .stels').css({'display':'none'});*/
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.scand2').css({'display':'block'})
	}
	
	else if ( a.attr('src') == '/images/gal/pic3_rot.png' || a.attr('src') == '/images/gal/pic3.png' || a.attr('src') == '/images/gal/pic3_n.png' || a.attr('src') == '/images/gal/pic3_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#2f').fadeIn(500);
		jQuery('.etag2').css({'display' : 'inline', 'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none', 'margin-left':'20px'});
    	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'font-size':'16px', 'color':'#000000'});
		/*jQuery('.rg2').css({'display':'block'});
		jQuery('.rg1').css({'display':'none'});
		jQuery('.scand2, .scand1, .stels').css({'display':'none'});*/
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.rg2').css({'display':'block'})

	}
	
	else if ( a.attr('src') == '/images/gal/pic4_rot.png' || a.attr('src') == '/images/gal/pic4.png' || a.attr('src') == '/images/gal/pic4_n.png' || a.attr('src') == '/images/gal/pic4_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#2f_tihz').fadeIn(500);
		jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		/*jQuery('.tihz2').css({'display':'block'});
		jQuery('.tihz1').css({'display':'none'});
		jQuery('.scand2, .scand1, .stels').css({'display':'none'});*/
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.tihz2').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic5_rot.png' || a.attr('src') == '/images/gal/pic5.png' || a.attr('src') == '/images/gal/pic5_n.png' || a.attr('src') == '/images/gal/pic5_rot_n.png' ) {
	
		jQuery('.razrez').fadeIn(500);
		jQuery('#2f_ww').fadeIn(500);
		jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		/*jQuery('.ww2').css({'display':'block'});
		jQuery('.ww1').css({'display':'none'});
		jQuery('.scand2, .scand1, .stels').css({'display':'none'});*/
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.ww2').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic6_rot.png' || a.attr('src') == '/images/gal/pic6.png' || a.attr('src') == '/images/gal/pic6_n.png' || a.attr('src') == '/images/gal/pic6_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#2f_orion').fadeIn(500);
		jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.orion2').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic7_rot.png' || a.attr('src') == '/images/gal/pic7.png' || a.attr('src') == '/images/gal/pic7_n.png' || a.attr('src') == '/images/gal/pic7_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#2f_pols').fadeIn(500);
		jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.pols2').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic8_rot.png' || a.attr('src') == '/images/gal/pic8.png' || a.attr('src') == '/images/gal/pic8_n.png' || a.attr('src') == '/images/gal/pic8_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#2f_soldol').fadeIn(500);
		jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.soldol2').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic9_rot.png' || a.attr('src') == '/images/gal/pic9.png' || a.attr('src') == '/images/gal/pic9_n.png' || a.attr('src') == '/images/gal/pic9_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#2f_guest').fadeIn(500);
		jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.guest2').css({'display':'block'})
		    		}
	else if ( a.attr('src') == '/images/gal/pic10_rot.png' || a.attr('src') == '/images/gal/pic10.png' || a.attr('src') == '/images/gal/pic10_n.png' || a.attr('src') == '/images/gal/pic10_rot_n.png' ) {
		jQuery('.razrez').fadeIn(500);
		jQuery('#2f_zolos').fadeIn(500);
		jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	    jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
		jQuery('.gde4to div').css({'display':'none'})
        jQuery('.zolos2').css({'display':'block'})
		    		}

					
	eventObject.preventDefault();
});


// Закрытие разреза домов
jQuery('.close').click(function() {
	
	/*jQuery('.razrez, #2floor, #1floor, #2f, #1f, #1f_tihz, #2f_tihz, #1f_ww, #2f_ww').fadeOut(500);*/
	jQuery('.gde4to div, .picetag img, .razrez').fadeOut(500);

});

// переключение между 1 и 2 этажом в разрезе домов. 1 этаж
jQuery('.etag1').click(function() {
	if( a.attr('src') == '/images/gal/pic1_rot.png' || a.attr('src') == '/images/gal/pic1.png' || a.attr('src') == '/images/gal/pic1_n.png' || a.attr('src') == '/images/gal/pic1_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1floor').fadeIn(500);
	jQuery('#2floor').css({'display':'none'});
		jQuery('.scand1').css({'display':'block'});
		jQuery('.scand2').css({'display':'none'});	
		}
	else if( a.attr('src') == '/images/gal/pic3_rot.png' || a.attr('src') == '/images/gal/pic3.png' || a.attr('src') == '/images/gal/pic3_n.png' || a.attr('src') == '/images/gal/pic3_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1f').fadeIn(500);
	jQuery('#2f').css({'display':'none'});
		jQuery('.rg1').css({'display':'block'});
		jQuery('.rg2').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic4_rot.png' || a.attr('src') == '/images/gal/pic4.png' || a.attr('src') == '/images/gal/pic4_n.png' || a.attr('src') == '/images/gal/pic4_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1f_tihz').fadeIn(500);
	jQuery('#2f_tihz').css({'display':'none'});
		jQuery('.tihz1').css({'display':'block'});
		jQuery('.tihz2').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic5_rot.png' || a.attr('src') == '/images/gal/pic5.png' || a.attr('src') == '/images/gal/pic5_n.png' || a.attr('src') == '/images/gal/pic5_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1f_ww').fadeIn(500);
	jQuery('#2f_ww').css({'display':'none'});
		jQuery('.ww1').css({'display':'block'});
		jQuery('.ww2').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic6_rot.png' || a.attr('src') == '/images/gal/pic6.png' || a.attr('src') == '/images/gal/pic6_n.png' || a.attr('src') == '/images/gal/pic6_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1f_orion').fadeIn(500);
	jQuery('#2f_orion').css({'display':'none'});
		jQuery('.orion1').css({'display':'block'});
		jQuery('.orion2').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic7_rot.png' || a.attr('src') == '/images/gal/pic7.png' || a.attr('src') == '/images/gal/pic7_n.png' || a.attr('src') == '/images/gal/pic7_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1f_pols').fadeIn(500);
	jQuery('#2f_pols').css({'display':'none'});
		jQuery('.pols1').css({'display':'block'});
		jQuery('.pols2').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic8_rot.png' || a.attr('src') == '/images/gal/pic8.png' || a.attr('src') == '/images/gal/pic8_n.png' || a.attr('src') == '/images/gal/pic8_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1f_soldol').fadeIn(500);
	jQuery('#2f_soldol').css({'display':'none'});
		jQuery('.soldol1').css({'display':'block'});
		jQuery('.soldol2').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic9_rot.png' || a.attr('src') == '/images/gal/pic9.png' || a.attr('src') == '/images/gal/pic9_n.png' || a.attr('src') == '/images/gal/pic9_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1f_guest').fadeIn(500);
	jQuery('#2f_guest').css({'display':'none'});
		jQuery('.guest1').css({'display':'block'});
		jQuery('.guest2').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic10_rot.png' || a.attr('src') == '/images/gal/pic10.png' || a.attr('src') == '/images/gal/pic10_n.png' || a.attr('src') == '/images/gal/pic10_rot_n.png' ) {
	jQuery('.etag1').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag2').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#1f_zolos').fadeIn(500);
	jQuery('#2f_zolos').css({'display':'none'});
		jQuery('.zolos1').css({'display':'block'});
		jQuery('.zolos2').css({'display':'none'});	
		}	
			
});

// переключение между 1 и 2 этажом в разрезе домов. 2 этаж
	
jQuery('.etag2').click(function() {
	if( a.attr('src') == '/images/gal/pic1_rot.png' || a.attr('src') == '/images/gal/pic1.png' || a.attr('src') == '/images/gal/pic1_n.png' || a.attr('src') == '/images/gal/pic1_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2floor').fadeIn(500);
	jQuery('#1floor').css({'display':'none'});
		jQuery('.scand2').css({'display':'block'});
		jQuery('.scand1').css({'display':'none'});	
		}
	else if( a.attr('src') == '/images/gal/pic3_rot.png' || a.attr('src') == '/images/gal/pic3.png' || a.attr('src') == '/images/gal/pic3_n.png' || a.attr('src') == '/images/gal/pic3_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2f').fadeIn(500);
	jQuery('#1f').css({'display':'none'});
		jQuery('.rg2').css({'display':'block'});
		jQuery('.rg1').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic4_rot.png' || a.attr('src') == '/images/gal/pic4.png' || a.attr('src') == '/images/gal/pic4_n.png' || a.attr('src') == '/images/gal/pic4_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2f_tihz').fadeIn(500);
	jQuery('#1f_tihz').css({'display':'none'});
		jQuery('.tihz2').css({'display':'block'});
		jQuery('.tihz1').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic5_rot.png' || a.attr('src') == '/images/gal/pic5.png' || a.attr('src') == '/images/gal/pic5_n.png' || a.attr('src') == '/images/gal/pic5_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2f_ww').fadeIn(500);
	jQuery('#1f_ww').css({'display':'none'});
		jQuery('.ww2').css({'display':'block'});
		jQuery('.ww1').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic6_rot.png' || a.attr('src') == '/images/gal/pic6.png' || a.attr('src') == '/images/gal/pic6_n.png' || a.attr('src') == '/images/gal/pic6_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2f_orion').fadeIn(500);
	jQuery('#1f_orion').css({'display':'none'});
		jQuery('.orion2').css({'display':'block'});
		jQuery('.orion1').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic7_rot.png' || a.attr('src') == '/images/gal/pic7.png' || a.attr('src') == '/images/gal/pic7_n.png' || a.attr('src') == '/images/gal/pic7_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2f_pols').fadeIn(500);
	jQuery('#1f_pols').css({'display':'none'});
		jQuery('.pols2').css({'display':'block'});
		jQuery('.pols1').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic8_rot.png' || a.attr('src') == '/images/gal/pic8.png' || a.attr('src') == '/images/gal/pic8_n.png' || a.attr('src') == '/images/gal/pic8_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2f_soldol').fadeIn(500);
	jQuery('#1f_soldol').css({'display':'none'});
		jQuery('.soldol2').css({'display':'block'});
		jQuery('.soldol1').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic9_rot.png' || a.attr('src') == '/images/gal/pic9.png' || a.attr('src') == '/images/gal/pic9_n.png' || a.attr('src') == '/images/gal/pic9_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2f_guest').fadeIn(500);
	jQuery('#1f_guest').css({'display':'none'});
		jQuery('.guest2').css({'display':'block'});
		jQuery('.guest1').css({'display':'none'});	
		}	
	else if( a.attr('src') == '/images/gal/pic10_rot.png' || a.attr('src') == '/images/gal/pic10.png' || a.attr('src') == '/images/gal/pic10_n.png' || a.attr('src') == '/images/gal/pic10_rot_n.png' ) {
	jQuery('.etag2').css({'cursor':'default', 'font-size':'20px', 'color':'#959595', 'border':'none'});
	jQuery('.etag1').css({'border-bottom':'1px solid', 'cursor':'pointer', 'display':'inline', 'margin-left':'20px', 'font-size':'16px', 'color':'#000000'});
	jQuery('#2f_zolos').fadeIn(500);
	jQuery('#1f_zolos').css({'display':'none'});
		jQuery('.zolos2').css({'display':'block'});
		jQuery('.zolos1').css({'display':'none'});	
		}	
		
});

// Показ/Скрытие формы
jQuery('#switch').toggle(function () {
	
	jQuery('#order').fadeIn(500);
}, function () {
	
	jQuery('#order').fadeOut(500);
});

jQuery('#close').click(function () {
	
	jQuery('#order').fadeOut(500);
});

//ФОТОГАЛЕРЕЯ

// Листаем галерею вперед
var b = jQuery('#mainPhoto');

function galChange(textName,imgName) {
	
	jQuery('#photo_descr_int1').text(textName);
	b.hide().attr('src', '/images/gallery/norm/' + imgName + '.jpg');
	b.load(function () {
		jQuery(this).fadeIn(500);
	});
	
}

jQuery('#arrow_next').click(function () {
	
	if ( b.attr('src') == '/images/gallery/norm/1.jpg' ) {
		galChange('Скандинавия','2');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/2.jpg' ) {
		galChange('Скандинавия. Вид внутри.','3');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/3.jpg' ) {
		galChange('Скандинавия. Вид внутри.','4');
	}

	else if ( b.attr('src') == '/images/gallery/norm/4.jpg' ) {
		galChange('Скандинавия. Вид внутри.','5');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/5.jpg' ) {
		galChange('Скандинавия. Вид внутри.','6');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/6.jpg' ) {
		galChange('Скандинавия. Вид внутри.','7');
	}

	else if ( b.attr('src') == '/images/gallery/norm/7.jpg' ) {
		galChange('Скандинавия. Вид внутри.','8');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/8.jpg' ) {
		galChange('Скандинавия. Вид внутри.','9');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/9.jpg' ) {
		galChange('Скандинавия','10');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/10.jpg' ) {
		galChange('Скандинавия','11');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/11.jpg' ) {
		galChange('Скандинавия','12');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/12.jpg' ) {
		galChange('Скандинавия','13');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/13.jpg' ) {
		galChange('Скандинавия','14');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/14.jpg' ) {
		galChange('Скандинавия','15');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/15.jpg' ) {
		galChange('Лахти','16');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/16.jpg' ) {
		galChange('Лахти','17');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/17.jpg' ) {
		galChange('Лахти. Вид внутри.','18');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/18.jpg' ) {
		galChange('Лахти. Вид внутри.','19');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/19.jpg' ) {
		galChange('Лахти. Вид внутри.','20');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/20.jpg' ) {
		galChange('Лахти. Вид внутри.','21');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/21.jpg' ) {
		galChange('Лахти. Банный комплекс.','22');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/22.jpg' ) {
		galChange('','23');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/23.jpg' ) {
		galChange('','24');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/24.jpg' ) {
		galChange('Солнечная долина','25');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/25.jpg' ) {
		galChange('Солнечная долина','26');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/26.jpg' ) {
		galChange('Солнечная долина. Вид внутри.','27');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/27.jpg' ) {
		galChange('Солнечная долина. Вид внутри.','28');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/28.jpg' ) {
		galChange('Солнечная долина. Вид внутри.','29');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/29.jpg' ) {
		galChange('Солнечная долина. Сауна.','30');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/30.jpg' ) {
		galChange('','31');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/31.jpg' ) {
		galChange('','32');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/32.jpg' ) {
		galChange('','33');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/33.jpg' ) {
		galChange('','34');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/34.jpg' ) {
		galChange('','35');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/35.jpg' ) {
		galChange('','36');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/36.jpg' ) {
		galChange('','37');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/37.jpg' ) {
		galChange('Стелс','38');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/38.jpg' ) {
		galChange('Стелс','39');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/39.jpg' ) {
		galChange('Стелс','40');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/40.jpg' ) {
		galChange('Стелс','41');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/41.jpg' ) {
		galChange('Стелс 3','42');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/42.jpg' ) {
		galChange('Стелс','43');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/43.jpg' ) {
		galChange('Золотая осень','44');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/44.jpg' ) {
		galChange('Золотая осень','45');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/45.jpg' ) {
		galChange('Усадьба','46');
	}
	else if ( b.attr('src') == '/images/gallery/norm/46.jpg' ) {
		galChange('Усадьба','47');
	}
	else if ( b.attr('src') == '/images/gallery/norm/47.jpg' ) {
		galChange('Жемчужина','48');
	}
	else if ( b.attr('src') == '/images/gallery/norm/48.jpg' ) {
		galChange('Жемчужина','49');
	}
	else if ( b.attr('src') == '/images/gallery/norm/49.jpg' ) {
		galChange('Жемчужина','50');
	}
	else if ( b.attr('src') == '/images/gallery/norm/50.jpg' ) {
		galChange('Жемчужина. Вид внутри.','51');
	}
	else if ( b.attr('src') == '/images/gallery/norm/51.jpg' ) {
		galChange('Жемчужина. Вид внутри.','52');
	}
	else if ( b.attr('src') == '/images/gallery/norm/52.jpg' ) {
		galChange('Жемчужина. Вид внутри.','53');
	}
	else if ( b.attr('src') == '/images/gallery/norm/53.jpg' ) {
		galChange('','54');
	}
	else if ( b.attr('src') == '/images/gallery/norm/54.jpg' ) {
		galChange('','55');
	}
	else if ( b.attr('src') == '/images/gallery/norm/55.jpg' ) {
		galChange('','56');
	}
	else if ( b.attr('src') == '/images/gallery/norm/56.jpg' ) {
		galChange('','57');
	}
	else if ( b.attr('src') == '/images/gallery/norm/57.jpg' ) {
		galChange('Полярная звезда','58');
	}
	else if ( b.attr('src') == '/images/gallery/norm/58.jpg' ) {
		galChange('Тихая заводь','59');
	}
	else if ( b.attr('src') == '/images/gallery/norm/59.jpg' ) {
		galChange('Тихая заводь','60');
	}
	else if ( b.attr('src') == '/images/gallery/norm/60.jpg' ) {
		galChange('Тихая заводь','61');
	}
	else if ( b.attr('src') == '/images/gallery/norm/61.jpg' ) {
		galChange('','62');
	}
	else if ( b.attr('src') == '/images/gallery/norm/62.jpg' ) {
		galChange('Зеленая роща','63');
	}
	else if ( b.attr('src') == '/images/gallery/norm/63.jpg' ) {
		galChange('Дом у озера','64');
	}
	else if ( b.attr('src') == '/images/gallery/norm/64.jpg' ) {
		galChange('Дом у озера','65');
	}
	else if ( b.attr('src') == '/images/gallery/norm/65.jpg' ) {
		galChange('Дом у озера','66');
	}
	else if ( b.attr('src') == '/images/gallery/norm/66.jpg' ) {
		galChange('Баня 11-М','67');
	}
	else if ( b.attr('src') == '/images/gallery/norm/67.jpg' ) {
		galChange('Баня','68');
	}
	else if ( b.attr('src') == '/images/gallery/norm/68.jpg' ) {
		galChange('Баня','69');
	}
	else if ( b.attr('src') == '/images/gallery/norm/69.jpg' ) {
		galChange('Баня','70');
	}
	else if ( b.attr('src') == '/images/gallery/norm/70.jpg' ) {
		galChange('Баня. Вид внутри.','71');
	}
	else if ( b.attr('src') == '/images/gallery/norm/71.jpg' ) {
		galChange('Баня. Вид внутри.','72');
	}
	else if ( b.attr('src') == '/images/gallery/norm/72.jpg' ) {
		galChange('Баня 11-Л','73');
	}
	else if ( b.attr('src') == '/images/gallery/norm/73.jpg' ) {
		galChange('Баня 11-Л','74');
	}
	else if ( b.attr('src') == '/images/gallery/norm/74.jpg' ) {
		galChange('Баня 11-Л. Вид внутри.','75');
	}
	else if ( b.attr('src') == '/images/gallery/norm/75.jpg' ) {
		galChange('Баня 11-Л. Вид внутри.','76');
	}
	else if ( b.attr('src') == '/images/gallery/norm/76.jpg' ) {
		galChange('Баня','77');
	}
	else if ( b.attr('src') == '/images/gallery/norm/77.jpg' ) {
		galChange('Баня','78');
	}
	else if ( b.attr('src') == '/images/gallery/norm/78.jpg' ) {
		galChange('Баня','79');
	}
	else if ( b.attr('src') == '/images/gallery/norm/79.jpg' ) {
		galChange('Кукольный домик','80');
	}
	else if ( b.attr('src') == '/images/gallery/norm/80.jpg' ) {
		galChange('Кукольный домик','81');
	}
	else if ( b.attr('src') == '/images/gallery/norm/81.jpg' ) {
		galChange('Кукольный домик','82');
	}
	else if ( b.attr('src') == '/images/gallery/norm/82.jpg' ) {
		galChange('Кукольный домик','83');
	}
	

});

// Листаем галерею назад
var b = jQuery('#mainPhoto');

jQuery('#arrow_prev').click(function () {
	
	if ( b.attr('src') == '/images/gallery/norm/2.jpg' ) {
		galChange('Скандинавия','1');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/3.jpg' ) {
		galChange('Скандинавия','2');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/4.jpg' ) {
		galChange('Скандинавия. Вид внутри.','3');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/5.jpg' ) {
		galChange('Скандинавия. Вид внутри.','4');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/6.jpg' ) {
		galChange('Скандинавия. Вид внутри.','5');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/7.jpg' ) {
		galChange('Скандинавия. Вид внутри.','6');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/8.jpg' ) {
		galChange('Скандинавия. Вид внутри.','7');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/9.jpg' ) {
		galChange('Скандинавия. Вид внутри.','8');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/10.jpg' ) {
		galChange('Скандинавия. Вид внутри.','9');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/11.jpg' ) {
		galChange('Скандинавия','10');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/12.jpg' ) {
		galChange('Скандинавия','11');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/13.jpg' ) {
		galChange('Скандинавия','12');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/14.jpg' ) {
		galChange('Скандинавия','13');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/15.jpg' ) {
		galChange('Скандинавия','14');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/16.jpg' ) {
		galChange('Скандинавия','15');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/17.jpg' ) {
		galChange('Лахти','16');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/18.jpg' ) {
		galChange('Лахти','17');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/19.jpg' ) {
		galChange('Лахти. Вид внутри.','18');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/20.jpg' ) {
		galChange('Лахти. Вид внутри.','19');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/21.jpg' ) {
		galChange('Лахти. Вид внутри.','20');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/22.jpg' ) {
		galChange('Лахти. Вид внутри.','21');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/23.jpg' ) {
		galChange('Лахти. Банный комплекс.','22');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/24.jpg' ) {
		galChange('','23');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/25.jpg' ) {
		galChange('','24');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/26.jpg' ) {
		galChange('Солнечная долина','25');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/27.jpg' ) {
		galChange('Солнечная долина','26');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/28.jpg' ) {
		galChange('Солнечная долина. Вид внутри.','27');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/29.jpg' ) {
		galChange('Солнечная долина. Вид внутри.','28');
	}
		
	else if ( b.attr('src') == '/images/gallery/norm/30.jpg' ) {
		galChange('Солнечная долина. Вид внутри.','29');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/31.jpg' ) {
		galChange('Солнечная долина. Сауна.','30');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/32.jpg' ) {
		galChange('','31');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/33.jpg' ) {
		galChange('','32');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/34.jpg' ) {
		galChange('','33');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/35.jpg' ) {
		galChange('','34');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/36.jpg' ) {
		galChange('','35');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/37.jpg' ) {
		galChange('','36');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/38.jpg' ) {
		galChange('','37');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/39.jpg' ) {
		galChange('Стелс','38');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/40.jpg' ) {
		galChange('Стелс','39');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/41.jpg' ) {
		galChange('Стелс','40');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/42.jpg' ) {
		galChange('Стелс','41');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/43.jpg' ) {
		galChange('Стелс 3','42');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/44.jpg' ) {
		galChange('Стелс','43');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/45.jpg' ) {
		galChange('Золотая осень','44');
	}
	
	else if ( b.attr('src') == '/images/gallery/norm/46.jpg' ) {
		galChange('Золотая осень','45');
	}
	else if ( b.attr('src') == '/images/gallery/norm/47.jpg' ) {
		galChange('Усадьба','46');
	}
	else if ( b.attr('src') == '/images/gallery/norm/48.jpg' ) {
		galChange('Усадьба','47');
	}
	else if ( b.attr('src') == '/images/gallery/norm/49.jpg' ) {
		galChange('Жемчужина','48');
	}
	else if ( b.attr('src') == '/images/gallery/norm/50.jpg' ) {
		galChange('Жемчужина','49');
	}
	else if ( b.attr('src') == '/images/gallery/norm/51.jpg' ) {
		galChange('Жемчужина','50');
	}
	else if ( b.attr('src') == '/images/gallery/norm/52.jpg' ) {
		galChange('Жемчужина. Вид внутри.','51');
	}
	else if ( b.attr('src') == '/images/gallery/norm/53.jpg' ) {
		galChange('Жемчужина. Вид внутри.','52');
	}
	else if ( b.attr('src') == '/images/gallery/norm/54.jpg' ) {
		galChange('Жемчужина. Вид внутри.','53');
	}
	else if ( b.attr('src') == '/images/gallery/norm/55.jpg' ) {
		galChange('','54');
	}
	else if ( b.attr('src') == '/images/gallery/norm/56.jpg' ) {
		galChange('','55');
	}
	else if ( b.attr('src') == '/images/gallery/norm/57.jpg' ) {
		galChange('','56');
	}
	else if ( b.attr('src') == '/images/gallery/norm/58.jpg' ) {
		galChange('','57');
	}
	else if ( b.attr('src') == '/images/gallery/norm/59.jpg' ) {
		galChange('Полярная звезда','58');
	}
	else if ( b.attr('src') == '/images/gallery/norm/60.jpg' ) {
		galChange('Тихая заводь','59');
	}
	else if ( b.attr('src') == '/images/gallery/norm/61.jpg' ) {
		galChange('Тихая заводь','60');
	}
	else if ( b.attr('src') == '/images/gallery/norm/62.jpg' ) {
		galChange('Тихая заводь','61');
	}
	else if ( b.attr('src') == '/images/gallery/norm/63.jpg' ) {
		galChange('','62');
	}
	else if ( b.attr('src') == '/images/gallery/norm/64.jpg' ) {
		galChange('Зеленая роща','63');
	}
	else if ( b.attr('src') == '/images/gallery/norm/65.jpg' ) {
		galChange('Дом у озера','64');
	}
	else if ( b.attr('src') == '/images/gallery/norm/66.jpg' ) {
		galChange('Дом у озера','65');
	}
	else if ( b.attr('src') == '/images/gallery/norm/67.jpg' ) {
		galChange('Дом у озера','66');
	}
	else if ( b.attr('src') == '/images/gallery/norm/68.jpg' ) {
		galChange('Баня 11-М','67');
	}
	else if ( b.attr('src') == '/images/gallery/norm/69.jpg' ) {
		galChange('Баня','68');
	}
	else if ( b.attr('src') == '/images/gallery/norm/70.jpg' ) {
		galChange('Баня','69');
	}
	else if ( b.attr('src') == '/images/gallery/norm/71.jpg' ) {
		galChange('Баня','70');
	}
	else if ( b.attr('src') == '/images/gallery/norm/72.jpg' ) {
		galChange('Баня. Вид внутри.','71');
	}
	else if ( b.attr('src') == '/images/gallery/norm/73.jpg' ) {
		galChange('Баня. Вид внутри.','72');
	}
	else if ( b.attr('src') == '/images/gallery/norm/74.jpg' ) {
		galChange('Баня 11-Л','73');
	}
	else if ( b.attr('src') == '/images/gallery/norm/75.jpg' ) {
		galChange('Баня 11-Л','74');
	}
	else if ( b.attr('src') == '/images/gallery/norm/76.jpg' ) {
		galChange('Баня 11-Л. Вид внутри.','75');
	}
	else if ( b.attr('src') == '/images/gallery/norm/77.jpg' ) {
		galChange('Баня 11-Л. Вид внутри.','76');
	}
	else if ( b.attr('src') == '/images/gallery/norm/78.jpg' ) {
		galChange('Баня','77');
	}
	else if ( b.attr('src') == '/images/gallery/norm/79.jpg' ) {
		galChange('Баня','78');
	}
	else if ( b.attr('src') == '/images/gallery/norm/80.jpg' ) {
		galChange('Баня','79');
	}
	else if ( b.attr('src') == '/images/gallery/norm/81.jpg' ) {
		galChange('Кукольный домик','80');
	}
	else if ( b.attr('src') == '/images/gallery/norm/82.jpg' ) {
		galChange('Кукольный домик','81');
	}
	else if ( b.attr('src') == '/images/gallery/norm/83.jpg' ) {
		galChange('Кукольный домик','82');
	}
	
});

// Листаем нижнюю галерею вперед
function downGalChange(link1,link2,galOut,galIn) {
	
	jQuery('.strelki_s').css({'top' : '203px'});
	jQuery('#a_low_arrow_prev').attr('href', link1);
	jQuery('#a_low_arrow_next').attr('href', link2);
	jQuery('#low_gallery_' + galOut).fadeOut(100, function () {
		jQuery('#low_gallery_' + galIn).fadeIn(500);
	});
	
}

jQuery('#low_arrow_next').click(function () {
	
	if ( jQuery('#a_low_arrow_next').attr('href') == '#2' ) {
		downGalChange('#1','#3','1','2');
	}
	
	else if ( jQuery('#a_low_arrow_next').attr('href') == '#3' ) {
		downGalChange('#2','#4','2','3');
	}
	
	else if ( jQuery('#a_low_arrow_next').attr('href') == '#4' ) {
		downGalChange('#3','#5','3','4');
	}
	
	else if ( jQuery('#a_low_arrow_next').attr('href') == '#5' ) {
		downGalChange('#4','#6','4','5');
	}
	
	else if ( jQuery('#a_low_arrow_next').attr('href') == '#6' ) {
		downGalChange('#5','#forward','5','6');
		jQuery('.strelki_s').css({'top' : '91px'});
	}
	
	else if ( jQuery('#a_low_arrow_next').attr('href') == '#7' ) {
		downGalChange('#6','#8','6','7');
	}
	
	else if ( jQuery('#a_low_arrow_next').attr('href') == '#8' ) {
		downGalChange('#7','#9','7','8');
	}
	
	else if ( jQuery('#a_low_arrow_next').attr('href') == '#9' ) {
		downGalChange('#8','#forward','8','9');
	}
	
});

// Листаем нижнюю галерею назад
jQuery('#low_arrow_prev').click(function () {
	
	if ( jQuery('#a_low_arrow_prev').attr('href') == '#1' ) {
		downGalChange('#back','#2','2','1');
	}
	
	else if ( jQuery('#a_low_arrow_prev').attr('href') == '#2' ) {
		downGalChange('#1','#3','3','2');
	}
	
	else if ( jQuery('#a_low_arrow_prev').attr('href') == '#3' ) {
		downGalChange('#2','#4','4','3');
	}
	
	else if ( jQuery('#a_low_arrow_prev').attr('href') == '#4' ) {
		downGalChange('#3','#5','5','4');
	}
	
	else if ( jQuery('#a_low_arrow_prev').attr('href') == '#5' ) {
		downGalChange('#4','#6','6','5');
	}
	
	else if ( jQuery('#a_low_arrow_prev').attr('href') == '#6' ) {
		downGalChange('#5','#7','7','6');
	}
	
	else if ( jQuery('#a_low_arrow_prev').attr('href') == '#7' ) {
		downGalChange('#6','#8','8','7');
	}
	
	else if ( jQuery('#a_low_arrow_prev').attr('href') == '#8' ) {
		downGalChange('#7','#9','9','8');
	}
	
});

// Постраничная навигация (открываем нужное нижнее меню)
jQuery('.num_alb a').click(function () {
	
	if ( jQuery(this).attr('href') == '#gallery_1' ) {
		
		jQuery('.strelki_s').css({'top' : '203px'});
		jQuery('#a_low_arrow_prev').attr('href', '#back');
		jQuery('#a_low_arrow_next').attr('href', '#2');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_1').fadeIn(500);
		});
		
	}
	
	else if ( jQuery(this).attr('href') == '#gallery_2' ) {
		
		jQuery('.strelki_s').css({'top' : '203px'});
		jQuery('#a_low_arrow_prev').attr('href', '#1');
		jQuery('#a_low_arrow_next').attr('href', '#3');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_2').fadeIn(500);
		});
		
	}
	
	else if ( jQuery(this).attr('href') == '#gallery_3' ) {
		
		jQuery('.strelki_s').css({'top' : '203px'});
		jQuery('#a_low_arrow_prev').attr('href', '#2');
		jQuery('#a_low_arrow_next').attr('href', '#4');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_3').fadeIn(500);
		});
		
	}
	
	else if ( jQuery(this).attr('href') == '#gallery_4' ) {
		
		jQuery('.strelki_s').css({'top' : '203px'});
		jQuery('#a_low_arrow_prev').attr('href', '#3');
		jQuery('#a_low_arrow_next').attr('href', '#5');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_4').fadeIn(500);
		});
		
	}
	
	else if ( jQuery(this).attr('href') == '#gallery_5' ) {
		
		jQuery('.strelki_s').css({'top' : '203px'});
		jQuery('#a_low_arrow_prev').attr('href', '#4');
		jQuery('#a_low_arrow_next').attr('href', '#6');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_5').fadeIn(500);
		});
		
	}
	
	else if ( jQuery(this).attr('href') == '#gallery_6' ) {
		
		jQuery('.strelki_s').css({'top' : '91px'});
		jQuery('#a_low_arrow_prev').attr('href', '#5');
		jQuery('#a_low_arrow_next').attr('href', '#7');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_6').fadeIn(500);
		});
		
	}
	
	else if ( jQuery(this).attr('href') == '#gallery_7' ) {
		
		jQuery('#a_low_arrow_prev').attr('href', '#6');
		jQuery('#a_low_arrow_next').attr('href', '#8');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_7').fadeIn(500);
		});
		
	}
	
	else if ( jQuery(this).attr('href') == '#gallery_8' ) {
		
		jQuery('#a_low_arrow_prev').attr('href', '#7');
		jQuery('#a_low_arrow_next').attr('href', '#9');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_8').fadeIn(500);
		});
		
	}
	
	else if ( jQuery(this).attr('href') == '#gallery_9' ) {
		
		jQuery('#a_low_arrow_prev').attr('href', '#8');
		jQuery('#a_low_arrow_next').attr('href', '#forward');
		jQuery('.mini_pic:visible').fadeOut(100, function () {
			jQuery('#low_gallery_9').fadeIn(500);
		});
		
	}
	
});

// При клике по ссылке "Ночь" меняем фон и соответствующий дом (на ночной); при клике по ссылке "День" меняем фон и соответствующий дом (на дневной)
var a2 = jQuery('#bigImg');

jQuery('.switch_day_night').click(function () {
	
	if ( jQuery('#img_day_night').attr('src') == '/images/night.png' ) {
		
		jQuery('body').css({'background-image' : 'url("http://www.plkdom.ru/images/main_bg_n.jpg")'});
		jQuery('#img_day_night').attr('src', '/images/day.png');
		jQuery('#span_day_night').text('День');
		
	}
	
	else if ( jQuery('#img_day_night').attr('src') == '/images/day.png' ) {
		
		jQuery('body').css({'background-image' : 'url("http://www.plkdom.ru/images/main_bg.jpg")'});
		jQuery('#img_day_night').attr('src', '/images/night.png');
		jQuery('#span_day_night').text('Ночь');
		
	}
	
	if ( a2.attr('src') == '/images/gal/pic1_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic12.png');
		jQuery('#aNext').attr('href', '/images/gal/pic2.png');
		
		a2.hide().attr('src', '/images/gal/pic1.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic1_rot_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic12.png');
		jQuery('#aNext').attr('href', '/images/gal/pic2.png');
		
		a2.hide().attr('src', '/images/gal/pic1_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic2_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic1.png');
		jQuery('#aNext').attr('href', '/images/gal/pic3.png');
		
		a2.hide().attr('src', '/images/gal/pic2.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic2_rot_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic1.png');
		jQuery('#aNext').attr('href', '/images/gal/pic3.png');
		
		a2.hide().attr('src', '/images/gal/pic2_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic3_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic2.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1.png');
		
		a2.hide().attr('src', '/images/gal/pic3.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic3_rot_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic2.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1.png');
		
		a2.hide().attr('src', '/images/gal/pic3_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
		
	else if ( a2.attr('src') == '/images/gal/pic4_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic3.png');
		jQuery('#aNext').attr('href', '/images/gal/pic5.png');
		
		a2.hide().attr('src', '/images/gal/pic4.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic4_rot_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic3.png');
		jQuery('#aNext').attr('href', '/images/gal/pic5.png');
		
		a2.hide().attr('src', '/images/gal/pic4_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a2.attr('src') == '/images/gal/pic5_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic4.png');
		jQuery('#aNext').attr('href', '/images/gal/pic6.png');
		
		a2.hide().attr('src', '/images/gal/pic5.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic5_rot_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic4.png');
		jQuery('#aNext').attr('href', '/images/gal/pic6.png');
		
		a2.hide().attr('src', '/images/gal/pic5_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a2.attr('src') == '/images/gal/pic6_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic5.png');
		jQuery('#aNext').attr('href', '/images/gal/pic7.png');
		
		a2.hide().attr('src', '/images/gal/pic6.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic6_rot_n.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic5.png');
		jQuery('#aNext').attr('href', '/images/gal/pic7.png');
		
		a2.hide().attr('src', '/images/gal/pic6_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a2.attr('src') == '/images/gal/pic7_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic6.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1.png');
		a2.hide().attr('src', '/images/gal/pic7.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic8_rot_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic7.png');
		jQuery('#aNext').attr('href', '/images/gal/pic9.png');
		a2.hide().attr('src', '/images/gal/pic8_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic8_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic7.png');
		jQuery('#aNext').attr('href', '/images/gal/pic9.png');
		a2.hide().attr('src', '/images/gal/pic8.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic9_rot_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic8.png');
		jQuery('#aNext').attr('href', '/images/gal/pic10.png');
		a2.hide().attr('src', '/images/gal/pic9_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic9_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic8.png');
		jQuery('#aNext').attr('href', '/images/gal/pic10.png');
		a2.hide().attr('src', '/images/gal/pic9.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic10_rot_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic9.png');
		jQuery('#aNext').attr('href', '/images/gal/pic11.png');
		a2.hide().attr('src', '/images/gal/pic10_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic10_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic9.png');
		jQuery('#aNext').attr('href', '/images/gal/pic11.png');
		a2.hide().attr('src', '/images/gal/pic10.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic11_rot_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic10.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1.png');
		a2.hide().attr('src', '/images/gal/pic11_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic11_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic10.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1.png');
		a2.hide().attr('src', '/images/gal/pic11.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	
	else if ( a2.attr('src') == '/images/gal/pic12_rot_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic11.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1.png');
		a2.hide().attr('src', '/images/gal/pic12_rot.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic12_n.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic11.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1.png');
		a2.hide().attr('src', '/images/gal/pic12.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	
	
	else if ( a2.attr('src') == '/images/gal/pic1.png' ) {

		jQuery('#aPrev').attr('href', '/images/gal/pic12_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic2_n.png');
		a2.hide().attr('src', '/images/gal/pic1_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic1_rot.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic12_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic2_n.png');
		a2.hide().attr('src', '/images/gal/pic1_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	
	else if ( a2.attr('src') == '/images/gal/pic2.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic1_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic3_n.png');
		a2.hide().attr('src', '/images/gal/pic2_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic2_rot.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic1_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic3_n.png');
		a2.hide().attr('src', '/images/gal/pic2_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic3.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic2_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic4_n.png');
		
		a2.hide().attr('src', '/images/gal/pic3_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic3_rot.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic2_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic4_n.png');
		
		a2.hide().attr('src', '/images/gal/pic3_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
		
	else if ( a2.attr('src') == '/images/gal/pic4.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic3_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic5_n.png');
		
		a2.hide().attr('src', '/images/gal/pic4_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic4_rot.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic3_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic5_n.png');
		
		a2.hide().attr('src', '/images/gal/pic4_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a2.attr('src') == '/images/gal/pic5.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic4_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic6_n.png');
		
		a2.hide().attr('src', '/images/gal/pic5_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
		
	}
	
	else if ( a2.attr('src') == '/images/gal/pic5_rot.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic4_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic6_n.png');
		
		a2.hide().attr('src', '/images/gal/pic5_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic6.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic5_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic7_n.png');
		
		a2.hide().attr('src', '/images/gal/pic6_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic6_rot.png' ) {
		
		jQuery('#aPrev').attr('href', '/images/gal/pic5_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic7_n.png');
		
		a2.hide().attr('src', '/images/gal/pic6_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
		
	else if ( a2.attr('src') == '/images/gal/pic7.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic6_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1_n.png');
		a2.hide().attr('src', '/images/gal/pic7_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic7_rot.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic6_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1_n.png');
		a2.hide().attr('src', '/images/gal/pic7_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	
	else if ( a2.attr('src') == '/images/gal/pic8_rot.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic7_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic9_n.png');
		a2.hide().attr('src', '/images/gal/pic8_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic8.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic7_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic9_n.png');
		a2.hide().attr('src', '/images/gal/pic8_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic9_rot.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic8_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic10_n.png');
		a2.hide().attr('src', '/images/gal/pic9_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic9.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic8_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic10_n.png');
		a2.hide().attr('src', '/images/gal/pic9_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic10_rot.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic9_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic11_n.png');
		a2.hide().attr('src', '/images/gal/pic10_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic10.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic9_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic11_n.png');
		a2.hide().attr('src', '/images/gal/pic10_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	else if ( a2.attr('src') == '/images/gal/pic11_rot.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic10_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic12_n.png');
		a2.hide().attr('src', '/images/gal/pic11_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic11.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic10_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic12_n.png');
		a2.hide().attr('src', '/images/gal/pic11_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	
	else if ( a2.attr('src') == '/images/gal/pic12_rot.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic11_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1_n.png');
		a2.hide().attr('src', '/images/gal/pic12_rot_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}	
		
	else if ( a2.attr('src') == '/images/gal/pic12.png' ) {
		jQuery('#aPrev').attr('href', '/images/gal/pic11_n.png');
		jQuery('#aNext').attr('href', '/images/gal/pic1_n.png');
		a2.hide().attr('src', '/images/gal/pic12_n.png');
    	a2.load(function() {
        	jQuery(this).fadeIn(500);
    	});
	}
	
	
		
});

}); //Конец ready
