
/*$(document).ready(function(){
	$('#container').css('min-height', $('html').height());
	if ($('#content_inner').height() > 400) $('#container').css('min-height', $('html').height() + 100);
	
	if ($.browser.msie) {
		if ($.browser.version < 7) $('#container').css('height', $('html').height()); 
		if ($('#content_inner').height() > 400) $('#container').css('height', $('html').height() + 100);
	
	}

});*/
$(document).ready(function(){
	
	$('#city_images .alink').css('bottom','-15px');
	$('.imaged').width($('.imaged img').width());
	/*
	$('.imaged').each(function(){
		$(this).addClass('this')
		$('.this .alink').css('margin-left', $('.this img').width() - $('.this .alink').width());
		$('.this').removeClass('this');
	});
	*/
	
	
	
	
	
	// FancyBox
	$('.center_column').find('a[href$=".jpg"], a[href$=".JPG"], a[href$=".png"], a[href$=".PNG"], a[href$=".gif"], a[href$=".GIF"]').each(function() {
		$(this).addClass('slideshow').attr('rel', 'fancybox');
	});
	
	
	$(".center_column a[href*='youtube.com/watch']").click(function() {
		$.fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'title'			: this.title,
				'width'			: 480,
				'height'		: 385,
				'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'swf',
				'swf'			: {
					'wmode'				: 'transparent',
					'allowfullscreen'	: 'true'
				}
			});
	
		return false;
	});
	
	$('a.slideshow').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	500, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'autoScale'		:	false,
		'titlePosition'	:	'over',
		'showNavArrows'	:	true,
		'padding'		:	1,
		'overlayOpacity':	.3,
		'overlayColor'	:	'#000000',
		'easingIn'      : 'easeOutBack',
		'easingOut'     : 'easeInBack',
		'onComplete'	:	function() {
			$("#fancybox-wrap").hover(function() {
				$("#fancybox-title").show();
			}, function() {
				$("#fancybox-title").hide();
			});
		}


	});
	

});













/**
 * Аналог для print_r()
 * 
 * @param	mixed	variable	Переменная любого типа
 */
function pr(variable) {
	if ($.dump) {
		if (typeof(myAlert) != 'undefined') {
			myAlert('<pre>' + $.dump(variable) + '</pre>');
		} else {
			alert($.dump(variable));
		}
	} else {
		myAlert('Не подключено расширение jQuery.dump');
	}
}

function pr2(variable, x, y) {
	
	
	
	if ( ! $.dump) {
		alert('Не подключено расширение jQuery.dump');
	}
	
	
	if ($('#dump').size() <= 0) {
		x = x || 200;
		y = y || 200;
		$('body').append('<pre style="min-width: 150px; position:absolute; top:'+ y +'px; left:'+ x +'px; border:1px solid #000000; background-color: #FFFFFF; padding:5px;" id="dump"></pre>');
	}
	
	
	
	var t = $.dump(variable);
	t = t.replace(/	/g, '    ');
	
	
	$('#dump').text(t);
}

