var active_color = '#000'; 
var inactive_color = '#999'; 

 

$(document).ready(function() {


try {
$("div.inputSmall").corner("5px");
$("div.inputLarge").corner("5px");

}
catch (err) {
	
}
						   						   
  DefaultValuesArray = populateDefaultValuesArray();

   $("input.hides").each(function() {
       
       if (this.value == DefaultValuesArray[this.id]) {
           this.style.color = inactive_color;
       }
   })
  
  var default_values = new Array();
  $("input.hides").focus(function() {
    if (!default_values[this.id]) {
      default_values[this.id] = DefaultValuesArray[this.id];
    }
    if (this.value == default_values[this.id]) {
      this.value = '';
      this.style.color = active_color;
    }
    $(this).blur(function() {
      if (this.value == '') {
        this.style.color = inactive_color;
        this.value = default_values[this.id];
      }
    });
  });


$("form input:radio").change(function () {
    $("form input:radio").each(function () {
        if ($(this).attr('checked')===true) {
            $(this).parent().parent().css("background-color","#00ADEC");
        } else {
            $(this).parent().parent().css("background-color","#003FBF");
        }
    })
})

$("form input:radio").each(function () {
    var element=$(this);
    element.parent().parent().click(function (e) {
       element.attr("checked","true");
       element.change();
    })
    if  (element.attr("checked")===true) {
         $(this).parent().parent().css("background-color","#00ADEC");
    }
})

$("#otherAmountId").focus(function (){
    $('#otherRadio').attr("checked","true");
     $('#otherRadio').change();
})

});





