/*stepcarousel.setup({
		galleryid: 'pages', //id of carousel DIV
		beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
		panelclass: 'panel', //class of panel DIVs each holding content
		autostep: {enable:false, moveby:1, pause:3000},
		panelbehavior: {speed:500, wraparound:false, persist:false},
		defaultbuttons: {enable: false, moveby: 1, leftnav: ['http://ak/images/speccaruselleft.jpg', -40, 20], rightnav: ['http://ak/images/speccaruselright.jpg', 10, 20]},
		statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
		contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
});
*/
$(document).ready(function()
	{
			$("a.closephoto").bind("click",function()
		{
				$("#photoviewer").hide();
		});
		$("a.gallery").bind("click",function()
		{
			var src=$(this).attr("rel");			
			var full=$(this).attr("rev");
			$("#photo").attr("src",src);
			$("#title").html($(this).attr("title"));
			$("#src").html('<a href="'+full+'" target="_blank">оригинальное изображение</a>');
			$("#photoviewer").show();	
		});
		$("a.vacancy").bind("click",function()
		{
			$(this).next("br").next("span").toggle();
				
		}
		);
		$("#photo").bind("click",function()
		{
			$("#photoviewer").hide();	
		});
				
		$('div.slideitem').cycle({
    fx:    'fade',
    speed:  3500
 });
			
		}		
		);
		var EXPANDED=false;
	function collapse()
	{
		if(EXPANDED)
		{
			$("div.menu div.dir").css("display","none");
			EXPANDED=false;
		}
		else
		{
			$("div.menu div").css("display","block");
			EXPANDED=true;
		}
	}
	function fun(v)
	{
		
		if($('#'+v).parent("span").nextAll("div").css("display")=="block")
			$('#'+v).parent("span").nextAll("div").css("display","none");
		else
			$('#'+v).parent("span").nextAll("div").css("display","block");
	
		//return false;
	}
	function select()
	{
		  $('#main-table').find("input[@class='delete_checkbox']").each(function(){
                this.checked = this.checked?false:true;
            });
   			 
	}
function openwindow(path,name,w,h)
	{
	window.open(path,
"mywindow","menubar=0,resizable=0,width="+w+",height="+h);	
	}
	
function recall()
	{
		if($("#recall").val()!='')
		{
		$.post("/formsubmit/recall",{"who":$("#recall").val(),"recep":4},
			function(data)
			{
				if(data=="SUCCESS")
				{
					alert("Спасибо. Наши специалисты свяжуться с вами в ближайшее время");
				}
			}
		);
		}
		else
				alert("Введите Ваш номер телефона для контакта");
	}

