Joe's uncle gives him a mysterious book for his birthday, but when his friend Fred wishes for buried treasure while looking through the book, Joe, Sam and Fred suddenly find themselves transported back through time to the year 1718 on a pirate ship captained by the infamous Blackbeard.