$(document).ready(function(){ $("ul.subnav").parent().append(""); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav $("ul.topnav li span") .mouseover(function() { //When trigger is clicked... //Following events are applied to the subnav itself (moving subnav up and down) $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click $(this).parent().hover(function() { }, function(){ $(this).parent().find("ul.subnav").slideUp('medium'); //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" }); //Hide (Collapse) the toggle containers on load $(".toggle_container").hide(); //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state) $("h5.trigger").click(function(){ $(this).toggleClass("active").next().slideToggle("slow"); return false; //Prevent the browser jump to the link anchor }); }); $(document).ready(function() { // hides the slickbox as soon as the DOM is ready // (a little sooner than page load) $('#slickbox').hide(); // shows the slickbox on clicking the noted link $('a#slick-show').click(function() { $('#slickbox').show('slow'); return false; }); // hides the slickbox on clicking the noted link $('a#slick-hide').click(function() { $('#slickbox').hide('fast'); return false; }); // toggles the slickbox on clicking the noted link $('a#slick-toggle').click(function() { $('#slickbox').toggle(400); return false; }); });