/*
 * Shopping cart
 *
 * Version 1.2
 * Timo Erbach <terbach@netbixx.com>, Felix Hamann <f.hamann@core4.de>
 * 
 * [1.2] [Felix Hamann, <f.hamann@core4.de] Warenkorb für dedizierte Rezensionsfunktionalität erweitert 
 *
 */

function addToCart(isbn, titel){
	jQuery.ajax({
		type:"GET",
		url: "/Warenkorb/add/isbn/"+isbn,
		data: {},
		dataType: "html",
		success: function(html, status){
			jQuery('#cartCounter').replaceWith("<span id='cartCounter'>"+ html +"</span>");
			jQuery("#confirmAddToCartTitle").text(titel);
			jQuery("#confirmAddToCartAnchor").click();
		}
	});
};

function addToPresseCart(isbn, titel){
	jQuery.ajax({
		type:"GET",
		url: "/Warenkorbpresse/add/isbn/"+isbn,
		data: {},
		dataType: "html",
		success: function(html, status){
			jQuery('#pressCartCounter').replaceWith("<span id='pressCartCounter'>"+ html +"</span>");
			jQuery("#confirmAddToCartTitleRecension").text(titel);
			jQuery("#confirmAddToCartAnchorRecension").click();
		}
	});
};