How move objects closer to camera when i mouse over it ??

I have seen a tutorial when one person made a 3d menu and when you select it it moves closer to the camera(it pulls out). I made it but the tutorial shows only when i do it with keyboard buttons (up and down). I want to do it with the mouse(when i mouse over it). How you see in MenuManager there is if(Input.GetAxisRaw("vertical"). Is there a way to do it with mouse ?? I mean i can pull out selected objects with up and down button of the keyboard. I want to pull out objects when i mouse over it. Can you pls help ?

Pls help

I will show you the java script:

menuItem

function OnSelected(on:boolean)
{
         //I just got selected
         if(on)
         {
                 iTween.MoveTo(gameObject,{"z":-5, "time":0.5});
         }
         else //I just got deselected
         {
                 iTween.MoveTo(gameObject,{"z":-2, "time":0.5});
         }
}

MenuManager

var menuItems:menuItem[]; // list of MenuItem(s)

var currentMenuItem:int = 0;

var keyDelay:float = 0.25;

function Start()
{
         menuItems[currentMenuItem].OnSelected(true);

         while(true)
         {
                 if(Input.GetAxisRaw("Vertical") > 0.9)
                 {
                         menuItems[currentMenuItem].OnSelected(false);

                         currentMenuItem--;
                         if(currentMenuItem < 0) currentMenuItem = 0;

                         menuItems[currentMenuItem].OnSelected(true);

                         yield new WaitForSeconds(keyDelay);
                 }
                 else if(Input.GetAxisRaw("Vertical") < -0.9)
                 {
                         menuItems[currentMenuItem].OnSelected(false);

                         currentMenuItem++;
                         if(currentMenuItem >= menuItems.length) currentMenuItem = menuItems.length - 1;

                         menuItems[currentMenuItem].OnSelected(true);

                         yield new WaitForSeconds(keyDelay);
                 }       
                 yield; 
         }       
}

Here's something basic for implementing what you have in mind. However you might wanna work on it to make nicer movements.

create buncha cubes and apply this script to you camera.

var speed:float = 0.07;

private var originalPosition:Vector3;
private var hoverObject:Transform;
private var hover:boolean = false;
private var destination:Vector3;

function Update () {

    var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
    var hit : RaycastHit;
    if (Physics.Raycast (ray, hit, 100)) {
        if(!hover){
        hoverObject = hit.transform;
        originalPosition  = hoverObject.transform.position;
        hover = true;
        }
    }  else {
        hover = false;
    }

    if(hover){
        var p : Vector3 = camera.ScreenToWorldPoint (Vector3 (Input.mousePosition.x,Input.mousePosition.y,camera.nearClipPlane));
        destination = p;
    } else {
        destination = originalPosition;
    }
    if(hoverObject != null)
            hoverObject.transform.position = Vector3.MoveTowards(hoverObject.transform.position,destination,speed); // Here is the line where you would swap it with iTween functions using destination variable.
}

Good luck!