Poor doggy. You shouldn't have gotten it paranoid and scared like that, it no choice but to defend itself. =P

So the dog ignored your friend, huh? Well, I guess dogs are nothing like sharks. Here's a little saying for surfers:

If there's a shark, you don't have to swim faster than it... just faster than your friends.