// create custom animation algorithm for jQuery called "drop"  
$.easing.drop = function (x, t, b, c, d) { 
    return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 
}; 
 
// create custom overlay effect for jQuery Overlay 
$.tools.overlay.addEffect("drop",   
     
    // loading animation 
    function(done) {  
        var animateProps = { 
            top: '+=10',
            opacity: 1,  
            //width: '+=0' 
        }; 
        this.getOverlay().animate(animateProps, "medium", 'drop', done).show(); 
    },  
     
    // closing animation 
    function(done) { 
        var animateProps = { 
  
        	top: '-=10', 
            opacity: 0,  
            //width: '-=0' 
        }; 
        this.getOverlay().animate(animateProps, "fast", 'drop', function()  { 
            $(this).hide(); 
            done.call();         
        }); 
    } 
);

$(function(){
    $("a[rel]").overlay({
        effect: 'drop',
        expose: '#000',
    });
});