(function ($) { "use strict"; jQuery(document).ready(function($){ // slick slide activation $(".homepage-slides").slick({ slidesToShow: 1, infinite: true, dots: false, fade: true, autoplay: true, arrows:true, prevArrow: '', nextArrow: '', }); //Check to see if the window is top if not then display button $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }); //Click event to scroll to top $('.scrollToTop').click(function(){ $('html, body').animate({scrollTop : 0},800); return false; }); // nav menu activation $('ul#menu').slicknav({ prependTo:'#responsive_nav' }); // $("li.menu-item-has-children").prepend(''); /*==== Window Load Function =====*/ /*==== preloader js =====*/ $('#preloader').delay(500).fadeOut('slow', function() { $(this).remove(); }); // dropped ie6 support $(document).ready(function() { $(".nav").accessibleDropDown(); }); $.fn.accessibleDropDown = function () { var el = $(this); /* Make dropdown menus keyboard accessible */ $("a", el).focus(function() { $(this).parents("li").addClass("hover"); }).blur(function() { $(this).parents("li").removeClass("hover"); }); } }); }(jQuery));