/* Show / Toggle panel */
function togglePanel(panelId) {
	if($(panelId)) {
		var linkId = panelId + "_link";
		if($(panelId).visible()) {
			Effect.SlideUp($(panelId), { duration: 0.5 });
			if($(linkId).hasClassName('displayed')) {
				$(linkId).removeClassName('displayed');
			}
			//Cookie.create(panelId, 'false', 365);
			Cookie.set(panelId, 'false', 365);
		} else {
			Effect.SlideDown($(panelId), { duration: 0.5 });
			$(linkId).addClassName('displayed');
			//Cookie.create(panelId, 'true', 365);
			Cookie.set(panelId, 'true', 365);
		}
	}
}
function showPanel(panelId) {
	if($(panelId)) {
		$(panelId).show();
	}
	var linkId = panelId + "_link";
	if($(linkId)) {
		$(linkId).addClassName('displayed');
	}
}

/* Show and hide actual page */
function showHideCat() {
	//new Effect.SlideDown('category_header');
	setTimeout("Effect.SlideDown('category_header');", 1000);
	setTimeout("Effect.SlideUp('category_header');", 5000);
}

// Share
function iwiwshare_click() {
	u=location.href;
	t=document.title;window.open('http://iwiw.hu/pages/share/share.jsp?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'iwiwshare','toolbar=0,status=0,location=1, width=650,height=600,scrollbars=1');
	return false;
}
function facebookshare_click() {
	u=location.href;
	t=document.title;window.open('http://www.facebook.com/share.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'facebookshare','toolbar=0,status=0,location=1, width=650,height=600,scrollbars=1');
	return false;
}

