$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto({
				animationSpeed: 'normal', /* fast/slow/normal */
				padding: 40, /* padding for each side of the picture */
				opacity: 0.35, /* Value betwee 0 and 1 */
				showTitle: false, /* true/false */
				allowresize: true, /* true/false */
				counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
				theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
				callback: function(){}
			});
	var numb = 0;
	$(".accordion h3").eq(numb).addClass("active");
	//$(".accordion div:first").hide();	
	$(".accordion div.acc:gt("+numb+")").hide();
	$(".accordion div.acc:lt("+numb+")").hide();
	$(".accordion h3").click(function(){
		$(this).next("div").slideToggle("fast")
		.siblings("div:visible").slideUp("fast");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});
	
	$(".help").hover(function(){
	var xText = $(this).attr("alt");
	$("#helpdiv").text(xText);
	}, function(){
	$("#helpdiv").text("");
	});
	
	$('.form').validate();
	
	$('.aclink').toggle(function(){
	
	$('.hidden').css('visibility','hidden');
	$(this).parents("tr").next('.hidden').css('visibility','visible');	
	}, function(){
	$(this).parents("tr").next('.hidden').css('visibility','hidden');
	});
	
	$('.delimage').click(function(){
	if(confirm('Вы действительно хотите удалить файл?'))
		{//alert($(this).attr('href'));
		parent.location = $(this).attr('href');
		}
	return false;
	});
	$('.delcatalog').click(function(){
	if(confirm('Вы действительно хотите удалить каталог? Все фотографии из каталога так же удаляться. Если хотите сохранить фотографии сначала перенесите их в другой раздел'))
		{//alert($(this).attr('href'));
		parent.location = $(this).attr('href');
		}
	return false;
	});
});
