Made get_next and get_prev loop through all post until a next.prev post is found.

Used some code that I found on this page:
http://codex.wordpress.org/Next_and_Previous_Links