

var zaqAnalyze = {
	vote : function(attribute,answer){
		$("body").css("text-align","left")
		$("body").append('<div id="zaqAnalyzeGray" style="text-align:left">')
		$.ajax({
			url      : "/handler/common/login_check.aspx" , 
			dataType : "json" , 
			type : "POST" , 
			glabal :false ,
			success  : function(json){
				if(json.Error.Code==0){
					$.ajax({
						url      : "/handler/analyze/send_analyze.aspx" , 
						data : {
							"attribute" : attribute  , 
							"zaq_token" :$("#zaq_token").val() ,
							"answer" : answer 
						} , 
						dataType : "json" , 
						type : "POST" , 
						success  : function(json){
							try{if(hideFlash)hideFlash()}catch(e){}// for cat top
							$("body").append('\
			<div id="AnalyzeWindow">\
				<div><img src="/common/images/analyzeWindow/head.png" alt="" width="690" height="30" /></div>\
				<a href="#" class="close rollover" style="text-align:left"><img src="/common/images/analyzeWindow/btn/closeBtn.png" alt="閉じる" width="25" height="25" style="text-align:left" /></a>\
				<div class="AnalyzeContent">\
					<div id="AnalyzeFin" class="clearfix">\
						<div id="zaqImage"><img src="/common/images/analyzeWindow/zaqFin.gif" alt="" width="100" height="150" /></div>\
						<div id="AnalyzeFinText"><p class="asobu">'+json.Data.Items[0].AttributeAnswer+'</p></div>\
					</div>\
				</div>\
				<div class="foot"><img src="/common/images/analyzeWindow/foot.png" alt="" width="690" height="30" /></div>\
			</div>')
							//$.zaqGrayer = $.zaqTools ? $.zaqTools.Grayer() : $.zaqUser.Grayer();
							$.zaqGrayer.show()
							$.zaqGrayer.click(function(){
								$("#AnalyzeWindow").fadeOut("fast",function(){
									$(this).remove()
									try{if(showFlash)showFlash()}catch(e){}// for cat top
								})
								$.zaqGrayer.hide()
								
							})
							
							$("#AnalyzeWindow").css({
								position:"absolute",
								left:"50%",
								top:parseInt(document.documentElement.clientHeight/2+(document.body.scrollTop || document.documentElement.scrollTop))-200+'px',
								marginLeft:"-"+(parseInt($("#AnalyzeWindow").width())/2)+"px",
								zIndex:902
							}).find("a").click(function(){
								$("#AnalyzeWindow").fadeOut("fast",function(){
									$(this).remove()
									try{if(showFlash)showFlash()}catch(e){}// for cat top
								})
								$.zaqGrayer.hide()
								
								$("body").css("text-align","center")
								return false;
							})
						}
					})
				}else{
					try{hideFlash()}catch(e){}
					$.Appeal.show('analyze');
				}
			}
		})

		
		
/*
		$("body").append('\
<div id="AnalyzeWindow">\
	<div><img src="/common/images/analyzeWindow/head.png" alt="" width="690" height="30" /></div>\
	<a href="#" class="close rollover"><img src="/common/images/analyzeWindow/btn/closeBtn.png" alt="閉じる" width="25" height="25" /></a>\
	<div class="AnalyzeContent">\
		<div class="taberu clearfix">\
			<div class="titleText"><img src="/common/images/analyzeWindow/letsTitle.gif" alt="さあ投票しよう！" width="415" height="40" /><img src="/common/images/analyzeWindow/WalkingZaq.gif" alt="" width="100" height="84" /></div>\
			<div class="analyzeTitle"><div class="no">000</div><p>あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほ</p></div>\
			<div class="btnBox clearfix">\
				<a href="#" class="btn01"><span class="btnText">あいうえおかきくけこ派</span></a>\
				<a href="#" class="btn02"><span class="btnText">あいうえおかきくけこ派</span></a>\
			</div>\
		</div>\
	</div>\
	<div class="foot"><img src="/common/images/analyzeWindow/foot.png" alt="" width="690" height="30" /></div>\
</div>\
')


		$("body").append('\
<div id="AnalyzeWindow">\
	<div><img src="/common/images/analyzeWindow/head.png" alt="" width="690" height="30" /></div>\
	<a href="#" class="close rollover"><img src="/common/images/analyzeWindow/btn/closeBtn.png" alt="閉じる" width="25" height="25" /></a>\
	<div class="AnalyzeContent">\
		<div id="AnalyzeErr" class="clearfix">\
			<div id="zaqImage"><img src="/common/images/analyzeWindow/zaqFin.gif" alt="" width="100" height="150" /></div>\
			<div id="AnalyzeErrText">\
				<img src="/common/images/analyzeWindow/loginPlease.gif" alt="ログインしてください。" width="310" height="68" />\
				<div id="AnalyzeErrBtnBox">\
					<a href="#"><img class="rollover" src="/common/images/analyzeWindow/btn/loginBtn.gif" alt="ログインボタン" width="146" height="50" /></a>　<a href="#"><img class="rollover" src="/common/images/analyzeWindow/btn/registerBtn.gif" alt="新規登録ボタン" width="146" height="50" /></a>\
				</div>\
			</div>\
		</div>\
	</div>\
	<div class="foot"><img src="/common/images/analyzeWindow/foot.png" alt="" width="690" height="30" /></div>\
</div>')
*/

/*
		$("body").append('\
<div id="AnalyzeWindow">\
	<div><img src="/common/images/analyzeWindow/head.png" alt="" width="690" height="30" /></div>\
	<a href="#" class="close rollover"><img src="/common/images/analyzeWindow/btn/closeBtn.png" alt="閉じる" width="25" height="25" /></a>\
	<div class="AnalyzeContent">\
		<div class="taberu clearfix">\
			<div class="titleText"><img src="/common/images/analyzeWindow/letsTitle.gif" alt="さあ投票しよう！" width="415" height="40" /><img src="/common/images/analyzeWindow/WalkingZaq.gif" alt="" width="100" height="84" /></div>\
			<div class="analyzeTitle"><div class="no">000</div><p>あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほ</p></div>\
			<div class="btnBox clearfix">\
				<a href="#" class="btn01"><span class="btnText">あいうえおかきくけこ派</span></a>\
				<a href="#" class="btn02"><span class="btnText">あいうえおかきくけこ派</span></a>\
			</div>\
		</div>\
	</div>\
	<div class="foot"><img src="/common/images/analyzeWindow/foot.png" alt="" width="690" height="30" /></div>\
</div>')
*/

/**/

	}

}

function flashEmptyChange(){
	$("#AnalyzeList").replaceWith("<a href='/analyze/' id='analyzeImg'><img src='/common/images/subStitute/detailAnalyze.jpg' alt='ざっくぅ分析' /></a>")
	$("#analyzeImg").attr("href","/analyze/")
}