/* maOverlay.js
   linkable jQuery tooltip
   Craig Lyons for Milken Archive
   2011
*/

jQuery.noConflict();
(function($){
    $(document).ready(function() {
	    
	    $('.cssTip').live('mouseover',
			      function (){
				  var desc = $(this).next('div').text();
				  var descTrunc = desc.truncate(85, '...', false, true);
				  var $textHTML = $('<span class="tipText">'+descTrunc+'</span>');
				  $(this).parent().append($textHTML);
				  $(this).stop().fadeTo(1000,.18);
			      });
	    
	    
	    $('.cssTip').live('mouseout',
			      function (){
				  $(this).stop();
				  $(this).parent().find('span').remove();
				  $(this).css({ opacity: 1 });
			      });

	});
	
})(jQuery);
