//Create by Alexandr Kramarenko info@webguru.in.ua
//2012 Recreated by Andrey Mirron www.mirron.com
jQuery(document).ready(function($) {

 /*   $('.box_menu').click(function() {
    $('.box_menu div div').css('display','none');
    $('#'+$(this).attr('id')+' div .h_submenu_block').css('display','block');
  });*/

  //AUTO SHOW/HIDE
$('.box_menu').mouseenter(function() {
    $('#'+$(this).attr('id')+' div .h_submenu_block').css('display','block');
  });
  $('.box_menu').mouseleave(function() {
    $('#'+$(this).attr('id')+' div .h_submenu_block').css('display','none');
  });
  
  //Use only MOUSEENTER, MOUSELEAVE events !!! IE Bug fix
  
  //Mainmenu change over color
  $('.box_menu').mouseenter(function(){
    $(this).css('background-color','#ccc');
  });
  
  $('.box_menu').mouseleave(function(){
      $(this).css('background-color','');
  });     

  //Submenu change over color
  $('td.submenu').mouseenter(function(){
    $(this).css('background-color','#DFEBD9');
  });
  $('td.submenu').mouseleave(function(){
    $(this).css('background-color','');
  });
  
  //Onclick submenu
  $('td.submenu').click(function(){
    document.location = $(this).children('a').attr('href');
  });  
  
});

