If-statement inside jquery Append()
The easiest way I can think of to do this:
$('#divDetailsForSelectedInfo').append( function(i) { return '<div class="roundedAndBoxShade leftResultObject" id = "' + value.Query.Id + '">' + '<div class="leftResultObject_inner">' + (i > 0 ? '<img src="/img.jpg"/>' : ''); });