$(function(){
    $("#head .typ8").each(function(){
   new Tip8($(this));
  });  
})

function Tip8(root){
    this.root=root;
    
    this.init();
    this.attachEvent();
}

Tip8.prototype={
   init:function(){
         
 },
   attachEvent:function(){
    //$('.pop_eight').remove();
    var me=this;
    me.root.bind('mouseenter', function(){
        var text_this=$(this).text();
        var pos=me.root.position();
        me.root.after('<div class="pop_eight"><p>'+text_this+'</p></div>');
        //$('.pop').addClass('show');
        $('.pop_eight').animate({
            left: (pos.left-$('.pop_eight').width()),
            top: pos.top
        },0, function(){
            $('.pop_eight').slideDown(600);
        })
        
    })
    me.root.bind('mouseleave', function(){
        $('.pop_eight').hide('slow').delay(300).hide(0).remove();
    })
   }
 } 

