jQuery(document).ready(function(){
    new WOW().init();

    jQuery('#reviews_customer').owlCarousel({
        margin:30,
        loop:true,
        slideSpeed : 300,
        paginationSpeed : 400,
        autoplay:true,
        nav:false,
        pagination:true,  dots: true,
        navText: ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"],
        responsive:{
            0:{
                items:1
            },
            480:{
                items:1
            },
            700:{
                items:1
            },
            1000:{
                items:1
            },
            1100:{
                items:1
            }
        }
    });
    jQuery('.same_height_container').each(function(){

        // Cache the highest
        var highestBox = 0;

        // Select and loop the elements you want to equalise
        jQuery('.same_height', this).each(function(){

            // If this box is higher than the cached highest then store it
            if(jQuery(this).height() > highestBox) {
                highestBox = jQuery(this).height();
            }

        });

        // Set the height of all those children to whichever was highest
        jQuery('.same_height',this).height(highestBox);

    });

    jQuery(window).scroll(function() {
        var scroll = jQuery(window).scrollTop();

        //>=, not <=
        if (scroll >= 200) {
            //clearHeader, not clearheader - caps H
            jQuery("header").addClass("darkHeader");
        }
        else
        {
            jQuery("header").removeClass("darkHeader");
        }
    });

});
jQuery(document).ready(function () {
    // jQuery('input[type="file"]').after('<label><strong>Add Files</strong></label>');
    jQuery(".publications div.col-md-4").slice(0, 3).show();
    jQuery(".publications #loadMore").on('click', function (e) {
        e.preventDefault();
        if (jQuery(".publications div.col-md-4:hidden").length != 0) {
            jQuery(".publications div.col-md-4:hidden").slice(0, 3).slideDown();
            jQuery('html,body').animate({
                scrollTop: jQuery(this).offset().top
            }, 1500);

        }
        else {
            jQuery(".publications #loadMore").hide();
            jQuery(".publications .messageAdd").show();
		}

    });
    // var len = jQuery('.publications div.col-md-4').length;
    // var final = len/3;
	// alert(final);
});
jQuery(document).ready(function () {
    jQuery(".news_post div.col-md-4").slice(0, 3).show();
    jQuery(".news_post #loadMore").on('click', function (e) {
        e.preventDefault();
        if (jQuery(".news_post div.col-md-4:hidden").length != 0) {
            jQuery(".news_post div.col-md-4:hidden").slice(0, 3).slideDown();
            jQuery('html,body').animate({
                scrollTop: jQuery(this).offset().top
            }, 1500);
        }
        else {
            jQuery(".news_post #loadMore").hide();
            jQuery(".news_post .messageAdd").show();
        }
    });
    // var len = jQuery('.publications div.col-md-4').length;
    // var final = len/3;
    // alert(final);
});
