function orderjuwelry(id)
{
	var txt = '<h2>Uw bestelling is geplaatst</h2> <p>Uw bestelling is opgeslagen. In de tussentijd kunt u verder winkelen, of uw bestelling afronden. <br/> Bovenin deze website kunt uw bestelling altijd nog afronden.</p>';

	function mycallbackform(v,m,f){
		
			$.ajax
			({
				url: "8_BUSINESSLOGIC/orderlogic.php?addordertosession="+id,
				success: function(msg)
				{
					if(v==0)
					{	
						$("#shoppingcard").animate({top:0});
						$("#shoppingcard").highlightFade({color:'#DFDFDF',speed:2000, attr: 'borderColor',iterator:'sinusoidal'});
						$('#orderstats').html(msg+' items <span class="smallline"></span> <a href="index.php?page=bestelformulier">bestelling afronden</a>');
						$('.btn'+id).fadeTo('slow',0.3);
						$('.btn'+id).html('Reeds besteld');
						$('.btn'+id).attr('onClick','return false;');
					} else if(v==1) 
					{
						window.location = 'index.php?page=bestelformulier';
					}
				}
			});
			
	}
	
	$.prompt(txt,{
		callback: mycallbackform,
		buttons: { 'Verder winkelen' : 0, 'Bestelling afronden' : 1 }
	});


}


function deleteitem(id)
{
	var txt = '<h2>Artikel verwijderen</h2> <p>Weet u zeker dat u dit artikel wilt verwijderen?</p>';

	function mycallbackform(v,m,f){
		if(v == true)
		{	
			$.ajax
			({
				url: "8_BUSINESSLOGIC/orderlogic.php?removeorderfromsession="+id,
				success: function(msg)
				{
					$('#item'+id).fadeOut(function() {$('#item'+id).remove();});
					$('#pricetotal').html('<p><strong>Totaal:</strong> &euro;'+msg+',- Incl. BTW</p>');
					$("#pricetotal").highlightFade({color:'#DFDFDF',speed:2000, attr: 'backgroundColor',iterator:'sinusoidal'});
				}
			});
		}
	}
	
	$.prompt(txt,{
		callback: mycallbackform,
		buttons: { 'Ja' : true, 'Nee' : false }
	});


}

