// 608) { $("ul.subnav").parent().append(" "); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*) $("ul.topnav li a").hover(function() { //When trigger is clicked... //Following events are applied to the subnav itself (moving subnav up and down) $(this).parent().find("ul.subnav").show(); //Drop down the subnav on click $(this).parent().hover(function() { }, function(){ $(this).parent().find("ul.subnav").hide(); //When the mouse hovers out of the subnav, move it back up }); //Following events are applied to the trigger (Hover events for the trigger) }).hover(function() { $(this).addClass("subhover"); //On hover over, add class "subhover" }, function(){ //On Hover Out $(this).removeClass("subhover"); //On hover out, remove class "subhover" }); // Start of Mobile Menu Script } else{ // hides subnav when pressing close button $(".sub-nav-heading, #mobile-menu-cross, #mobile-right-transparent").click(function() { $("ul.subnav").hide(); $(".sub-nav-div").hide(); }); // disable top level menu clicks on mobile // enable on sub-sections $("ul.topnav li a:gt(0)").click(function(e) { $(this).parent().find("ul.subnav").show(); $(this).parent().find(".sub-nav-div").show(); $(this).addClass("subhover"); //return false; e.preventDefault(); $("ul.subnav li a").unbind("click"); }); $('.back').click(function(e){ // console.log ("back button click"); $('.sub-nav-div').hide(); }); }; }); //]]> -->
$(document).ready(function(){ //Adds class to sliders once loaded, to avoid messy carousel appearing before slides are ready $('.slick-nav').on('init', function(event, slick){ $(this).addClass("initialised"); }); //Bottom Carousel $('.slick-bottom-carousel').slick({ speed: 300, slidesToShow: 1, SlidesToScroll: 1, adaptiveHeight: true, autoPlay: true, lazyLoad: 'progressive', dots: true }); //remove active class from all thumbnail slides $('.slick-nav .slick-slide').removeClass('slick-active'); //set active class to first thumbnail slides $('.slick-nav .slick-slide').eq(0).addClass('slick-active'); }); -->