Problems with the most basic IR sending

I do not know the IRsend library. Does it just assume that you are going to use pin 3?

By the way, delay(5000) wastes the considerable power of your Arduino for 5 seconds.