document.write('<script type="text/javascript" src="/sns/share/js/jquery.cookie.js"></script>');
/*
   sns main jaascript
   
   
*/
/*********************************************************************
**********************************************************************
   
   左メニュー処理
   
**********************************************************************
*********************************************************************/
//お気に入りユーザー表示・最小化
function sidebar_favuser_view(){
	$("#sidebar_favuser").slideToggle("slow",setCookie);
}
//参加ｺﾐｭﾆﾃｨｰ表示・最小化
function sidebar_circle_view(){
	$("#sidebar_circle").slideToggle("slow",setCookie);
}
//参加ｺﾐｭﾆﾃｨｰコメント表示・最小化
function sidebar_circlecom_view(){
	$("#sidebar_circlecom").slideToggle("slow",setCookie);
}
//コンテスト履歴表示・最小化
function sidebar_contest_history_view(){
	$("#sidebar_contest_history").slideToggle("slow",setCookie);
}
//企画展履歴表示・最小化
function sidebar_exhibition_history_view(){
	$("#sidebar_exhibition_history").slideToggle("slow",setCookie);
}
//setCookie
function setCookie(){
	//favuser
	var name = "cookie_sidebar_favuser";  
	if($("#sidebar_favuser").is(":hidden")){
		$.cookie(name,"hidden",{expires:7,path:"/"});//cookieをセットする  
	}else{
		$.cookie(name,1,{expires:7,path:"/"});//cookieをセットする  
	}
	//_circle
	var name = "cookie_sidebar_circle";  
	if ($("#sidebar_circle").is(":hidden")) {
		$.cookie(name,"hidden",{expires:7,path:"/"});//cookieをセットする  
	} else {
		$.cookie(name,1,{expires:7,path:"/"});//cookieをセットする  
	}
	//circlecom
	var name = "cookie_sidebar_circlecom";  
	if ($("#sidebar_circlecom").is(":hidden")) {
		$.cookie(name,"hidden",{expires:7,path:"/"});//cookieをセットする  
	} else {
		$.cookie(name,1,{expires:7,path:"/"});//cookieをセットする  
	}
	//contest_history
	var name = "cookie_sidebar_contest_history";  
	if ($("#sidebar_contest_history").is(":hidden")) {
		$.cookie(name,"hidden",{expires:7,path:"/"});//cookieをセットする  
	} else {
		$.cookie(name,1,{expires:7,path:"/"});//cookieをセットする  
	}
	//exhibition_history
	var name = "cookie_sidebar_exhibition_history";  
	if ($("#sidebar_exhibition_history").is(":hidden")) {
		$.cookie(name,"hidden",{expires:7,path:"/"});//cookieをセットする  
	} else {
		$.cookie(name,1,{expires:7,path:"/"});//cookieをセットする  
	}
}
/**************s*******************************************************
**********************************************************************
   
   viewer
   
**********************************************************************
*********************************************************************/
function viewer_open(mode,getString){
	if(mode=="myphoto"){
		var url = "/sns/viewer/index.php?"+getString;
	}else if(mode=="contest"){
		var url = "/sns/viewer/contest.php?"+getString;
	}else if(mode=="mvp"){
		var url = "/sns/viewer/mvp.php?"+getString;
	}else if(mode=="mvp2"){
		var url = "/sns/viewer/mvp2.php?"+getString;
	}else if(mode=="exhibition"){
		var url = "/sns/viewer/exhibition.php?"+getString;
	}else if(mode=="circle"){
		var url = "/sns/viewer/circle.php?"+getString;
	}else{
		var url = "/sns/viewer/index.php?"+getString;
	}
	window.open(url, 'viewer', 'width=1200, height=850, menubar=no, toolbar=no, scrollbars=auto,resizable=yes');
}
