//*****************************************************************************
// Copyright 2007 Starscale Inc.

ibi.YupNope.Templates.thingTmplStart='<div id="ThingDiv.%(Id)">\
<div class="thing">\
<table width="100%" cellpadding="0" border="0" cellspacing="0">\
<tr><td width="75px" valign="top">\
<div class="thingScore" id="thingScore.%(Id)" onmouseover="showStatBlock(%(Id));" onclick="hideStatBlock(%(Id))">\
%(Score) </div>\
</td>\
\
<td valign="top" align="left">\
<div class="thingContent" title="%(htmlContent)">\
<a href="/thing/%(Id)" class="thingcontentlink">\
%(htmlContent)</a> %(linkButton) </div>\
\
</td>\
\
<td width="50px" align="right" >\
<span id="votesYup.%(Id)" style="color: green;" class="thingTotalNumber" title="Total Yups">\
\
%(VotesYup) </span></td>\
\
<td width="50px" align="right" >\
\
<span id="votesNope.%(Id)" style="color: red;" class="thingTotalNumber" title="Total Nopes">\
%(VotesNope) </span> </td>\
\
<td width="60px" align="center" valign="top">\
%(googleButton)\
%(deleteButton)\
</td>\
\
<td width="70px" align="center">\
<div class="voteButtons"> \
<span id="ThingProgress.%(Id)" style="display: none"> <img src="/static/images/radar.gif"/> </span>\
<span id="ThingButtons.%(Id)">';ibi.YupNope.Templates.thingTmplEnd='</span></div>\
</td></tr>\
</table>\
</div>\
\
<div id="thingStatBlock.%(Id)"  style="display:none;" class="thingStats">\
<div class="thingStatsInner">\
<table cellpadding="0" cellspacing="0"><tr><td valign="top">\
\
<table>\
<tr>\
<td class="thingStat"><b>Total Votes:</b></td>\
<td class="thingStat"><span id="totalVotes.%(Id)">%(TotalVotes)</span></td>\
\
<td class="thingStat"> <b style="margin-left: 10px">Yup: </b></td>\
<td class="thingStat"><span id="percYup.%(Id)">%(PercYup)%</span></td>\
</tr> \
\
<tr>\
<td class="thingStat"> <b>Min Score:</b></td>\
<td class="thingStat"><span id="minScore.%(Id)">%(MinScore)</span></td>\
\
<td class="thingStat"><b style="margin-left: 10px;">Nope: </b></td>\
<td class="thingStat"><span id="percNope.%(Id)">%(PercNope)%</span></td>\
</tr>\
\
<tr>\
<td class="thingStat"><b>Max Score:</b></td>\
<td class="thingStat"> <span id="maxScore.%(Id)">%(MaxScore)</span></td>\
</tr>\
</table> \
\
<div class="thingStat">\
<b>Added by </b> <a href="/member/%(Creator.Handle)">%(Creator.Handle)</a>\
<b> on </b>%(CreationTime)\
</div>\
\
<div class="thingStat">\
<b>Last vote on </b> <span id="lastVoteTime.%(Id)">%(LastVoteTime)</span>\
</div>\
\
</td><td valign="top" class="thingStat">\
<div style="padding-left: 15px">\
<b>Tags:</b></div></td>\
<td id="tagContainer.%(Id)" class="thingStat"  valign="top"> \
<span id="tagContainer.Content.%(Id)"></span>\
<img id="thingTagsProgress.%(Id)" style="margin: 10px 20px;" src="/static/images/radar.gif"/>\
</td></tr>\
<tr><td class="thingStat" colspan="4" align="left"><a href="/search/%(urlContent)">Similar Things</a></td><td>\
<img onclick="hideStatBlock(%(Id), true);" class="icon" style="" src="/static/images/close2.gif"/></td>\
\
</tr></table>\
</div></div>\
\
</div>';ibi.YupNope.ThingJsonHandler=Class.create(ibi.YupNope.ThingBuilder,{handle:function(things,memberId){var contents='<div xmlns="http://www.w3.org/1999/xhtml">';for(var i=0,length=things.length;i<length;++i){contents+=this.prv_buildThing(things[i],memberId);}
contents+='</div>';return contents;},prv_buildThing:function(thing,memberId){this.pro_enhanceThingData(thing);this.pro_buildDeleteButton(thing,memberId,onThingDeleteSuccess);this.pro_buildGoogleButton(thing);this.pro_buildLinkButton(thing);var template=ibi.YupNope.Templates.thingTmplStart;template+=this.pro_buildVoteButtonsTmpl(thing,memberId);template+=ibi.YupNope.Templates.thingTmplEnd;return ibi.Template.parse(template,thing);}});
