function getOptions(idVal){
	jQuery('#product-options').html('');
	jQuery.ajax({
		type: "POST",
		url: DB_BaseURL + "directbuy/product/view/id/" + idVal,
		data: jQuery('form#directbuy').serialize(),
		success: function(json){
			jQuery(document).ready(function(){
				jQuery('#directbuy-options').html(json);
				jQuery('#directbuy-options select').each(function(){
					jafafa(jQuery(this).attr('id'));
				});
			});
		}
	});
}

function selectProduct(){
	jQuery('#directbuy-options').html('');
	var idVal = jQuery('#prod option:selected').attr('value');
	if(idVal != ''){
		getOptions(idVal);
	}
}
