/**
 * @deprecated
 */
function shop_bepaal_prijs(select, prijs, id, taal, munt, sess)
{
	var idx = select.selectedIndex;
	makeHttpRequest_x_ajax('prijs.php?id='+id+'&taal='+taal+'&aantal='+idx+'&prijs='+prijs+'&munt='+munt+sess,null,false,true);
}

var $j=jQuery.noConflict();

$j(document).ready(ap_shop_init);

function ap_shop_init()
{
	$j('#shop_bestelling_afhalen').click(ap_shop_bestelling_afhalen);
	
	ap_shop_valideerknop();
	
	ap_shop_afwijkend_facturatieadres();
	$j('#shop_afwijkend_facturatieadres').click(ap_shop_afwijkend_facturatieadres);
}

function ap_shop_bestelling_afhalen()
{
	if($j(this).attr('checked'))
	{
		// verzendkosten op 0
		$j('.shop_product_verzendkost').hide();
		$j('.shop_product_totaal').hide();
		$j('th.shop_product_subtotaal').text('Totaal');
	}
	else
	{
		// verzendkosten krijgen juiste waarde
		$j('.shop_product_verzendkost').show();
		$j('.shop_product_totaal').show();
		$j('th.shop_product_subtotaal').text('Subtotaal');
	}
}

function ap_shop_valideerknop()
{
	$j('.shop_screen').not('#shop_cart_overview').find('.shop_action_refresh').hide('fast');
}
	
function ap_shop_afwijkend_facturatieadres()
{
	if($j('#shop_afwijkend_facturatieadres').attr('checked'))
	{
		// form open
		$j('#shop_afwijkend_facturatieadres_form').show();
	}
	else
	{
		// form sluiten
		$j('#shop_afwijkend_facturatieadres_form').hide();
	}
}
