$(document).ready(function() {

   var col1 = $("#column1").outerHeight();
   var col2 = $("#column2").outerHeight();

   if (col1 > col2) {
       $("#column2").css("height",col1+"px");
   } else {
       $("#column1").css("height",col2+"px");
   }

   $("#chkLoft,#chkSolar,#chkCavity").bind("click", function() {
      var id = $(this).attr("id");

      if ($(this).hasClass("on")) {
          $(this).removeClass("on").addClass("off");
          $("#"+id+"box").attr("checked",false);
      } else {
          $(this).removeClass("off").addClass("on");
          $("#"+id+"box").attr("checked",true);
      }

      return false;
   });

   // setup default values for the survey form
   $("#survey_name").DefaultValue("Your Name *");
   $("#survey_address").DefaultValue("Your Address *");
   $("#survey_postcode").DefaultValue("Postcode *");
   $("#survey_telephone").DefaultValue("Telephone *");
   $("#survey_email").DefaultValue("Your Email");

});

function equalHeights() {
   var col1 = $("#column1").outerHeight();
   var col2 = $("#column2").outerHeight();

   if (col1 > col2) {
       $("#column2").css("height",col1+"px");
   } else {
       $("#column1").css("height",col2+"px");
   }
}
