$(document).ready(function(){ $(".accordion :header").next().slideToggle(1); // collapses accordion (starts out fully expanded) $(".accordion :header").click(function(){ $(this).next().slideToggle("normal")}); // every header click will toggle child content $(".expand").click(function(){ $(".accordion *").slideDown("normal") }); // show all functionality $(".collapse").click(function(){ $(".accordion :header").next().slideUp("normal") }); // hide all functionality $(".accordion li :header a").parent().parent().css({"background-image":"none"}); // removes dropdown decoration from items that are actual links $(".accordion > li:last > h3").css({"height":"14px"}); // fixes background-color overflow on last main accordion item });