/*
<input id="cf3_field_11" class="cf-box-a" type="checkbox" name="cf3_field_11"/>
<fieldset class="cf-fs3">
*/

/*
jQuery(function( $ ){
	// code here
});
*/

$(document).ready(function() {
	// Heavily transforms registration form
	$("input.custom_field[name='explanation_of_terms']").after('<p><a target="_blank" href="/wp-content/uploads/file/Definitions.pdf">Click here for an explanation of terms used in the following fields.</a></p>');
	// Not really necessary, but we do anyways to keep it sane
	var license_text = $("#registerform-tml-main #license").html();
	// Inserts link to doc. Note: element has no identifier, so we must match by index - Grr!
	$("#registerform-tml-main label:eq(17)").html('<input name="license" value="1" type="checkbox" tabindex="50" /> I agree to Nautical Capital terms and conditions of use</label></p><span id="license">'+ license_text +'</span>');
	// Replace terms text using Boxy
	//$("#reg_passmail-tml-main").before('<p><a href="\#license" onclick="showTerms(); return false;" >View the Nautical Capital terms and conditions and use</a></p>');
	// Replaces terms text with link to doc
	$("#reg_passmail-tml-main").before('<p><a target="_blank" href="/wp-content/uploads/file/Terms-of-Use.pdf">View the Nautical Capital terms and conditions of use</a></p>');
	$("#license").css("display", "none");
});
