	$(function(){
					$('.textfield').focus(function(){$('.error').fadeOut();
			}
			);	
			
			$('#exchange_calculate').click(
					function(){
					$('.error').fadeOut();
						if($('#exchange_currency_amount').val()==""){
									$('#exchange_currency_amount_error').fadeIn();
									return false;
							}
						
						
						if(
							$('#exchange_currency_select').val()=="liberty_reserve" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Liberty Reserve with Liberty Reserve</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;
								}
								
						if(
							$('#exchange_currency_select').val()=="alertpay" && $('#exchange_payment_method_select').val()=="alertpay"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Alertpay with Alertpay</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;
								}
								
						if(
							$('#exchange_currency_select').val()=="paypal" && $('#exchange_payment_method_select').val()=="paypal"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Paypal with Paypal</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;
								}	
						//alertpay to LR		
						if(
							$('#exchange_currency_select').val()=="liberty_reserve" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_lr_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_lr_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
							//paypal to LR
						if(
							$('#exchange_currency_select').val()=="liberty_reserve" && $('#exchange_payment_method_select').val()=="paypal"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#paypal_to_lr_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#paypal_to_lr_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
								
							//LR to alertpay
						if(
							$('#exchange_currency_select').val()=="alertpay" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_alertpay_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_alertpay_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								amount_due = commission + exchange_currency_amount;
								
															
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								
								return false;
								
								}																																				
							
							
							//paypal to alertpay
						if(
							$('#exchange_currency_select').val()=="alertpay" && $('#exchange_payment_method_select').val()=="paypal"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#paypal_to_alertpay_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#paypal_to_alertpay_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
						//lr to moneybookers
						if(
							$('#exchange_currency_select').val()=="moneybookers" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_moneybookers_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_moneybookers_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}		

								
						//lr to CASHU
						if(
							$('#exchange_currency_select').val()=="cashu" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_cashu_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_cashu_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}									
								
							
						//alertpay to moneybookers
						if(
							$('#exchange_currency_select').val()=="moneybookers" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_moneybookers_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_moneybookers_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}								
							
							
						//paypal to moneybookers
						if(
							$('#exchange_currency_select').val()=="moneybookers" && $('#exchange_payment_method_select').val()=="paypal"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#paypal_to_moneybookers_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#paypal_to_moneybookers_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}								
										
										
						//lr to perfectmoney
						if(
							$('#exchange_currency_select').val()=="perfect_money" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_perfectmoney_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_perfectmoney_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
						//alertpay to perfectmoney
						if(
							$('#exchange_currency_select').val()=="perfect_money" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_perfectmoney_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_perfectmoney_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
						//alertpay to cashu
						if(
							$('#exchange_currency_select').val()=="cashu" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_cashu_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_cashu_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}									
								
						//paypal to perfectmoney, NOT POSSIBLE
						if(
							$('#exchange_currency_select').val()=="perfect_money" && $('#exchange_payment_method_select').val()=="paypal"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Paypal with Perfectmoney</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;

								}		
								
						//naira to perfectmoney, NOT POSSIBLE
						if(
							$('#exchange_currency_select').val()=="perfect_money" && $('#exchange_payment_method_select').val()=="naira"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Naira with Perfectmoney</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;

								}								
								
								
						//lr to paypal
						if(
							$('#exchange_currency_select').val()=="paypal" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_paypal_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_paypal_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}		
								
						//alertpay to paypal
						if(
							$('#exchange_currency_select').val()=="paypal" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_paypal_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_paypal_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}																																
											
											
					//lr to procurrex
						if(
							$('#exchange_currency_select').val()=="procurrex" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_procurrex_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_procurrex_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}																								
							
							
							//alertpay to procurrex
						if(
							$('#exchange_currency_select').val()=="procurrex" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_procurrex_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_procurrex_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}									
							
							//paypal to procurrex
						if(
							$('#exchange_currency_select').val()=="procurrex" && $('#exchange_payment_method_select').val()=="paypal"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#paypal_to_procurrex_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#paypal_to_procurrex_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
							
					//lr to webmoney
						if(
							$('#exchange_currency_select').val()=="webmoney" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_webmoney_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_webmoney_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}		
								
								
					//alertpay to webmoney
						if(
							$('#exchange_currency_select').val()=="webmoney" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_webmoney_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_webmoney_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
					//paypal to webmoney
						if(
							$('#exchange_currency_select').val()=="webmoney" && $('#exchange_payment_method_select').val()=="paypal"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#paypal_to_webmoney_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#paypal_to_webmoney_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
					//liberty reserve to pecunix
						if(
							$('#exchange_currency_select').val()=="pecunix" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_pecunix_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_pecunix_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
								//alertpay tp pecunix, not possible
						if(
							$('#exchange_currency_select').val()=="pecunix" && $('#exchange_payment_method_select').val()=="alertpay"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Alertpay with Pecunix</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;
								}	
								
									
								//paypal nko, not possible
						if(
							$('#exchange_currency_select').val()=="pecunix" && $('#exchange_payment_method_select').val()=="paypal"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Paypal with Pecunix</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;
								}							
								
								//naira with pecunix, naaa
						if(
							$('#exchange_currency_select').val()=="pecunix" && $('#exchange_payment_method_select').val()=="naira"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Naira with Pecunix</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;
								}																								
																														
								//liberty reserve to ecu
						if(
							$('#exchange_currency_select').val()=="ecu" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_ecu_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_ecu_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
							
						//alertpay to ecu
						if(
							$('#exchange_currency_select').val()=="ecu" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_ecu_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_ecu_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}		
								
								
								//paypal with ecu, naaa
						if(
							$('#exchange_currency_select').val()=="ecu" && $('#exchange_payment_method_select').val()=="paypal"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Paypal with ECU</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;
								}		
								
								//naira with ecu, naaa
						if(
							$('#exchange_currency_select').val()=="ecu" && $('#exchange_payment_method_select').val()=="naira"){
								$('#exchange_amount_due').html('<p style="color:#900;">You cannot exchange Naira with ECU</p>').fadeIn();
								$('#exchange_amount_due_label').hide();
								return false;
								}																					
							
						//lr to wu
						if(
							$('#exchange_currency_select').val()=="wu" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_westernunion_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_westernunion_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}
								
								//alertpay to wu
						if(
							$('#exchange_currency_select').val()=="wu" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_westernunion_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_westernunion_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}																	
							
								//paypal to wu
						if(
							$('#exchange_currency_select').val()=="wu" && $('#exchange_payment_method_select').val()=="paypal"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#paypal_to_westernunion_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#paypal_to_westernunion_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}	
								
								
								//paypal to cashu
						if(
							$('#exchange_currency_select').val()=="cashu" && $('#exchange_payment_method_select').val()=="paypal"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#paypal_to_cashu_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#paypal_to_cashu_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}									
								
								
								
														//lr to cashu
						if(
							$('#exchange_currency_select').val()=="cashu" && $('#exchange_payment_method_select').val()=="liberty_reserve"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#lr_to_cashu_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#lr_to_cashu_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}
								
								//alertpay to cashu
						if(
							$('#exchange_currency_select').val()=="cashu" && $('#exchange_payment_method_select').val()=="alertpay"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#alertpay_to_cashu_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#alertpay_to_cashu_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}																	
							
								//paypal to cashu
						if(
							$('#exchange_currency_select').val()=="cashu" && $('#exchange_payment_method_select').val()=="paypal"){
								//get the  amount the dude inputs
								var exchange_currency_amount = parseInt($('#exchange_currency_amount').val()); 
								//get the fixed percentage
								var percentage = parseInt($('#paypal_to_cashu_percentage').val()) / 100;
								//apply percentage to amount
								var percentage_of_amount = percentage * exchange_currency_amount;
								// get the fixed minimum thingy from the php file passed into theindex page
								var minimum = parseInt($('#paypal_to_cashu_minimum').val());
								
								//now which is greater? percentage or minimum charge
								//set the greater one as commision
								if(percentage_of_amount >= minimum){
										var commission = percentage_of_amount;
									
									}
								if(percentage_of_amount <= minimum){
										var commission = minimum;
									
									}
									
								var amount_due = commission + exchange_currency_amount;
								
								
								
								
								
								$('#exchange_amount_due').html(amount_due).fadeIn();
								$('#exchange_amount_due_label').html('Amount Due (USD)').fadeIn();
								return false;
								}			
								
					//return amount_due;	
					}
						
				);//end of math
	//validation			
				$('#exchange_submit').click(
					function(){
						if($('#exchange_currency_amount').val()==""){
							$('#exchange_currency_amount_error').fadeIn();
							return false;
						}
						
						if($('#account_id').val()==""){
							$('#account_id_error').fadeIn();
							return false;
						}
						
						if($('#confirm_account_id').val()==""){
							$('#confirm_account_id_error').fadeIn();
							return false;
						}	

						if($('#fullname').val()==""){
							$('#fullname_error').fadeIn();
							return false;
						}

						if($('#email').val()==""){
							$('#email_error').fadeIn();
							return false;
						}		
						if($('#confirm_email').val()==""){
							$('#confirm_email_error').fadeIn();
							return false;
						}							
						if($('#phone').val()==""){
							$('#phone_error').fadeIn();
							return false;
						}	
							var account_id = $('#account_id').val();
							var confirm_account_id= $('#confirm_account_id').val();
						
						if( account_id !== confirm_account_id ){
							$('#confirm_account_id_error').html('<p class="error">Account ID mismatch</p>').fadeIn();
							return false;
						}						
						
							var email = $('#email').val();
							var confirm_email= $('#confirm_email').val();
						
						if( email !== confirm_email ){
							$('#confirm_email_error').html('<p class="error">Email mismatch!</p>').fadeIn();
							return false;
						}								
					}
				);
				

				
	});		
