$ = jQuery;

window.FontAwesomeConfig = {
    searchPseudoElements: true
}

$(document).ready(function () {
    $('header nav').meanmenu({
    	meanMenuContainer: '.nav-bar-holder',
		meanScreenWidth:'1050',
	});
});

$('#spcl-news').owlCarousel({
	dots: false,
	animateOut: 'slideOutUp',
	animateIn: 'slideInUp',
	autoplay: true,
	autoplayTimeout:5000,
	responsive: {
		0: {
			items: 1,
			loop: true,
			nav: false,
		},
		600: {
			items: 1,
			loop: true,
			nav: false,
		},
		1000: {
			items: 1,
			loop: true,
			nav: false,
		}
	}
});

$('#news-banner').owlCarousel({
	loop: true,
	nav: true,
	dots: false,
	animateOut: 'fadeOut',
	animateIn: 'fadeIn',
	autoplay: true,
	autoPlaySpeed: omag_script_vars.autoPlaySpeed,
    autoplayTimeout: omag_script_vars.autoplayTimeout,
	responsive: {
		0: {
			items: 1
		},
		600: {
			items: 1
		},
		1000: {
			items: 1
		}
	}
});

$(document).ready(function() {

	$('#news-banner .owl-nav .owl-prev').html("<i class=" + "fa-angle-left" + "></>");

	$('#news-banner .owl-nav .owl-prev i').addClass("fas");

	$('#news-banner .owl-nav .owl-next').html("<i class=" + "fa-angle-right" + "></>");

	$('#news-banner .owl-nav .owl-next i').addClass("fas");

});


$(document).ready(function() {

    $(window).scroll(function() {
        if ($(this).scrollTop() > 200) {
            $('.scrolltop').fadeIn();
        } else {
            $('.scrolltop').fadeOut();
        }
    });

    $('.scrolltop').click(function() {
        $('html, body').animate({scrollTop: 0}, 800);
        return false;
    });
});
