Some more information on this. Someone (a hacker wanting to make some money I assume) managed to change a template to include a bit of code that should not be there, it was some sort of survey you needed to complete in order to view the site. The template was changed at 23.06 and reverted at 01.11 so it was there for about 2 hours.
I'm not 100% sure how the template was changed but looking at the logs I have a good idea.
Just FYI. There will never be any ads or surveys or anything like that for members on this site (probably never for guests either, certainly not any surveys)