That's taken directly from one of the example apps in the Learn and Play section, and so is completely ToS compliant. Actually, it's not TOS-compliant. The guidelines specify you cannot include external scripts, and even if these scripts were included for you they would almost certainly fail...