diff --git a/functions.php b/functions.php index e394a0f9..abda88c6 100644 --- a/functions.php +++ b/functions.php @@ -100,8 +100,19 @@ add_action( 'widgets_init', '_s_widgets_init' ); * Enqueue scripts */ function _s_scripts() { + global $post; + wp_enqueue_script( 'jquery' ); + wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', 'jquery', '20120206', true ); + + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { + wp_enqueue_script( 'comment-reply' ); + } + + if ( is_singular() && wp_attachment_is_image( $post->ID ) && ! is_admin() ) { + wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); + } } add_action( 'wp_enqueue_scripts', '_s_scripts' ); diff --git a/header.php b/header.php index aaaa5fe3..239a3a8a 100644 --- a/header.php +++ b/header.php @@ -35,7 +35,6 @@ ?> -