$().ready(function(){
				   
	$("a#single_1").fancybox({
	'zoomOpacity'			: true,
	'overlayShow'			: false,
	'zoomSpeedIn'			: 500,
	'zoomSpeedOut'			: 500
	});
	
	$("#direction a").fancybox({
	'zoomOpacity'			: true,
	'overlayShow'			: false,
	'zoomSpeedIn'			: 500,
	'zoomSpeedOut'			: 500
	});
	
	$("div.div_img_del a").fancybox({
	'zoomOpacity'			: true,
	'overlayShow'			: false,
	'zoomSpeedIn'			: 500,
	'zoomSpeedOut'			: 500
	});
	
	$("a.group1").fancybox({
	'zoomOpacity'			: true,
	'overlayShow'			: false,
	'zoomSpeedIn'			: 500,
	'zoomSpeedOut'			: 500
	});
	
	function Delete(num_object) 
	{ 
		if(confirm("Удалить запись?")) {parent.location='adm_del.php?id='+num_object} 
		else {return false;} 
	} 

	$("a.open img").hover(
	  function () {$(this).addClass("select");},
	  function () {$(this).removeClass("select");}
	);
	
	$("#li_hover").hover(
      function () {
		$("#menu_hude").fadeIn("slow");
      },
	  function () { }
    );
	
	$("#menu_hude").hover(
      function () {},
	  function () {
        $(this).fadeOut("slow");
      }
    );
	
	var flag = true;	
	$("h2.h2_all_foto").click(function(){	
		if (flag){ $("#full_foto").fadeIn("slow"); flag = false; }
		else{ $("#full_foto").fadeOut("slow"); flag = true; }
		return false;	
	});
	
	/////////////////////////////////////
	

	$("#sc_menu_1 a").click(function(){	
		var largePath = $(this).attr("href");		
		$("#largeImg_1").attr({ src: largePath});		
		 return false;
	});
	
	$("#sc_menu_2 a").click(function(){	
		var largePath = $(this).attr("href");		
		$("#largeImg_2").attr({ src: largePath});		
		 return false;
	});
	
	$("#sc_menu_3 a").click(function(){	
		var largePath = $(this).attr("href");		
		$("#largeImg_3").attr({ src: largePath});		
		 return false;
	});
	
	$("#sc_menu_4 a").click(function(){	
		var largePath = $(this).attr("href");		
		$("#largeImg_4").attr({ src: largePath});		
		 return false;
	});
	
	
	$('#urgent_sale').cycle({ 
    fx:     'scrollUp', 
    timeout: 6000, 
    delay:  -2000 
	});
	
	
	$("#various1").fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});
	
	$("#various3").fancybox({
		'width'				: '560px',
		'height'			: '400px;',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	$("a[rel=img_group1]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	
	$("div.news_photo img").hover(
	  function () {$(this).addClass("select");},
	  function () {$(this).removeClass("select");}
	);

	
	
});

