What's the best way to ramp slowmotion?

By ramping I mean progressively slow time down from full speed to full slow motion.

For example, if player hits the slow motion button, after the first hit time is variable (let's say .5x) slower than when she first hit the button. a variable of time later, (let's say 0.1 seconds), it's variable slower (again, let's say .5x) it's current speed until reaching slow motion state desired as set in another variable.

Currently I'm using this function to slow down time, but it's jarring, cause it goes from full speed to ultra slow motion in one jump:

var _slow_motion : boolean = false;
var _max_slowmotion : float = 0.03125;

function Slowmotion (){                                     
    if  (!_slow_motion){
        Time.timeScale = _max_slowmotion;
        _slow_motion=true;
        }else   {
            Time.timeScale = 1;
            _slow_motion=false;
        }
        }

function Update(){
    if  (Input.GetButtonDown("Jump")){
    Slowmotion();
}

Ramping back up would be nice too, rather than jumping straight back to full speed.

Use mathf.smoothdamp.