// JavaScript Document
 $(document).ready(function(){
				$("#lenta_ul a[title]").hovertip();
						if ( $.browser.msie )
							if ( $.browser.version == '6.0')
								DD_belatedPNG.fix('.cont_l_top, .head_menu, .logo, .log_in, .bg_bottom_left, .bg_bottom_right, .logo_fut, .ag a, .film ');

    					$("#content td.nav ul li:first-child").css("margin-right", "34px");
	 					$("#content td.nav ul li:first-child").css("margin-left", "0px");
	 					$("#content td.nav ul li:first-child a").css("width", "100px");
	 					$("#content td.nav ul li:last-child").css("margin-left", "48px");
	  					$("#content td.nav ul li:last-child").css("margin-right", "0px");
	  					$("#content td.nav ul li:last-child a").css("width", "100px");
	  					$("#a16").css("margin-left", "0%");



	   					$("#a4").focus(function () {
         											$('label.searchlabel').css('display','none');
    												});
						$("#a4").blur(function () {
								 if ($('#a4').attr("value")=="")
         							$('label.searchlabel').css('display','block');
    												});


	  					 $("div.side_bar_l, div.side_bar_r ").mouseenter(function(){
     																$(this).css("background-position","-221px 0");
    															})
						 					.mouseleave(function(){
      																$(this).css("background-position","0 0");
    															});


	var lentawidth = countChildElements('lenta_ul','li') * 82 - $("#lenta ul").attr ("clientWidth") * 0.92;
	var interval = lentawidth / 5;
	var curpos = 0;

	$("#lenta .prev a").click(function() {		if ( curpos > 0 ) {			curpos--;
			$("#lenta_ul").animate({ textIndent: '+='+interval+'px'}, 500);
		}
		return false;
	});

	$("#lenta .next a").click(function() {		if ( curpos < 5 ) {
			curpos++;
			$("#lenta_ul").animate({textIndent: '-='+interval+'px'}, 500);
		}
		return false;
	});

  });

function countChildElements(parent, child)
   {
        var parent = document.getElementById(parent);
        var childCount = parent.getElementsByTagName(child).length;
        return childCount;
   }