//##################################################################################

	// Begin OCV's Level 1 Order Buttons

//##################################################################################

// Form 1 
$(document).ready(function() {
	// Listen for Cover Letter Bundle Click
	$('#1 > fieldset > p > input[name=cov-bundle]').click(function() {
			// Unselecting Cover Bundle													   
			if(!$('#1 > fieldset > p > input[name=cov-bundle]').attr("checked")) {
				$('#1 > fieldset > p > input[name=cov-bundle]').removeAttr("checked");
				$('#1 > fieldset > p > input[name=cov-let-1]').removeAttr("checked");
				$('#1 > fieldset > p > input[name=cov-let-2]').removeAttr("checked");
				$('#1 > fieldset > p > input[name=cov-let-3]').removeAttr("checked");
				$('#1 > fieldset > p > input[name=cov-let-1]').removeAttr("disabled", "disabled");
				$('#1 > fieldset > p > input[name=cov-let-2]').removeAttr("disabled", "disabled");
				$('#1 > fieldset > p > input[name=cov-let-3]').removeAttr("disabled", "disabled");
				var price = $('#1 > input[name=final-price]').val();
				price = parseInt(price) - 70;
				$('#1 > #price-display-1').html('&pound;' + price);
				$('#1 > input[name=final-price]').val(price);
			// Selecting Cover Bundle
			} else {
				$('#1 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
				$('#1 > fieldset > p > input[name=cov-let-1]').attr("checked", "checked");
				$('#1 > fieldset > p > input[name=cov-let-2]').attr("checked", "checked");
				$('#1 > fieldset > p > input[name=cov-let-3]').attr("checked", "checked");
				$('#1 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
				$('#1 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
				$('#1 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
				var price = $('#1 > input[name=final-price]').val();
				price = parseInt(price) + 70;
				$('#1 > #price-display-1').html('&pound;' + price);
				$('#1 > input[name=final-price]').val(price);
			}
	});
	// Listen for cover Letter 1 Click
		$('#1 > fieldset > p > input[name=cov-let-1]').click(function() {
				// Unselecting Letter 1													  
				if(!$('#1 > fieldset > p > input[name=cov-let-1]').attr("checked")) {
					$('#1 > fieldset > p > input[name=cov-let-1]').removeAttr("checked");
					var price = $('#1 > input[name=final-price]').val();
					price = parseInt(price) - 25;
					$('#1 > #price-display-1').html('&pound;' + price);
					$('#1 > input[name=final-price]').val(price);
				// Selecting Letter 1
				} else {
					// Check if any of the other Letters are clicked
					if($('#1 > fieldset > p > input[name=cov-let-2]').attr("checked") && $('#1 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#1 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#1 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#1 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#1 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#1 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#1 > #price-display-1').html('&pound;' + price);
							$('#1 > input[name=final-price]').val(price);
					} else {
						$('#1 > fieldset > p > input[name=cov-let-1]').attr("checked", "checked");
						var price = $('#1 > input[name=final-price]').val();
						price = parseInt(price) + 25;
						$('#1 > #price-display-1').html('&pound;' + price);
						$('#1 > input[name=final-price]').val(price);
					}
				}
		});
	// Listen for cover Letter 2 Click
		$('#1 > fieldset > p > input[name=cov-let-2]').click(function() {
				// Unselecting Letter 2												  
				if(!$('#1 > fieldset > p > input[name=cov-let-2]').attr("checked")) {
					$('#1 > fieldset > p > input[name=cov-let-2]').removeAttr("checked");
					var price = $('#1 > input[name=final-price]').val();
					price = parseInt(price) - 25;
					$('#1 > #price-display-1').html('&pound;' + price);
					$('#1 > input[name=final-price]').val(price);
				// Selecting Letter 2
				} else {
					// Check if any of the other Letters are clicked
					if($('#1 > fieldset > p > input[name=cov-let-1]').attr("checked") && $('#1 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#1 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#1 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#1 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#1 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#1 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#1 > #price-display-1').html('&pound;' + price);
							$('#1 > input[name=final-price]').val(price);
					} else {
						$('#1 > fieldset > p > input[name=cov-let-2]').attr("checked", "checked");
						var price = $('#1 > input[name=final-price]').val();
						price = parseInt(price) + 25;
						$('#1 > #price-display-1').html('&pound;' + price);
						$('#1 > input[name=final-price]').val(price);
					}
				}
		});
	// Listen for cover Letter 3 Click
		$('#1 > fieldset > p > input[name=cov-let-3]').click(function() {
				// Unselecting Letter 3													  
				if(!$('#1 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
					$('#1 > fieldset > p > input[name=cov-let-3]').removeAttr("checked");
					var price = $('#1 > input[name=final-price]').val();
					price = parseInt(price) - 25;
					$('#1 > #price-display-1').html('&pound;' + price);
					$('#1 > input[name=final-price]').val(price);
				// Selecting Letter 3
				} else {
					// Check if any of the other Letters are clicked
					if($('#1 > fieldset > p > input[name=cov-let-1]').attr("checked") && $('#1 > fieldset > p > input[name=cov-let-2]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#1 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#1 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#1 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#1 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#1 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#1 > #price-display-1').html('&pound;' + price);
							$('#1 > input[name=final-price]').val(price);
					} else {
						$('#1 > fieldset > p > input[name=cov-let-3]').attr("checked", "checked");
						var price = $('#1 > input[name=final-price]').val();
						price = parseInt(price) + 25;
						$('#1 > #price-display-1').html('&pound;' + price);
						$('#1 > input[name=final-price]').val(price);
					}
				}
		});
	$('#1 > fieldset > p > input[name=linkedin]').click(function() {
			// Unselecting LinkedIn													   
			if(!$('#1 > fieldset > p > input[name=linkedin]').attr("checked")) {
				$('#1 > fieldset > p > input[name=linkedin]').removeAttr("checked");
				var price = $('#1 > input[name=final-price]').val();
				price = parseInt(price) - 50;
				$('#1 > #price-display-1').html('&pound;' + price);
				$('#1 > input[name=final-price]').val(price);
			} else {
				$('#1 > fieldset > p > input[name=linkedin]').attr("checked", "checked");
				var price = $('#1 > input[name=final-price]').val();
				price = parseInt(price) + 50;
				$('#1 > #price-display-1').html('&pound;' + price);
				$('#1 > input[name=final-price]').val(price);
			}
	});
});

// Form 2 
$(document).ready(function() {
	// Listen for Cover Letter Bundle Click
	$('#2 > fieldset > p > input[name=cov-bundle]').click(function() {
			// Unselecting Cover Bundle													   
			if(!$('#2 > fieldset > p > input[name=cov-bundle]').attr("checked")) {
				$('#2 > fieldset > p > input[name=cov-bundle]').removeAttr("checked");
				$('#2 > fieldset > p > input[name=cov-let-1]').removeAttr("checked");
				$('#2 > fieldset > p > input[name=cov-let-2]').removeAttr("checked");
				$('#2 > fieldset > p > input[name=cov-let-3]').removeAttr("checked");
				$('#2 > fieldset > p > input[name=cov-let-1]').removeAttr("disabled", "disabled");
				$('#2 > fieldset > p > input[name=cov-let-2]').removeAttr("disabled", "disabled");
				$('#2 > fieldset > p > input[name=cov-let-3]').removeAttr("disabled", "disabled");
				var price = $('#2 > input[name=final-price]').val();
				price = parseInt(price) - 70;
				$('#2 > #price-display-2').html('&pound;' + price);
				$('#2 > input[name=final-price]').val(price);
			// Selecting Cover Bundle
			} else {
				$('#2 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
				$('#2 > fieldset > p > input[name=cov-let-1]').attr("checked", "checked");
				$('#2 > fieldset > p > input[name=cov-let-2]').attr("checked", "checked");
				$('#2 > fieldset > p > input[name=cov-let-3]').attr("checked", "checked");
				$('#2 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
				$('#2 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
				$('#2 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
				var price = $('#2 > input[name=final-price]').val();
				price = parseInt(price) + 70;
				$('#2 > #price-display-2').html('&pound;' + price);
				$('#2 > input[name=final-price]').val(price);
			}
	});
	// Listen for cover Letter 1 Click
		$('#2 > fieldset > p > input[name=cov-let-1]').click(function() {
				// Unselecting Letter 1													  
				if(!$('#2 > fieldset > p > input[name=cov-let-1]').attr("checked")) {
					$('#2 > fieldset > p > input[name=cov-let-1]').removeAttr("checked");
					var price = $('#2 > input[name=final-price]').val();
					price = parseInt(price) - 25;
					$('#2 > #price-display-2').html('&pound;' + price);
					$('#2 > input[name=final-price]').val(price);
				// Selecting Letter 1
				} else {
					// Check if any of the other Letters are clicked
					if($('#2 > fieldset > p > input[name=cov-let-2]').attr("checked") && $('#2 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#2 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#2 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#2 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#2 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#2 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#2 > #price-display-2').html('&pound;' + price);
							$('#2 > input[name=final-price]').val(price);
					} else {
						$('#2 > fieldset > p > input[name=cov-let-1]').attr("checked", "checked");
						var price = $('#2 > input[name=final-price]').val();
						price = parseInt(price) + 25;
						$('#2 > #price-display-2').html('&pound;' + price);
						$('#2 > input[name=final-price]').val(price);
					}
				}
		});
	// Listen for cover Letter 2 Click
		$('#2 > fieldset > p > input[name=cov-let-2]').click(function() {
				// Unselecting Letter 2												  
				if(!$('#2 > fieldset > p > input[name=cov-let-2]').attr("checked")) {
					$('#2 > fieldset > p > input[name=cov-let-2]').removeAttr("checked");
					var price = $('#2 > input[name=final-price]').val();
					price = parseInt(price) - 25;
					$('#2 > #price-display-2').html('&pound;' + price);
					$('#2 > input[name=final-price]').val(price);
				// Selecting Letter 2
				} else {
					// Check if any of the other Letters are clicked
					if($('#2 > fieldset > p > input[name=cov-let-1]').attr("checked") && $('#2 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#2 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#2 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#2 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#2 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#2 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#2 > #price-display-2').html('&pound;' + price);
							$('#2 > input[name=final-price]').val(price);
					} else {
						$('#2 > fieldset > p > input[name=cov-let-2]').attr("checked", "checked");
						var price = $('#2 > input[name=final-price]').val();
						price = parseInt(price) + 25;
						$('#2 > #price-display-2').html('&pound;' + price);
						$('#2 > input[name=final-price]').val(price);
					}
				}
		});
	// Listen for cover Letter 3 Click
		$('#2 > fieldset > p > input[name=cov-let-3]').click(function() {
				// Unselecting Letter 3													  
				if(!$('#2 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
					$('#2 > fieldset > p > input[name=cov-let-3]').removeAttr("checked");
					var price = $('#2 > input[name=final-price]').val();
					price = parseInt(price) - 25;
					$('#2 > #price-display-2').html('&pound;' + price);
					$('#2 > input[name=final-price]').val(price);
				// Selecting Letter 3
				} else {
					// Check if any of the other Letters are clicked
					if($('#2 > fieldset > p > input[name=cov-let-1]').attr("checked") && $('#2 > fieldset > p > input[name=cov-let-2]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#2 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#2 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#2 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#2 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#2 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#2 > #price-display-2').html('&pound;' + price);
							$('#2 > input[name=final-price]').val(price);
					} else {
						$('#2 > fieldset > p > input[name=cov-let-3]').attr("checked", "checked");
						var price = $('#2 > input[name=final-price]').val();
						price = parseInt(price) + 25;
						$('#2 > #price-display-2').html('&pound;' + price);
						$('#2 > input[name=final-price]').val(price);
					}
				}
		});
	$('#2 > fieldset > p > input[name=linkedin]').click(function() {
			// Unselecting LinkedIn													   
			if(!$('#2 > fieldset > p > input[name=linkedin]').attr("checked")) {
				$('#2 > fieldset > p > input[name=linkedin]').removeAttr("checked");
				var price = $('#2 > input[name=final-price]').val();
				price = parseInt(price) - 50;
				$('#2 > #price-display-2').html('&pound;' + price);
				$('#2 > input[name=final-price]').val(price);
			} else {
				$('#2 > fieldset > p > input[name=linkedin]').attr("checked", "checked");
				var price = $('#2 > input[name=final-price]').val();
				price = parseInt(price) + 50;
				$('#2 > #price-display-2').html('&pound;' + price);
				$('#2 > input[name=final-price]').val(price);
			}
	});
});

// Form 3 
$(document).ready(function() {
	// Listen for Cover Letter Bundle Click
	$('#3 > fieldset > p > input[name=cov-bundle]').click(function() {
			// Unselecting Cover Bundle													   
			if(!$('#3 > fieldset > p > input[name=cov-bundle]').attr("checked")) {
				$('#3 > fieldset > p > input[name=cov-bundle]').removeAttr("checked");
				$('#3 > fieldset > p > input[name=cov-let-1]').removeAttr("checked");
				$('#3 > fieldset > p > input[name=cov-let-2]').removeAttr("checked");
				$('#3 > fieldset > p > input[name=cov-let-3]').removeAttr("checked");
				$('#3 > fieldset > p > input[name=cov-let-1]').removeAttr("disabled", "disabled");
				$('#3 > fieldset > p > input[name=cov-let-2]').removeAttr("disabled", "disabled");
				$('#3 > fieldset > p > input[name=cov-let-3]').removeAttr("disabled", "disabled");
				var price = $('#3 > input[name=final-price]').val();
				price = parseInt(price) - 100;
				$('#3 > #price-display-3').html('&pound;' + price);
				$('#3 > input[name=final-price]').val(price);
			// Selecting Cover Bundle
			} else {
				$('#3 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
				$('#3 > fieldset > p > input[name=cov-let-1]').attr("checked", "checked");
				$('#3 > fieldset > p > input[name=cov-let-2]').attr("checked", "checked");
				$('#3 > fieldset > p > input[name=cov-let-3]').attr("checked", "checked");
				$('#3 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
				$('#3 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
				$('#3 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
				var price = $('#3 > input[name=final-price]').val();
				price = parseInt(price) + 100;
				$('#3 > #price-display-3').html('&pound;' + price);
				$('#3 > input[name=final-price]').val(price);
			}
	});
	// Listen for cover Letter 1 Click
		$('#3 > fieldset > p > input[name=cov-let-1]').click(function() {
				// Unselecting Letter 1													  
				if(!$('#3 > fieldset > p > input[name=cov-let-1]').attr("checked")) {
					$('#3 > fieldset > p > input[name=cov-let-1]').removeAttr("checked");
					var price = $('#3 > input[name=final-price]').val();
					price = parseInt(price) - 40;
					$('#3 > #price-display-3').html('&pound;' + price);
					$('#3 > input[name=final-price]').val(price);
				// Selecting Letter 1
				} else {
					// Check if any of the other Letters are clicked
					if($('#3 > fieldset > p > input[name=cov-let-2]').attr("checked") && $('#3 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#3 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#3 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#3 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#3 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#3 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#3 > #price-display-3').html('&pound;' + price);
							$('#3 > input[name=final-price]').val(price);
					} else {
						$('#3 > fieldset > p > input[name=cov-let-1]').attr("checked", "checked");
						var price = $('#3 > input[name=final-price]').val();
						price = parseInt(price) + 40;
						$('#3 > #price-display-3').html('&pound;' + price);
						$('#3 > input[name=final-price]').val(price);
					}
				}
		});
	// Listen for cover Letter 2 Click
		$('#3 > fieldset > p > input[name=cov-let-2]').click(function() {
				// Unselecting Letter 2												  
				if(!$('#3 > fieldset > p > input[name=cov-let-2]').attr("checked")) {
					$('#3 > fieldset > p > input[name=cov-let-2]').removeAttr("checked");
					var price = $('#3 > input[name=final-price]').val();
					price = parseInt(price) - 40;
					$('#3 > #price-display-3').html('&pound;' + price);
					$('#3 > input[name=final-price]').val(price);
				// Selecting Letter 2
				} else {
					// Check if any of the other Letters are clicked
					if($('#3 > fieldset > p > input[name=cov-let-1]').attr("checked") && $('#3 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#3 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#3 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#3 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#3 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#3 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#3 > #price-display-3').html('&pound;' + price);
							$('#3 > input[name=final-price]').val(price);
					} else {
						$('#3 > fieldset > p > input[name=cov-let-2]').attr("checked", "checked");
						var price = $('#3 > input[name=final-price]').val();
						price = parseInt(price) + 40;
						$('#3 > #price-display-3').html('&pound;' + price);
						$('#3 > input[name=final-price]').val(price);
					}
				}
		});
	// Listen for cover Letter 3 Click
		$('#3 > fieldset > p > input[name=cov-let-3]').click(function() {
				// Unselecting Letter 3													  
				if(!$('#3 > fieldset > p > input[name=cov-let-3]').attr("checked")) {
					$('#3 > fieldset > p > input[name=cov-let-3]').removeAttr("checked");
					var price = $('#3 > input[name=final-price]').val();
					price = parseInt(price) - 40;
					$('#3 > #price-display-3').html('&pound;' + price);
					$('#3 > input[name=final-price]').val(price);
				// Selecting Letter 3
				} else {
					// Check if any of the other Letters are clicked
					if($('#3 > fieldset > p > input[name=cov-let-1]').attr("checked") && $('#3 > fieldset > p > input[name=cov-let-2]').attr("checked")) {
							// All Selected Fix Price and Select Bundle.
							$('#3 > fieldset > p > input[name=cov-bundle]').attr("checked", "checked");
							$('#3 > fieldset > p > input[name=cov-let-1]').attr("disabled", "disabled");
							$('#3 > fieldset > p > input[name=cov-let-2]').attr("disabled", "disabled");
							$('#3 > fieldset > p > input[name=cov-let-3]').attr("disabled", "disabled");
							var price = $('#3 > input[name=final-price]').val();
							price = parseInt(price) + 20;
							$('#3 > #price-display-3').html('&pound;' + price);
							$('#3 > input[name=final-price]').val(price);
					} else {
						$('#3 > fieldset > p > input[name=cov-let-3]').attr("checked", "checked");
						var price = $('#3 > input[name=final-price]').val();
						price = parseInt(price) + 40;
						$('#3 > #price-display-3').html('&pound;' + price);
						$('#3 > input[name=final-price]').val(price);
					}
				}
		});
});

