function pet_activate_pic(src)
{
	$('div.more-pic').removeClass('hidden-item');
	$(src).parents('div.more-pic').addClass('hidden-item');
	$('div.main-pic a').attr('href',$(src).attr('href'));
	im = $('img.full-pic',$(src)).clone();
	$('div.main-pic a').html(im);
	$('div.main-pic a img').removeClass('hidden-item');
	$('div.main-pic').css('width',im.attr('width')+10);
	$('div.more-pics a.lightbox').each(function(){
		if ($(this).attr('href') == $(src).attr('href'))
		{
			$(this).removeClass('show');
		}
		else
		{
			$(this).addClass('show');
		}
	});
	pet_init_lightbox();
}

function pet_init_lightbox()
{
	$('a.lightbox.show').lightBox({
		imageLoading:			'/js/themes/jquery/images/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
		imageBtnPrev:			'/js/themes/jquery/images/lightbox-btn-prev-ru.gif',			// (string) Path and the name of the prev button image
		imageBtnNext:			'/js/themes/jquery/images/lightbox-btn-next-ru.gif',			// (string) Path and the name of the next button image
		imageBtnClose:			'/js/themes/jquery/images/lightbox-btn-close-ru.gif',		// (string) Path and the name of the close btn
		imageBlank:				'/js/themes/jquery/images/lightbox-blank.gif',			// (string) Path and the name of a blank image (one pixel)
		txtImage:				'Фото',	// (string) Specify text "Image"
		fixedNavigation:		true,		// (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
		txtOf:					'из'		// (string) Specify text "of"
	});
}

function pet_reload_raions(src)
{
	$.ajax({
		url: '/inf.php?qtype=city-raions',
		type: 'POST',
		dataType: 'text',
		data: {
			'city_id':src.value
		},
		async: true,
		success: function(data,response){
			if (data.length == 0)
			{
				data = '<option value="">- все -</option>';
			}
			$('#f_raion').html(data);
		}
	})
}
