Your repeater is going to have multiple images so which image do you think this is going to refer to
var imgSrc = document.getElementById("<%=subImage.ClientID %>").src;
The first one? The last one? You need to know which image is clicked so you need to add the click event to all possible images. There are many ways of doing this, below I've added a "data-image" attribute to indicate which images you want to be able to click.
<asp:Repeater ID="myRepeater" runat="server">
<ItemTemplate>
<asp:Image ID="subImage" runat="server" data-image ImageUrl='<%# Container.DataItem %>' CssClass="subPicStyle"/>
</ItemTemplate>
</asp:Repeater>
<div class='guitarItemsDetailsImage'>
<asp:Image ID="brandImage" runat="server" ImageUrl=''
height="900px" width="370px" />
</div>
<script>
$(document).ready(function () {
var images = $("[data-image]");
images.click(function (e) {
e.preventDefault();
imgSrc = $(this);
$("#<%= brandImage.ClientID %>").attr("src", imgSrc.attr('src'));
images.attr("disabled", false);
imgSrc.attr("disabled", "disabled");
});
});
</script>