Your custom functions should come as late as possible, to make sure that the library and all HTML has loaded. It’s not just for WordPress, you should always do this with any site.
There’s various ways of loading the library: your own local one, the WP one, a CDN one…all have their pros and cons. I personally always use the one that comes with WP but that’s only because I’m lazy. :)
I realise this that’s why I personally always load jquery just before the close of the body but I thought doing this with WP could be risky if plugins that rely on jquery were being loaded into the head I.e before jquery.
So my final question do you load jquery in the head or before the close of the body?