function init_toaster(css_exp, timeout, max_views) {
	toaster_cookie_name = current_store_permalink + '_' + css_exp + '_view'
	
	$(css_exp + ' .dismiss_toaster').click(function() {
		dismiss_toaster_promote(css_exp);
	});
	
	view_count = parseInt(readCookie(toaster_cookie_name)) || 0
	if (view_count < max_views) {
		var ws = $(document).width();
		// calculate the center offset
		var offset = (ws / 2) - ($(css_exp).width() / 2);
		$(css_exp).css('left', offset + 'px');

		$(css_exp).slideDown(function() {
			promote_timeout = setTimeout("dismiss_toaster_promote('" + css_exp + "')", timeout);
		});
	}
	
}

function dismiss_toaster_promote(css_exp) {
	clearTimeout(promote_timeout);
	cookie_val = parseInt(readCookie(toaster_cookie_name)) || 0;
	cookie_val++;
	createCookie(toaster_cookie_name, cookie_val, 1);
	$(css_exp).stop().slideUp();
}