jQuery.template("bid-status",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof Status!="undefined"&&Status!=null&&(typeof Status=="function"?Status.call($item):Status)?(__.push('  <div class="bid-status" data-key="'),typeof Key!="undefined"&&Key!=null&&__.push($.encode(typeof Key=="function"?Key.call($item):Key)),__.push('">   <label>'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/bid-status.htm","Change status of the bid"))),__.push(':<\/label>   <input name="reply-action" type="radio" '),typeof(Status=="Accepted"?"checked":"")!="undefined"&&(Status=="Accepted"?"checked":"")!=null&&__.push($.encode(typeof(Status=="Accepted"?"checked":"")=="function"?(Status=="Accepted"?"checked":"").call($item):Status=="Accepted"?"checked":"")),__.push(' value="Accepted" id="approve" /><label for="approve">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/bid-status.htm","Accept"))),__.push('<\/label>   <input name="reply-action" type="radio" '),typeof(Status=="Maybe"?"checked":"")!="undefined"&&(Status=="Maybe"?"checked":"")!=null&&__.push($.encode(typeof(Status=="Maybe"?"checked":"")=="function"?(Status=="Maybe"?"checked":"").call($item):Status=="Maybe"?"checked":"")),__.push('  value="Maybe" id="maybe" /><label for="maybe">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/bid-status.htm","Maybe"))),__.push('<\/label>    <input name="reply-action" type="radio" '),typeof(Status=="Rejected"?"checked":"")!="undefined"&&(Status=="Rejected"?"checked":"")!=null&&__.push($.encode(typeof(Status=="Rejected"?"checked":"")=="function"?(Status=="Rejected"?"checked":"").call($item):Status=="Rejected"?"checked":"")),__.push('  value="Rejected" id="rejected" /><label for="rejected">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/bid-status.htm","Reject"))),__.push('<\/label>       <span class="'),typeof(Status!="Rejected"?"hidden":"")!="undefined"&&(Status!="Rejected"?"hidden":"")!=null&&__.push($.encode(typeof(Status!="Rejected"?"hidden":"")=="function"?(Status!="Rejected"?"hidden":"").call($item):Status!="Rejected"?"hidden":"")),__.push('">    <input type="checkbox" id="hide-bid" data-user="'),typeof User!="undefined"&&User!=null&&__.push($.encode(typeof User=="function"?User.call($item):User)),__.push('" />&nbsp;<label for="hide-bid">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/bid-status.htm","Hide this bid"))),__.push("<\/label>    <\/span>     <\/div>  ")):!0&&(__.push('    <span>    <input type="checkbox" id="hide-bid" data-user="'),typeof User!="undefined"&&User!=null&&__.push($.encode(typeof User=="function"?User.call($item):User)),__.push('" />&nbsp;<label for="hide-bid">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/bid-status.htm","Hide this bid"))),__.push("<\/label>    <\/span>        ")),__.push("");return __});jQuery.template("comment",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="comment">     <div class="user '),typeof Class!="undefined"&&Class!=null&&__.push($.encode(typeof Class=="function"?Class.call($item):Class)),__.push('">    <a href="/user/?id='),typeof SenderKey!="undefined"&&SenderKey!=null&&__.push($.encode(typeof SenderKey=="function"?SenderKey.call($item):SenderKey)),__.push('">'),typeof SenderName!="undefined"&&SenderName!=null&&__.push($.encode(typeof SenderName=="function"?SenderName.call($item):SenderName)),__.push("<\/a>    <span>"),typeof Date!="undefined"&&Date!=null&&__.push($.encode(typeof Date=="function"?Date.call($item):Date)),__.push("<\/span>    <span>"),typeof Time!="undefined"&&Time!=null&&__.push($.encode(typeof Time=="function"?Time.call($item):Time)),__.push('<\/span>   <\/div>     <div class="text">'),typeof Text!="undefined"&&Text!=null&&__.push(typeof Text=="function"?Text.call($item):Text),__.push("<\/div>  <\/div>");return __});jQuery.template("filters",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof(Types.length>0)!="undefined"&&Types.length>0!=null&&(typeof(Types.length>0)=="function"?(Types.length>0).call($item):Types.length>0)&&(__.push('       <span class="filter-header">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/filters.htm","Project type"))),__.push("<\/span>         "),typeof Types!="undefined"&&Types!=null&&$.each(typeof Types=="function"?Types.call($item):Types,function(n,type){with(this)__.push('    <div class="filter">      <input class="project-type" id="'),typeof type.Type!="undefined"&&type.Type!=null&&__.push($.encode(typeof type.Type=="function"?type.Type.call($item):type.Type)),__.push('-filter" type="checkbox" value="'),typeof type.Type!="undefined"&&type.Type!=null&&__.push($.encode(typeof type.Type=="function"?type.Type.call($item):type.Type)),__.push('" /><label for="'),typeof type.Type!="undefined"&&type.Type!=null&&__.push($.encode(typeof type.Type=="function"?type.Type.call($item):type.Type)),__.push('-filter">'),typeof type.Text!="undefined"&&type.Text!=null&&__.push($.encode(typeof type.Text=="function"?type.Text.call($item):type.Text)),__.push(" ("),typeof type.Count!="undefined"&&type.Count!=null&&__.push($.encode(typeof type.Count=="function"?type.Count.call($item):type.Count)),__.push(")<\/label>    <\/div>   ")}),__.push("    ")),__.push("       "),typeof(Tags.length>0)!="undefined"&&Tags.length>0!=null&&(typeof(Tags.length>0)=="function"?(Tags.length>0).call($item):Tags.length>0)&&(__.push('        <span class="filter-header">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/filters.htm","Topics"))),__.push("<\/span>         "),typeof Tags!="undefined"&&Tags!=null&&$.each(typeof Tags=="function"?Tags.call($item):Tags,function(n,tag){with(this)__.push('       <div class="filter">     <input class="project-tag" type="checkbox" id="'),typeof tag.Tag!="undefined"&&tag.Tag!=null&&__.push($.encode(typeof tag.Tag=="function"?tag.Tag.call($item):tag.Tag)),__.push('-filter" value="'),typeof tag.Tag!="undefined"&&tag.Tag!=null&&__.push($.encode(typeof tag.Tag=="function"?tag.Tag.call($item):tag.Tag)),__.push('" /><label title="'),typeof tag.Tag!="undefined"&&tag.Tag!=null&&__.push($.encode(typeof tag.Tag=="function"?tag.Tag.call($item):tag.Tag)),__.push('" for="'),typeof tag.Tag!="undefined"&&tag.Tag!=null&&__.push($.encode(typeof tag.Tag=="function"?tag.Tag.call($item):tag.Tag)),__.push('-filter">'),typeof tag.Tag!="undefined"&&tag.Tag!=null&&__.push($.encode(typeof tag.Tag=="function"?tag.Tag.call($item):tag.Tag)),__.push(" ("),typeof tag.Count!="undefined"&&tag.Count!=null&&__.push($.encode(typeof tag.Count=="function"?tag.Count.call($item):tag.Count)),__.push(")<\/label>    <\/div>   ")}),__.push("    ")),__.push("        "),typeof(Statuses.length>0)!="undefined"&&Statuses.length>0!=null&&(typeof(Statuses.length>0)=="function"?(Statuses.length>0).call($item):Statuses.length>0)&&(__.push('        <span class="filter-header">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/filters.htm","Project status"))),__.push("<\/span>      "),typeof Statuses!="undefined"&&Statuses!=null&&$.each(typeof Statuses=="function"?Statuses.call($item):Statuses,function(n,status){with(this)__.push("        "),typeof(status.Count>0)!="undefined"&&status.Count>0!=null&&(typeof(status.Count>0)=="function"?(status.Count>0).call($item):status.Count>0)&&(__.push('      <div class="filter">      <input class="user-filter" type="checkbox" id="'),typeof status.Type!="undefined"&&status.Type!=null&&__.push($.encode(typeof status.Type=="function"?status.Type.call($item):status.Type)),__.push('-filter" value="'),typeof status.Type!="undefined"&&status.Type!=null&&__.push($.encode(typeof status.Type=="function"?status.Type.call($item):status.Type)),__.push('" /><label for="'),typeof status.Type!="undefined"&&status.Type!=null&&__.push($.encode(typeof status.Type=="function"?status.Type.call($item):status.Type)),__.push('-filter">'),typeof status.Text!="undefined"&&status.Text!=null&&__.push($.encode(typeof status.Text=="function"?status.Text.call($item):status.Text)),__.push(" ("),typeof status.Count!="undefined"&&status.Count!=null&&__.push($.encode(typeof status.Count=="function"?status.Count.call($item):status.Count)),__.push(")<\/label>     <\/div>    ")),__.push("    ")}),__.push("    ")),__.push("");return __});jQuery.template("project",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="project" data-deadline="'),typeof Deadline!="undefined"&&Deadline!=null&&__.push($.encode(typeof Deadline=="function"?Deadline.call($item):Deadline)),__.push('" data-key="'),typeof Key!="undefined"&&Key!=null&&__.push($.encode(typeof Key=="function"?Key.call($item):Key)),__.push('">   <a href="'),typeof Url!="undefined"&&Url!=null&&__.push($.encode(typeof Url=="function"?Url.call($item):Url)),__.push('"><h2>'),typeof Title!="undefined"&&Title!=null&&__.push($.encode(typeof Title=="function"?Title.call($item):Title)),__.push("<\/h2><\/a>   "),typeof(ProjectType!=3)!="undefined"&&ProjectType!=3!=null&&(typeof(ProjectType!=3)=="function"?(ProjectType!=3).call($item):ProjectType!=3)&&(__.push('    <span class="price">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/project.htm","Price"))),__.push(":     "),typeof Price!="undefined"&&Price!=null&&(typeof Price=="function"?Price.call($item):Price)?(__.push("      <label>$"),typeof Price!="undefined"&&Price!=null&&__.push($.encode(typeof Price=="function"?Price.call($item):Price)),__.push("<\/label>     ")):!0&&(__.push("      "),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/project.htm","negotiated"))),__.push("     ")),__.push("    <\/span>   ")),__.push('   <div class="desc">    '),typeof Description!="undefined"&&Description!=null&&__.push(typeof Description=="function"?Description.call($item):Description),__.push("   <\/div>   "),typeof(Tags.length>0)!="undefined"&&Tags.length>0!=null&&(typeof(Tags.length>0)=="function"?(Tags.length>0).call($item):Tags.length>0)&&(__.push('    <div class="tags">     <img src="/img/v2/shared/tags.png" alt="" />     '),typeof Tags!="undefined"&&Tags!=null&&$.each(typeof Tags=="function"?Tags.call($item):Tags,function(i,tag){with(this)__.push('      <a href="#'),typeof tag!="undefined"&&tag!=null&&__.push($.encode(typeof tag=="function"?tag.call($item):tag)),__.push('">'),typeof tag!="undefined"&&tag!=null&&__.push($.encode(typeof tag=="function"?tag.call($item):tag)),__.push("<\/a>"),typeof(i<Tags.length-1?",":"")!="undefined"&&(i<Tags.length-1?",":"")!=null&&__.push($.encode(typeof(i<Tags.length-1?",":"")=="function"?(i<Tags.length-1?",":"").call($item):i<Tags.length-1?",":"")),__.push("     ")}),__.push("    <\/div>   ")),__.push('   <div class="deadline">    '),typeof(ProjectType!=3)!="undefined"&&ProjectType!=3!=null&&(typeof(ProjectType!=3)=="function"?(ProjectType!=3).call($item):ProjectType!=3)?(__.push("     <span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/project.htm","Deadline"))),__.push(":      "),typeof Deadline!="undefined"&&Deadline!=null&&(typeof Deadline=="function"?Deadline.call($item):Deadline)?(__.push("       "),typeof Deadline!="undefined"&&Deadline!=null&&__.push($.encode(typeof Deadline=="function"?Deadline.call($item):Deadline)),__.push("      ")):!0&&(__.push("       "),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/project.htm","negotiated"))),__.push("      ")),__.push('     <\/span>     <span class="status">'),typeof Status!="undefined"&&Status!=null&&__.push($.encode(typeof Status=="function"?Status.call($item):Status)),__.push('<\/span>     <span class="bids">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/project.htm","Bids:"))),__.push(" "),typeof BidsCount!="undefined"&&BidsCount!=null&&__.push($.encode(typeof BidsCount=="function"?BidsCount.call($item):BidsCount)),__.push("<\/span>     "),typeof EllapsedTime!="undefined"&&EllapsedTime!=null&&__.push($.encode(typeof EllapsedTime=="function"?EllapsedTime.call($item):EllapsedTime)),__.push("    ")):!0&&(__.push("     <span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/project.htm","Event date"))),__.push(": "),typeof Deadline!="undefined"&&Deadline!=null&&__.push($.encode(typeof Deadline=="function"?Deadline.call($item):Deadline)),__.push('<\/span>     <span class="status">'),typeof Status!="undefined"&&Status!=null&&__.push($.encode(typeof Status=="function"?Status.call($item):Status)),__.push("<\/span>     "),typeof EllapsedTime!="undefined"&&EllapsedTime!=null&&__.push($.encode(typeof EllapsedTime=="function"?EllapsedTime.call($item):EllapsedTime)),__.push("    ")),__.push("   <\/div>  <\/div>");return __});jQuery.template("reply",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="reply">                <span class="title">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/reply.htm","Leave a comment"))),__.push('<\/span>                    <div class="tinymce-editor"><\/div>      '),typeof(typeof hideSend=="undefined"||!hideSend)!="undefined"&&(typeof hideSend=="undefined"||!hideSend)!=null&&(typeof(typeof hideSend=="undefined"||!hideSend)=="function"?(typeof hideSend=="undefined"||!hideSend).call($item):typeof hideSend=="undefined"||!hideSend)&&(__.push('    <a href="#" id="ok" class="ui-button" data-user="'),typeof ReplyTo!="undefined"&&ReplyTo!=null&&__.push($.encode(typeof ReplyTo=="function"?ReplyTo.call($item):ReplyTo)),__.push('">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/market/reply.htm","Send"))),__.push("<\/a>   ")),__.push("     <\/div>");return __})