function AddArtikel(artikel){
	jQuery.ajax({		
		type: "POST",
		url: "system/ajaxcontroller/ajax_request.php",
		data: "ajax=1&controller=add_artikel&module=basket&id=" + artikel,
		success: function(result){
			jQuery('#basket_navigation_box').html(result);
			
			jQuery("#kamera_picto").animate({
				marginTop: "20px",
			 }, 500, function(){
				jQuery("#kamera_picto").css('margin-top','-35px');
			});
		}
	});	
}

function AddArtikelSonderpreis(artikel,sonderpreis){
	jQuery.ajax({		
		type: "POST",
		url: "system/ajaxcontroller/ajax_request.php",
		data: "ajax=1&controller=add_artikel&module=basket&id=" + artikel + "&sonderpreis=" + sonderpreis,
		success: function(result){
			jQuery('#basket_navigation_box').html(result);
			
			jQuery("#kamera_picto").animate({
				marginTop: "20px",
			 }, 500, function(){
				jQuery("#kamera_picto").css('margin-top','-35px');
			});
		}
	});	
}

function RemoveArtikel(artikel){
	jQuery.ajax({		
		type: "POST",
		url: "system/ajaxcontroller/ajax_request.php",
		data: "ajax=1&controller=remove_artikel&module=basket&id=" + artikel,
		success: function(result){
			jQuery('#basket_navigation_box').html(result);
			jQuery('#warenkorb_artikel_' + artikel).fadeOut();
			jQuery('#warenkorb_artikel_' + artikel).html('');
			jQuery("#kamera_picto").css('margin-top','20px');
			
			jQuery("#kamera_picto").animate({
				marginTop: "-35px",
			 }, 500, function(){
			});
			
			jQuery.ajax({		
				type: "POST",
				url: "system/ajaxcontroller/ajax_request.php",
				data: "ajax=1&controller=refresh_basket_content&module=basket",
				success: function(result){
					jQuery('#warenkorb_inhalt_wrapper').html(result);
				}
			});
		}
	});		
}

function RefreshBasket(){
	var arr_artikel = new Array();
	var arr_anzahl = new Array();

	jQuery("input[name=anzahl]").each(function(key) {
		arr_anzahl.push(jQuery(this).val());
		arr_artikel.push(jQuery("input[name=artikel_id]:eq(" + key + ")").val());
    });
	
	jQuery.ajax({		
		type: "POST",
		url: "system/ajaxcontroller/ajax_request.php",
		data: "ajax=1&controller=refresh_basket&module=basket&artikel=" + arr_artikel + "&anzahl=" + arr_anzahl,
		success: function(result){
			jQuery('#basket_navigation_box').html(result);
		}
	});	
	
	jQuery.ajax({		
		type: "POST",
		url: "system/ajaxcontroller/ajax_request.php",
		data: "ajax=1&controller=refresh_basket_content&module=basket",
		success: function(result){
			jQuery('#warenkorb_inhalt_wrapper').html(result);
		}
	});
}
