jQuery( document ).ready(function() {
//    Each of the columns that are to have equal heights must be given a class of column in the HTML
//    and then we apply the equalHeight function on them like this:

    jQuery('.column').equalHeights();
    
//Styling the button in the sidebar search form
    jQuery('input[type=submit]').addClass( "button" );
    
//    Back to top button
    
    if (jQuery('#back-to-top').length) {
        var scrollTrigger = 100, // px
            backToTop = function () {
                var scrollTop = jQuery(window).scrollTop();
                if (scrollTop > scrollTrigger) {
                    jQuery('#back-to-top').addClass('show');
                } else {
                    jQuery('#back-to-top').removeClass('show');
                }
            };
        backToTop();
        jQuery(window).on('scroll', function () {
            backToTop();
        });
        jQuery('#back-to-top').on('click', function (e) {
            e.preventDefault();
            jQuery('html,body').animate({
                scrollTop: 0
            }, 700);
        });
    }
   
});