function updatePlayers()
{
	var game = jQuery('#gamelist').val();
	var maxplayers = jQuery('#maxplayers').val();
	jQuery.get('jquery/discmin/'+game+'/'+maxplayers, function(html) {
	jQuery('#discountpackage').html(html);
	
	//console.log(html);
	});	
}

function updatePrice()
{
	jQuery.ajax({
	  type: 'POST',
	  url: 'jquery/calculate',
	  data: jQuery('#calculator').serialize(),
	  success: function(data) {
		  	//updatePlayers();
			jQuery('#price').html(data);  
	  }
	});

	//console.log();
}
function add_to_cart()
{
	jQuery.ajax({
	  type: 'POST',
	  url: 'cart/add_to_cart',
	  data: jQuery('#calculator').serialize(),
	  success: function(data) {
			jQuery('#addtocart').html(data);  
	  }
	});

	//console.log();
}
function voiceStatus()
{
	var voiceserver = jQuery('#voiceserver').val();
		if(voiceserver == 'empty')
			{
			 jQuery('#maxusers').hide();
			 updatePrice();	
			} else {
			 jQuery('#maxusers').show();	
			 updatePrice();	
			}
}
