Interplay of electronic, magnetic and structural properties of surface-supported clusters