(function(co){
for (var c in co){
var newcolor = 'red';
var newstyle = '100px solid '+newcolor;
var obj = document.getElementById(c);
obj.onmouseover=obj.onmouseover= function(value){
     var border = co[value].substr(0,1)==='u'?'borderBottom':'borderTop';
     return function(e){
        var evt = window.event||e;
        document.getElementById(co[value]).style[border]=newstyle;
     }
}(c);
obj.onmouseout = function(value){
     var border='borderTop',ls='100px solid #ff6600';
     if (co[value].substr(0,1)==='u'){
        border = 'borderBottom';
        ls = '100px solid #669900';
     }
     return function(){document.getElementById(co[value]).style[border]=ls;}
}(c);
}
})(
{blog:'uup',about:'uleft',lab:'uright',link:'dleft',music:'ddown',photo:'dright'}
);
(function(style){
var tip = document.createElement('div');
document.getElementsByTagName('body')[0].appendChild(tip);
var link = document.createElement('div');
var anchors = document.getElementsByTagName('a');
for (var i=0;i<anchors.length;i++)
   if(anchors[i].getAttribute('title'))
     anchors[i].onmouseover=anchors[i].onmouseout=anchors[i].onmousemove=function(){
     var e=arguments[0]||window.event;
     var element=e.target||e.srcElement;
     for (var s in style.tip)tip.style[s]=style.tip[s];
     for (var s in style.link)link.style[s]=style.link[s];
     switch(e.type){
        case 'mouseover':
            element.setAttribute('tip',element.getAttribute('title'));
            element.setAttribute('title','');
            link.innerHTML = element.getAttribute('href');
            tip.innerHTML=element.getAttribute('tip');
            tip.appendChild(link);
            tip.style.display='';
            break;
        case 'mouseout':
            element.setAttribute('title',element.getAttribute('tip'));
            element.setAttribute('tip','');
            tip.style.display='none';
            break;
        case 'mousemove':
            tip.style.top=e.clientY+15+'px';
            tip.style.left=e.clientX+10+'px';
            break;
        default:
            break;
     }
     };
})({
tip:{
zIndex:1000,
position:'absolute',
backgroundColor:'#fff',
color:'#000',
opacity:0.6,
filter:'alpha(opacity=60)',
padding:'3px',
'-moz-border-radius':'5px',
'-webkit-border-radius':'5px'
},
link:{
marginLeft:'1em',
marginRight:'1em',
fontSize:'0.8em',
backgroundColor:'#FFFFCC',
color:'ccc',
'-moz-border-radius':'5px',
'-webkit-border-radius':'5px'
}});