<?php

if(! function_exists('expensecount_scripts')) :
    function expensecount_scripts() {
        wp_enqueue_style( 'expensecount-bootstrap', get_template_directory_uri().'/css/bootstrap.css', array(), '4.0.0', "all" );
        wp_enqueue_style( 'expensecount-style', get_stylesheet_uri() );
        wp_enqueue_style( 'expensecount-nav', get_template_directory_uri(). '/css/nav.css', array(), '1.0', "all" );
        wp_enqueue_style( 'expensecount-carousel', get_template_directory_uri(). '/owlcarousel/assets/owl.carousel.min.css', array(), '2.2.1', "all" );


        wp_deregister_script('jquery');
        wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js', array(), null, false);
        //wp_enqueue_script('jquery');
        wp_enqueue_script( 'expensecount-popper', get_template_directory_uri() . '/js/popper.min.js', array(), '20170206', true );
        wp_enqueue_script( 'expensecount-owlcarousel', get_template_directory_uri() . '/owlcarousel/owl.carousel.js', array(), '20170206', true );
        wp_enqueue_script( 'expensecount-bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '4.0.0', true );
        wp_enqueue_script( 'expensecount-nav', get_template_directory_uri() . '/js/nav.js', array(), '1.0.0', true );

        /*if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
            wp_enqueue_script( 'comment-reply' );
        }*/
    }
    add_action( 'wp_enqueue_scripts', 'expensecount_scripts' );
endif;