﻿$(document).ready(function(){
	
	$('.search input.txt').focus(function(){
							 if ($(this).val() == 'Поиск'){ $(this).val('')}})
	$('.search input.txt').blur(function(){
							 if ($(this).val() == ''){ $(this).val('Поиск')}})
	
	$('.bt').height($(window).height() - $('.body1').height());
	
	$('table.table tr td:last-child').addClass('last');
	$('table.table tr th:last-child').addClass('last');
	$('table.table tr:last-child').addClass('lt');
	$('.inner2 li:first-child div').addClass('first');
	$('.inner2 li:first-child a').addClass('first');
	$('.inner2 li:last-child').addClass('last');
	$('.table tr td:first-child').addClass('first');
	
	$('.side-nav ul.inner2 li a b, .side-nav2 ul.inner2 li a b').each(function(){ 
	  var h1 = $(this).height() + $(this).next('span').height();
	  var height = $(this).prev('img').height();
	  var padding = (height-h1)/2;
	  if(padding>0){ $(this).css('padding-Top', padding); }
	});
	

	$('ul.side-nav li').hover(	
	  function(){
		  $(this).children('ul').show();},
	  function(){
		  $(this).children('ul').hide();}
	);
	$('ul.side-nav2 li').hover(	
	  function(){
		  $(this).children('ul').show();},
	  function(){
		  $(this).children('ul').hide();}
	);
	
});
$(window).resize(function(){
	if ($(this).height() >= 625)
	 $('.bt').height($(this).height() - $('.body1').height());
	else $('.bt').height(0);
});