$def with(Data)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>application details</title>
<link type="text/css" rel="stylesheet" href="/static/style/apply.css" />
<script src="/static/js/jquery-1.7.1.min.js" type="text/javascript"></script>

<script type="text/javascript">
var index_data = $:json_encode(Data);
var installDiv ='<div class="install">'
					+'<span id="cancel"></span>'
					+'<input type="button" value="$trans("ApplicationView_Web_Install")" class="inseallButtom" name="installButtom" id="installButtom" />'
					+'<p></p>'
				+'</div>';
$$(function(){
	$$('.otherAplay').hover(function(){
		$$(this).find('dd').after(installDiv);					
	},function(){
		$$('.install').remove();							
	})	  

	/*权限展开 收起*/
	$$('.more').click(function(){
	    $$(this).css({'display':'none'});
		$$('.inforBox').css({'display':'block'});
	})
	$$('.away').click(function(){
		$$('.inforBox').css({'display':'none'});	
		$$('.more').css({'display':'block'});
	})


	$$('.aplayButtonn').hover(function() {
		$$(this).addClass('hover').siblings().removeClass('hover');						  
	}, function(){
		$$(this).removeClass('hover');
	}).mousedown(function(){
		$$(this).removeClass('hover').addClass('down');
	}).mouseup(function(){
		$$(this).removeClass('down');
	})

})

function loadcustomlike()
{
	
	$$.get('/unistore/loadcustomlike?appname=$Data["Name"]', function(result){
		$$("dd:last").remove()
		$$.each(result, function(i, field){
			$$("h1:last").after('<dl class="clearfix otherAplay" appurl="'
			                    +field["download_url"]
			                    +'   "> <dt><img src=' 
								+ field["pic1"] 
			                    + ' width="36" height="36" /></dt> <dd> <a>'
								+ field["cname"]
								+ "</a> <p>$trans('ApplicationView_Web_Grade')<span>"
								+ field["default_starlevel"]
								+ "</span></p> </dd> </dl>"
								)
		})
	
	$$('.otherAplay').hover(function(){
		$$(this).find('dd').after(installDiv);	
		
	},function(){
		$$('.install').remove();							
	})	
	
	})

	$$("#installButtom ").live('click',function(){
	    var data = {
			appurl: $$("#installButtom ").parent().parent().attr("appurl")
		}
		
		$$.post("/unistore/install",data,function(){
		
		})
	})
	
	$$("#cancel").live('click',function(){
		$$("#installButtom ").parent().parent().remove()
		
	})
}
$$(function(){ 
	if (index_data.GuessShow == 1)
		{
		loadcustomlike();
		}
	}) 
function KeyDownFunction()
{
if (typeof window.event != 'undefined') {  
           document.onkeydown = function() {  
             var type = event.srcElement.type;  
             var code = event.keyCode;  
             return ((code != 8 && code != 13) ||  
                     (type == 'text' && code != 13 ) ||  
                     (type == 'textarea') ||  
                     (type == 'submit' && code == 13))  
           }  
         } else { // FireFox/Others  
           document.onkeypress = function(e) {  
   
             var type = e.target.localName.toLowerCase();  
             var code = e.keyCode;  
             if ((code != 8 && code != 13) ||  
                 (type == 'input' && code != 13 ) ||  
                 (type == 'textarea') ||  
                 (type == 'submit' && code == 13)) {  
                 return true;  
             } else {  
                 return false ;  
             }  
           }  
         } 
}
</script>
</head>

<body oncontextmenu="return false" onselectstart="return false" onkeydown="KeyDownFunction()">
<div id="detailsWrap">
	<div class="clearfix">
    	<div class="sign fl"><img src=$Data["Img"] width="50" height="50" /></div>
		<div class="sign_1 fl">
        <h3 style="word-wrap: break-word;">$Data["Name"]</h3>
		$if Data["ButtonShow"]:
			<input type="button" class="aplayButtonn" value="$trans('ApplicationView_Web_Uninstall')" name="aplayName" id="Uninstall" />
		</div>
    </div>
    <dl class="infor clearfix"><dt>$trans('ApplicationView_Web_Version')</dt><dd>$Data["Version"]</dd></dl>
    <dl class="infor clearfix"><dt>$trans('ApplicationView_Web_Size')</dt><dd>$Data["Size"]</dd></dl>
	$if Data["Permission"]:
		<dl class="infor_1 clearfix"><dt>$trans('ApplicationView_Web_Permission')</dt><dd></dd></dl>
	<div class="inforBox_1">	
		<p>$Data["Permission"][0]<br />
		$if len(Data["Permission"]) > 1:
			<a class="more">$trans('ApplicationView_Web_More')</a></p>
	</div>	
	<div class="inforBox">
		$for permission in Data["Permission"][1:]:
			<p>$permission</p>
        
        <a class="away">$trans('ApplicationView_Web_Less')</a>
    </div>
	$if Data["GuessShow"] == 1: 
		<h1>$trans('ApplicationView_Web_YouLike')</h1> 	<dd><p><span>$trans('ApplicationView_Web_Guessing')</span></p></dd>

</div>

<script language="javascript">
$$(document).ready(function(){
	$$("#Uninstall").click(function(){
		var data = {};
		data.file= [];
		$$.post("/unistore/Uninstall",data,function(){
				
		})
	})
	var data = {};
	data.file= [];
	$$.post("/unistore/loadfinish",data,function(){
			
	})
})
</script>
</body>
</html>
