var monthes = new Array('января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря');
$(document).ready(function(){

    $(document).pngFix();

    $('#menu li').hover(
        function(){
            $(this).find('div').stop(true, true);
            $(this).find('div').slideDown('fast');
        },
        function(){
            $(this).find('div').slideUp('fast');
        }
    );

    $('form#search input.text').focus(function(){
        if ( $(this).attr('value') == 'Поиск по сайту' ) {
            $(this).attr('value','');
        }
    });

    $('form#search input.text').blur(function(){
        if ( $(this).attr('value') == '' ) {
            $(this).attr('value','Поиск по сайту');
        }
    });

    $('form#search').submit(function(){
        if ( ($(this).children('input.text').attr('value') == '') || ($(this).children('input.text').attr('value') == 'Поиск по сайту') ) {
            return false;
        }
    });
    
    $('#dates li a').hover(
        function(){
           $(this).parent('li').css('background-color','#EEEEEE');
        },
        function(){
           $(this).parent('li').css('background-color','transparent');
        }
    );
    clockTime();
	

});
	function clockTime() {
		var date = new Date();
		var hours = date.getHours();
		var minutes = date.getMinutes();
		if(minutes<10) minutes = '0'+minutes;
		if(hours<10) hours = '0'+hours;
		$('#clock .menu_info').html(hours+':'+minutes+'<br />'+date.getDate()+' '+monthes[date.getMonth()]+' '+date.getFullYear()+' г.');
		setTimeout('clockTime()',10000);
	}
