$(function() {
	$("#monContainer").notify({
    	speed: 500,
	    expires: false
	});
})


function notifShop(xml){
	var id=$(xml).find('id').text();
	var name=$(xml).find('name').text();
	var image=$(xml).find('image').text();

	$("#monContainer").notify("create", "templateShop", {
		title: 'Product added to cart!',
		text: '<div class="pictureProduct"><img class="pictureP" src="/image/cache/'+image+'"/></div><div class="nameP"><h3 class="namePtext"><a href="/product_id='+id+'">'+name+'</a><br> added to <a href="/index.php?route=checkout/cart">shopping cart</a>.</h3></div>'
	},{
		expires: 3500,
		speed: 1000
	});
}

function notifWishList(xml){
	var id=$(xml).find('id').text();
	var name=$(xml).find('name').text();
	var image=$(xml).find('image').text();

	$("#monContainer").notify("create", "templateWishList", {
		title: 'Product added to your wish list!',
		text: '<div class="pictureProduct"><img class="pictureP" src="/image/cache/'+image+'"/></div><div class="nameP"><h3 class="namePtext"><a href="/product_id='+id+'">'+name+'</a><br> added to <a href="/index.php?route=account/wishlist">your wish list</a>.</h3></div>'
	},{
		expires: 3500,
		speed: 1000
	});
}

function notifCompare(xml){
	var id=$(xml).find('id').text();
	var name=$(xml).find('name').text();
	var image=$(xml).find('image').text();

	$("#monContainer").notify("create", "templateCompare", {
		title: 'Product added to product comparison!<br>(max 4 products)',
		text: '<div class="pictureProduct"><img class="pictureP" src="/image/cache/'+image+'"/></div><div class="nameP"><h3 class="namePtext"><a href="/?product_id='+id+'">'+name+'</a><br> added to <a href="/index.php?route=product/compare">product comparison</a>.</h3></div>'
	},{
		expires: 3500,
		speed: 1000
	});
}
