jQuery(document).ready(function(){	
						
	$(".h_m1").hover(
		function(){
		$(this).find('ul').show();
		return false;
		},
		function(){
		$(this).find('ul').hide();
		return false;
		}
		);
		
	$('a.zoom').livequery('click', function(event) {
		return hs.expand(this);
		return false;
	    });
		
	$(".zoom").click(
		function(){
		return hs.expand(this);
		return false;
		});
	
	$(".refresh").click(
		function(){
		document.location=document.URL;
		return false;
		});
	
	$('a.show').livequery('click', function(event) {
		$("."+$(this).attr("obj")).toggle();
		return false;
	    });
	
	$('a.show_obj').livequery('click', function(event) {
		$("."+$(this).attr("obj")).toggle();
			if($(this).attr("status")=="1")
			{
			$(".parent_"+$(this).attr("obj")).find('td').css("background","#A7D24D url('/img/line_bg.jpg')");
			$("."+$(this).attr("obj")).find('td').css("background","#A7D24D");	
			$(this).attr('status','0');
			}
			else
			{
			$(".parent_"+$(this).attr("obj")).find('td').css("background","#EAEAEA");
			$("."+$(this).attr("obj")).find('td').css("background","#EAEAEA");	
			$(this).attr('status','1');
			}
		return false;	
	    });
	
	//$('a.load').click(function(){
		//$("."+$(this).attr('obj')).empty();
	//	$("."+$(this).attr('obj')).append('<img src="/style/default/ru/img/ajax-loader.gif"> Loading...');
	//	$("."+$(this).attr('obj')).load("http://"+window.location.hostname+"/load"+$(this).attr("href"));
	//	return false;
	//	});
	
	$('a.load').livequery('click', function(event) {
		$("."+$(this).attr('obj')).empty();
		//$("."+$(this).attr('obj')).append('<img src="/style/default/ru/img/ajax-loader.gif"> Loading...');
		$("."+$(this).attr('obj')).load("http://"+window.location.hostname+"/load"+$(this).attr("href"));
		return false;
	    });
	
	$('a.loadOpen').livequery('click', function(event) {
		$("."+$(this).attr('obj')).empty();
		$("."+$(this).attr('obj')).toggle();
		//$("."+$(this).attr('obj')).append('<img src="/style/default/ru/img/ajax-loader.gif"> Loading...');
		$("."+$(this).attr('obj')).load("http://"+window.location.hostname+"/load"+$(this).attr("href"));
		return false;
	    });
	
	$('a.hidload').click(function(){
		//$("."+$(this).attr('obj')).empty();
		$("."+$(this).attr('obj')).append('<img src="/style/default/ru/img/ajax-loader.gif"> Loading...');
		$("."+$(this).attr('obj')).load("http://"+window.location.hostname+"/load"+$(this).attr("href"));
		$("."+$(this).attr('hide')).hide();
		return false;
		});
	
	$('a.hidload').livequery('click', function(event) {
		$("."+$(this).attr('obj')).empty();
		$("."+$(this).attr('obj')).append('<img src="/style/default/ru/img/ajax-loader.gif"> Loading...');
		$("."+$(this).attr('obj')).load("http://"+window.location.hostname+"/load"+$(this).attr("href"));
		$("."+$(this).attr('hide')).hide();
		return false;
	    });
	
	$('.putnotepad').click(function(){
		$('.hid_load').load("http://"+window.location.hostname+"/load"+$(this).attr("href"));
		
		$(this).html('<img src="/img/buttons/ch_notepad.gif">');
		return false;
		});	
	
	$('.form_send_resume').livequery(function(event)
		{
		$(this).ajaxForm({
		beforeSubmit: function() {
            $('.'+$(this).attr('obj')).append('<img src="/style/default/ru/img/ajax-loader.gif"><br>...');
			},
		target: '.'+$(this).attr('obj'),
		success: function()
			{
			$('.'+$(this).attr('obj')).fadeIn();
			}
			});
		});	
	
	var imfff=document.URL;
	imfff=imfff.replace("http://","").replace(document.domain,"");
	$(".h_m1 a[href='"+imfff+"']").parent("li").css("background","#666");
	$(".h_m1 a[href='"+imfff+"']").parent("li").css("background","#666 url('/img/menu_ch.png')");
	$(".h_m1 a[href='"+imfff+"']").parent("li").parent("ul").parent("li").css("background","#666");
});

