Specify OnMouseEnter

I have a game where the player can purchase upgrades for himself from a in game ‘shop’.
I wanted to have the code for the entire shop within 1 script.

Unfortunately as soon as I started i found out that the code =

function OnMouseEnter () {}

Will only peform for the object it is attached to.
For instance I am not allowed to do something like this =

var button1 :GUITexture;
var button2 :GUITexture;

function OnMouseEnter (button1) {}
function onMouseEnter (button2) {}

Which is really annoying, so if anyone can tell me otherwise I would be really appreciative.

Attach the script to each GUITexture that in turn call back to your shop, like shop.SendMessage("OnMouseEnterGUITexture", guiTexture), or Raycast to find out which GUITexture is under your cursor. This way you can do it all in one central script.

Another way would be to use the OnGUI() method, as described here.