$(document).ready(function() {

	

	"use strict";
 /*-------------------------------------
    Navbar Toggle for Mobile
    -------------------------------------*/
    function navbarCollapse() {
        if ($(window).width() < 992) {
            $(document).on('click', function (event) {
                var clickover = $(event.target);
                var _opened = $("#navbar-collapse").hasClass("in");
                if (_opened === true && !(clickover.is('.dropdown'))) {
                    $("button.navbar-toggle").trigger('click');
                }
            });

            $('.dropdown').unbind('click');
            $('.dropdown').on('click', function () {
                $(this).children('.dropdown-menu').slideToggle();
            });

            $('.dropdown *').on('click', function (e) {
                e.stopPropagation();
            });
        }
    }
    navbarCollapse();
////////////////////////	end menu   ///////////////////////

    //Scrool Top

   $('a.smoth-scroll').on("click", function (e) {
            var anchor = $(this);
            $('html, body').stop().animate({
                scrollTop: $(anchor.attr('href')).offset().top - 90
            }, 1000);
            e.preventDefault();
        });

	/////////////////////////////////////////////////////////////////////
	
	/////////////////////////////////
/*--------------------------
12. slick slider active
---------------------------- */

	//Testimonial slider
	 $('.contentst').slick({
	  slidesToShow: 1,
	  slidesToScroll: 1,
	  arrows: false,
	  fade: true,
	  asNavFor: '.thumb_content'
	});
	$('.thumb_content').slick({
	  slidesToShow: 5,
	  slidesToScroll: 1,
	  asNavFor: '.contentst',
	  dots: false,
	  centerMode: true,
	  focusOnSelect: true
	});
	///////////////////////////////////////////////////////
	 /*-------------------------------------
    Sidebar Affix
    -------------------------------------*/
    if ($('#sidebar-affix').length > 0) {
        $('#sidebar-affix').affix({
            offset: {
                top: function () {
                    return (this.top = $('#course-sidebar').offset().top);
                },
                bottom: function () {
                    return (this.bottom = $('body').height() - $('#course-sidebar').offset().top - $('#elh-course-container').outerHeight(true));
                }
            }
        });
    }
	
	
	
	
	

});	



