/*

========================
(c) 2011 by system 
JavaScript document
created by _Daffy_ 
daffy@crazyhost.cz
========================

For IMES.CZ


*/
$.fn.chMenuFade = function(r, e, c) {  
return this.animate({opacity: 'toggle', height: 'toggle'},r,e,c);      
}; 


$(document).ready(function(){
    
  $('.white').mouseover(function(e){

    var currentId = $(this).attr('id');
    $('.'+currentId).css({'display' : 'block'});
    (this).className = "orange"; 
    return false;
    
  });
      
  $('.white').mouseout(function(e){
      
     (this).className = "white"; 
     var currentId = $(this).attr('id');
     $('.'+currentId).css({'display' : 'none'});
  });  
  


  $(document).mousemove(function(e){
      $('#imestitle').css({top:e.pageY+15,left:e.pageX+15});
  });


  $('*[title]').mouseover(function(e){
      $(this).after('<div id="imestitle"></div>');
      var ttext = $(this).attr("title");
      $(this).attr({title:""});
      $('#imestitle').text(ttext).fadeIn(500).fadeTo(800,0.8);
  });

  $('*[title]').mouseout(function(e){
      $(this).attr({title:$('#imestitle').text()});
      $('#imestitle').hide().remove();
  });
  
  
  
});


