$(document).ready(function(){ $("dt").click(function(){ $('dd').slideUp("fast"); $('dt > a').removeClass('open').addClass("closed"); $(this).next("dd").slideDown("fast"); $(this).children("a").removeClass('closed').addClass("open"); }); }); function on() { document.getElementById("overlay").style.display = "block"; } function off() { document.getElementById("overlay").style.display = "block"; } var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : sParameterName[1]; } } var VARIABLE = getUrlParameter('booking'); if (VARIABLE != null) { document.getElementById('subject').value = "Booking Request for " + VARIABLE; } };