$(function(){
	$('.sh').mouseenter(function(){
      $(this).addClass('item_act');
    }).mouseleave(function(){
      $(this).toggleClass('item_act');
    });

});

$(document).ready(function() {
  $(".hover-enabled").filter(".year_hover").removeClass("year_hover")

  $('.arh').each(function(){
    if($(this).css('display') == 'block'){
      $(this).css('display','none');
    }
  });
  
$(".hover-enabled").hover(
  function(){
    $(this).addClass("year_hover");

  },
  function(){
    if($('.arh').css('display') == 'none'){
      $(this).removeClass("year_hover");    
    }
    }
  )
    $(".hover-enabled i").click(function() {
      if ($(".arh").css('display') == 'none'){
        $(".arh").css('display','block');      
      }else {
        $(".arh").css('display','none'); 
      }
    });  
  $("#main #menu-list li.main_banner a img").each(function(){
    if (typeof document.body.style.maxHeight === "undefined"){
      $(this).attr('src','/_pic/p.gif');
    }
  }); 
  
  
  /*main-page banners*/
  $('.banners a').hover(
		function(){
			$(this).parent().prev().children().css("top","-138px");
		},
		function(){
			$(this).parent().prev().children().css("top","0");
		}
  );
  
});



function deactivate(e) {
  //var e = event || h.fixEvent( window.event ),
  //var target = event ? event.target : window.event.srcElement;
  var target = e ? e.target : event.srcElement;

  while( target ) {
   // TODO
   // может лучше 'indexOf(opt.sConteinerClass) != -1' ?
   if( h.hasClass(target, opt.sConteinerClass) ) {
    return;
   }

   target = target.parentNode;
  }

  // прошлись по всему дереву, а контейнера не оказалось -- значит blur
  dropHide();
 };
