


$(document).ready(function () 
{
	jQuery('a[rel*=facebox]').livequery(function() {
       jQuery(this).facebox();
           return false;
    });
    
    $("#divFormPic").simpletip('Please select a headshot only');     

	$("#chk_agree").click(function () {
		var checked_status = this.checked;
                if (checked_status == true) {
                    $("#Submit2").removeAttr("disabled");
                }
                else {
                    $("#Submit2").attr("disabled", "disabled");
                }
	
	
	});
	
	$("#billing_shipping_same").click(function () {
		var checked_status = this.checked;
		if (checked_status == true) {
			sync_shipping();
		}
	});
	
	$("#picture").change(function () {
		if ($("#picture").val() != "")
		{
			$("#divFormPic").html("<br><br>Picture has been uploaded successfully.<br>You will see a preview of it on the next page when clicking Next.<br>");
			// + $("#picture").val());
		} else {
			$("#divFormPic").html("");
		}
	});
	
	
});

function sync_shipping()
{
	$("#shipping_contact").val($("#billing_contact").val());
	$("#shipping_address").val($("#billing_address").val());
	$("#shipping_city").val($("#billing_city").val());
	$("#shipping_state").val($("#billing_state").val());
	$("#shipping_zip").val($("#billing_zip").val());

}

