Call node information when rendering links Alright, this one is a bit tricky. I'm using the theme() function and theme_links__system_main_menu to render the main menu in a specific way on the front page. All the menu items link too basic pages. 

The idea is that when hovering over a menu item, a pop-up appears with the content of a field called 'Preview' that's on the basic page of which the menu item is linked to. The pop-up itself is a simple CSS thing, so what I'm looking for is a way to access the information of the node in question.

I know $variables contains the link to the node, is there perhaps a function that gives you node information by link?
Assuming that you need to access to $node to populate the preview:

You will need to load the node object for access to $node. So lets say you extract the href from $variables, you wont be able to load node based on the url, atleast I dont know any function that does it. You will need to extract (php explode etc) node nid and then use node_load($nid) to load the $node object and then you can populate the preview based on a field of $node.  

Where to write the code? 

You can either override the theme function or use the preprocess, the preprocess for this should be (though not sure) yourtheme_preprocess_links__system_main_menu(&amp;$vars) and theme override will be yourtheme_links__system_main_menu. I hope you understand the difference between theme function override and preprocess. I'd suggest preprocess to add preview in $variables and then overriding theme function to use that value. OR, you can build the preview and add it as an attribute to the link.

Hope that helps.