// JavaScript Document

function loading(url,where){
	
	$(where).load(url);
	
}

function menu()
{
		$('ul.menu li').mouseover(function(){
	//	alert($('#active').css('top'))
		$("#active").stop(true);
		now=$(this).attr('value');
		then=$('.back').attr('value');
		move='-'+now*32;
		$('#active').animate({top: move
			},'slow');
		
		
		});
	
	
	$('ul.menu li').mouseout(function(){
		$("#active").stop(true);
		now=$(this).attr('value');
		then=$('.back').attr('value');
		move='-'+then*32;
		$('#active').animate({top: move
			},'slow');
	
		
		
		
		});
	
	}
function anim_menu(){
	$('.menu a[href]').unbind()
	$('.menu a[href]').click(function(event){
		
		now=$(this).attr('value');
		then=$('.back').attr('value');
		move='-1'+then*32;
		$('#active').animate({top: move
			},'slow');
		
		});
	
	}
	
/* ^ gora do bani ^	*/
	
	
	
$.fn.findLink = function(addClass) { file=window.location.pathname.split('/');
//	$('#menu li a[href="'+file[file.length-1]+'"]').attr('class','active');
$(this).each(function(){
if($(this).find('a').attr('href')==file[file.length-1])
{$(this).addClass(addClass);}
});
}



$.fn.sizeTh =function(){

		
		div=$(this).each(function(){
			th=$(this).find('th');	
		wys=th.outerHeight();
		$(this).css({height: wys});
			});
		

	}

