remove all that from header php and add this to functions.php
function blmd_load_scripts() {
wp_enqueue_script( 'custom-script', '/path_to/your_script.js', array( 'jquery'), false);
}
add_action( 'wp_enqueue_scripts', 'blmd_load_scripts' );
This is using the wp_enque_script() and telling it your script depends on jquery. WordPress will make sure jQuery is properly loaded along with your custom script. (Unless your theme or another plugin is altering something)
Your welcome for the free support !