var ShopCart = {
	myTimer:null,
	isExpanded:false,
	
	showPreview:function (id)
	{
		new Effect.BlindDown('shopping-cart-preview');
		this.isExpanded = true;
		
		this.myTimer = setTimeout('ShopCart.closePreview()', 5000);
	},
	
	clearCloseTimeout: function() {
		clearTimeout(this.myTimer);
	},
	
	delayedClosePreview: function() {
		this.myTimer = setTimeout('ShopCart.closePreview()', 300);
	},
	
	closePreview:function ()
	{
		/*if (!this.allowClosing)
			return;*/
		
		this.clearCloseTimeout();
		
		if (this.isExpanded) {
			// setTimeout("enableButton", tijd van blindup)
			new Effect.BlindUp('shopping-cart-preview');
			this.isExpanded = false;
		}
	}
}
