jQuery(document).ready( function() {

	jQuery.each(document.cookie.split(';'), function(i, cookie) {
	var c = jQuery.trim(cookie), name = c.split('=')[0], value = c.split('=')[1];
	jw_remember_effect(value);
	});
	
	jQuery("p.remember").click( function() {
		var postid = jQuery(this).attr("id").split('-')[1];
		var cookie_name = 'post-' + postid;
		if( jQuery(this).html() == "Auftritt merken" )
		{
			jQuery.cookie(cookie_name, postid, { path: '/2010/', expires: 30 });
			jw_remember_effect(postid);
		}
		else
		{
			jQuery.cookie(cookie_name, null, { path: '/2010/' });
			jw_forget_effect(postid);
		}
		//alert(jQuery.cookie(cookie_name));
	});
});

function jw_remember_effect(jw_post_id)
{
	var jw_post_p = "#rememberpost-" + jw_post_id;
	jQuery(jw_post_p).fadeOut("fast", function() {
	jQuery(jw_post_p).html("Auftritt gemerkt");
	jQuery(jw_post_p).css({fontWeight:"bold"}); });
	jQuery(jw_post_p).fadeIn("fast");
}

function jw_forget_effect(jw_post_id)
{
	var jw_post_p = "#rememberpost-" + jw_post_id;
	jQuery(jw_post_p).fadeOut("fast", function() {
	jQuery(jw_post_p).html("Auftritt merken");
	jQuery(jw_post_p).css({fontWeight:"normal"}); });
	jQuery(jw_post_p).fadeIn("fast");

}





