$(document).ready(function(){
  function makeShow(){
        $('div#emkaShow').slideDown('slow');
   }
   function makeHide(){
         $('div#emkaShow').slideUp('slow');
   }
   var config = {
     over: makeShow, // function = onMouseOver callback (REQUIRED)
     timeout: 500, // number = milliseconds delay before onMouseOut
     out: makeHide // function = onMouseOut callback (REQUIRED)
   };
   $("span#emkaMenu").hoverIntent(config);
   $('table.tableInfo tr:odd').addClass('alt');
   //$('.grContainer').hide();
   //$('.grName:first').addClass('active').next().slideDown();
   $('.grName').click(function(){
        if($(this).next().is(':hidden')) { //If immediate next container is closed...
    		$('.grName').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
    		$(this).addClass('active').next().slideDown();
        }
        return false;
   });
   $('tr.s2').hover(function(){
        $(this).addClass('over');
   }, function(){
        $(this).removeClass('over');
   });
   $('.fadeIn img:gt(0)').hide();
   setInterval(function(){
     $('.fadeIn :first-child').fadeOut().next('img').fadeIn().end().appendTo('.fadeIn');
     //$('.fadeIn :first-child').fadeOut().next('img').fadeIn().end().appendTo('.fadeIn');
   }, 5000);
   $("div.addBlock").hover(function(){
          $(this).css({
             'border-color': '#939cc1',
             'background-color': '#e0e6ff'
          });
   }, function(){
          $(this).css({
             'border-color': '#ffffff',
             'background-color': '#ffffff'
          });
   });
});
