<?php 
	global $website_options;
	global $jcart;
	include('views/_header.tpl.php'); 
	$isCheckout = false;
?>

 <!-- CART /  CHECKOUT INCLUDES -->
<link rel="stylesheet" type="text/css" media="screen, projection" href="3rdparty/jcart-1.3/jcart/css/jcart.css" /><!-- ?v=60 -->
<script type="text/javascript" src="3rdparty/jcart-1.3/jcart/js/jcart.js"> </script>
<!-- CART /  CHECKOUT INCLUDES END -->	

<script type="text/javascript">
$(document).ready(function() {
//	$({ Counter: 0 }).animate({
//		Counter: $('.mybalance').val()
//	}, {
//		duration: 1000,
//		easing: 'swing',
//		step: function() {
//			$('.animatedbalance').text(Math.ceil(this.Counter).toLocaleString('en'));
//		}
//	});
	var totalLoaded = $('.mybalance').val();
	$({ Counter: 0 }).animate({
		Counter: totalLoaded
	}, {
		duration: 1000,
		easing: 'swing',
		step: function() {
			//$('.animatedcoins').text(Math.ceil(this.Counter).toFixed(2).toLocaleString('en'));
			$('.animatedbalance').text(Math.ceil(this.Counter*100)/100).toLocaleString('en');
		},
		complete : function() {
			$('.animatedbalance').text(parseFloat(totalLoaded, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString());
		}
	});	
	
	var totalTickets = $('.myloyaltytix').val();
	$({ Counter: 0 }).animate({
		Counter: totalTickets
	}, {
		duration: 1000,
		easing: 'swing',
		step: function() {
			//$('.animatedcoins').text(Math.ceil(this.Counter).toFixed(2).toLocaleString('en'));
			//$('.animatedloyaltytix').text(Math.ceil(this.Counter*100)/100).toLocaleString('en');
			$('.animatedloyaltytix').text(Math.ceil(this.Counter).toLocaleString('en'));
		},
		complete : function() {
			$('.animatedloyaltytix').text(Math.ceil(this.Counter).toLocaleString('en'));
			//$('.animatedloyaltytix').text(parseFloat(totalTickets, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString());
		}
	});	

//	$('#add-to-cart').submit(function() {
//		//alert('Yes');
//		$.ajax({
//			type: 'POST',
//			url: $(this).attr('action'),
//			dataType: 'json',
//			success: function(json) {
//				alert('Redirect');
//				window.location.href = "https://joincrossfireiq.com/checkout";
//			}
//		})
//		return false;
//	});
});	
</script>

<!-- MAY WANT TO REMOVE THE OVERFLOW HIDDEN STYLES, SO THE PAGE IS SCROLLABLE -->
<style type="text/css">
	html {
		/*overflow: hidden !important;*/
	}
	body {
		background: url('/static/images/pagebgnoise.jpg') no-repeat;
		background-size:cover; background-position:center center;
		height: 100%;
		/*overflow: hidden;*/
	}
	a:hover { color:#fff; }
	.btn-o, .btn-oo a {
		color: #FFF;
		text-transform: uppercase;
		font-weight: 700;
		background: #0297CF;
		color: #fff;
		border: 1px solid #0088bb;
		padding: 15px 10px;
		width: 150px;
		display: inline-block;
		font-family: 'Open Sans', Montserrat,Arial,sans-serif;
		font-size: 14px;
		-webkit-border-radius: 3px;
		-moz-border-radius: 3px;
		border-radius: 3px;
	}
	
	.btn-o:hover {
		background: #00a5e4;
	}
	
	input[type="text"], input[type="number"] {
		height: 30px;
		background: #eee;
		color: #000;
		font-weight: 700;
		text-shadow:0px 1px 0px #fff;
		font-size: 15px;
		-webkit-appearance: textfield;
		-webkit-border-radius: 3px;
		-moz-border-radius: 3px;
		border-radius: 3px;
		border: 0px !important;
		padding: 10px;
	}
	.links a { color:#87f0ff; }
	.links a:hover { color:#fff; }
	.half { float:left; width:50%; display:inline-block; overflow:hidden; }
	.logintext { margin-bottom:7px; }
	
	/* ################################### */
	/*            MOBILE STYLES            */
	/* ################################### */
	
	/* Portrait tablet to landscape and desktop */
	@media (min-width: 980px) and (max-width: 1024px) {
		.logintext {
			margin-bottom: 7px;
		}
	}
	
	/* Portrait tablet to landscape and desktop */
	@media (min-width: 768px) and (max-width: 979px) {

	}

	/* Landscape phone to portrait tablet */
	@media (max-width: 767px) {
		.logintext {
			margin-bottom: 7px;
		}
	}

	/* Landscape phones and down */
	@media (max-width: 586px) {
		.spacer { padding-top:56px !important; }
		.logintext {
			margin-bottom: 7px;
		}
		.half { float:none; width:100%; display:block; overflow:hidden; padding-bottom:35px; }
	}

	/* Landscape phones and down */
	@media (max-width: 480px) {
		.logintext {
			margin-bottom: 7px;
		}
	}

	/* Older phones with super small screens */
	@media (max-width: 320px) {
		.logintext {
			margin-bottom: 7px;
		}
	}
</style>

<div class="mobileheaderfiller" style="display:none; position:absolute; height:40px; background:#000; width:100%;">
	&nbsp;
</div>
<div class="home-feature-category" style="border:none; color:#000; background:none;
font-family:Montserrat,'Open Sans',Raleway,Helvetica,Verdana,sans-serif;">
	<div class="container_12 clearfix">
		<div class="grid_12 marked-category">
		
			<div id="loader-container">
				<div id="loader"></div>
			</div>  
			
			<!--<div style="position:absolute; left:10px; top:100px; background:none;
				float:left; height:40px; width:40px; line-height:40px; color:#fff; font-size:24px; text-align:center;">
				<a href="/balances" style="color:#aaa; display:block;">
					<i class="fa fa-angle-left" aria-hidden="true"></i></a>
			</div>-->
			
			<h1 style="font-size:38px; line-height:45px; margin-top:20px; /*background:rgba(0,0,0,.3);*/
			border:0px solid rgba(255,255,255,.2); color:#fff;
			padding:10px 0; max-width:90%; margin:0 auto; text-align:center;">
				Hmmmmmm
			</h1>
			<br />
			
			<div class="links" 
			style="font-size:20px; line-height:30px; margin-top:10px; /*background:rgba(0,0,0,.3);*/
			border:0px solid rgba(255,255,255,.2); color:#fff;
			padding:10px 0; max-width:90%; margin:0 auto; text-align:center;">
				Sorry, we can&rsquo;t seem to find that, so it may not exist in our system any more. 
				<br /><br />
				<a href="/membership" title="Member Area">Member Account Area</a> &bull; 
				<a href="/profile/edit" title="Edit My Account">Edit My Account</a> &bull;  
				<a href="/series/addnew" title="Create Trivia Set">Create Trivia Set</a>
				<br /><br />	
			</div>
			<div class="clear"></div>
			
			<br /><br />
			<center><a href="javascript:top.frames.location.reload();"
					class="refresh" style="color:#000; font-weight:800; font-size:17px;">
					<i class="fa fa-refresh"></i></a></center>
			
			<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
			
			<!--<center><a href="/payment-successful" style="color:#fff;">Success page</a></center>
			<br /><br />-->
			<!--<h1 style="text-shadow:0px 1px 1px rgba(0,0,0,.7);">PAGE TITLE</h1>-->

		</div><!-- GRID 12 DIV ENDS HERE -->
	</div><!-- CONTAINER 12 DIV END HERE -->
</div><!-- HOME FEATURE CATEGORY DIV ENDS HERE -->

<script type="text/javascript">
	$(document).ready(function() {

		$('.amount').keyup(function () {
			this.value = this.value.replace(/[^0-9\.]/g,'');
		});
		
		$('.amounttix').keyup(function () {
			this.value = this.value.replace(/[^0-9\.]/g,'');
			
			var load_amount =  $(".amounttix").val();
			//alert('Load Amount : ' + load_amount);

			if (load_amount >= 1) {
				var ticketsAmt = load_amount * 100;
				var tixFormatted = parseInt(ticketsAmt).toLocaleString("en");
				//alert('It should update');
				$(".LoyaltyTix").val(tixFormatted + ' FlipMob Loyalty Tickets');
				$(".howmanytix").html('<b>' + tixFormatted + '</b>');
			}	
		});

		$("#checkoutandpay").click(function(e) {
			
//			alert('Clicked');
//			e.preventDefault();
//			return false;
		
			var load_amount =  $(".amount").val();
			//alert('Tokens: ' + token_amount);
			
			//if (token_amount < 10) {
			//	e.preventDefault();
			//	alert('The minium load amount is $10.');
			//	return false;
			//}
			if (load_amount > 100) {
				e.preventDefault();
				alert('The maximum load amount is $100.');
				return false;
			}			

			if (! $(".amount").val().length) {
				e.preventDefault();
				alert('You must enter an amount first...');
				return false;
			}

			//alert('Tokens: ' + token_amount);

			//return true;
		});

		$("#checkoutandpay2").click(function(e) {
		
			var load_amount =  $(".amounttix").val();
			var checkTixAmt = $(".LoyaltyTix").val();

			if (load_amount > 100) {
				e.preventDefault();
				alert('The maximum load amount is $100 or 10,000 Tickets.');
				return false;
			}		

			if (! $(".amounttix").val().length) {
				e.preventDefault();
				alert('You must enter an amount of Tickets first...');
				return false;
			}
			
			if (load_amount >= 100 && !checkTixAmt) {
				//alert('There is no LT Amt');
				var ticketsAmt = load_amount * 100;
				var tixFormatted = parseInt(ticketsAmt).toLocaleString("en");
				//alert('It should update');
				$(".LoyaltyTix").val(tixFormatted + ' FlipMob Loyalty Tickets');
				$(".howmanytix").html('<b>' + tixFormatted + '</b>');
			}	
			//alert('Tokens: ' + token_amount);
			//return true;
		});			

	});
</script>

<?php include('views/_footer.tpl.php'); ?>