You must have changed the code somehow. I was browsing your site about 10-20 minutes ago and everything seemed to work. The advertising ones led to a new page, while the other ones expanded the image. I see that when I visit your site now, that’s all gone; all the items lead to a new page.
The code I provided above should work provided that the fields still have the same field names.
You could try 0 for false:
if (get_post_meta($post->ID, 'media', true) == '0' )
EDIT: I just browsed your site again and now it seems to work!