Yeah definitely ads. Sometimes "bad guys" buy ad space on legitimate sites. They'll usually run normal ads for a few days in case anyone is watching, then switch to an infected ad and get as many victims as they can.
When you get that alert you should report the page, the alert message and the ads that you can see to the mods.