/**
 * 
 * @author Artod http://artod.ru for ÎÎÎ "Ýêñïðåññ ëàá" http://expresslab.ru
 * 
 */

$(document).ready(function(){

	$(".datepicker").datepicker({
		yearRange: "-60:+0",
		dateFormat: 'yy-mm-dd',
		regional: 'ru',
		changeMonth: true,
		changeYear: true
		/* ,
		altField: '.datepicker-alternate', 
		altFormat: 'DD, d MM, yy' */
	});

	$("#news-switcher a").click(function(){
		if (!$(this).parent().hasClass('news-switcher-active')) {
			var index = $("#news-switcher a").index($(this));
			//alert(index);
			$("#news-panels > div").hide();
			$("#news-panels > div").eq(index).fadeIn('fast');
			$("#news-switcher a").parent().removeClass('news-switcher-active');
			$(this).parent().addClass('news-switcher-active');
		}
		return false;
	});

	$(".menuslide").hide();

	$("a.group, a.news-gallery").fancybox({
		'zoomOpacity' : false,
		'overlayShow' : true,
		'hideOnContentClick' : false,
		'overlayOpacity' : '0.8',
		'zoomSpeedIn' : '200',
		'zoomSpeedOut' : '200'
	});
	
	
	$(".menuslide").prev().find('a').toggle(
		function(){
			$(this).parent().next().slideDown();
		},
		function(){
			$(this).parent().next().slideUp()
		}
	);

});
