// JavaScript Document

// динамическое позиционирование заголовка h1 
function getHeight(){
	h = $("#topTitle").height();
	m =	256-h;
	$("#topTitle").css("margin-top", m);

};

$(document).ready(function () {
			getHeight();
});

$(document).ready(function() { 
$("a[rel=viewGallery]").fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'titlePosition' 	: 'over',
		'centerOnScroll'    : 'true', 
		'cyclic'            : 'true',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Фото ' + (currentIndex + 1) + ' из ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
});
});
$(document).ready(function() { 
$("a[rel=viewObjects]").fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'titlePosition' 	: 'over',
		'centerOnScroll'    : 'true', 
		'cyclic'            : 'true',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Фото ' + (currentIndex + 1) + ' из ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
});
});

