Menu selector that changes the background of a selected div
im not sure why you would want the length or count of the class..
You could simply use this to highlight the divs:

    $(".ProjectMainLink").click(function() {
          $(".ProjectMainLink").css("background-color","");
          $(this).css("background-color","#000");

    });


JS FIDDLE: http://jsfiddle.net/p3m2p/

EDIT:

Don't forget to wrap your functions in &lt;script type="text/javascript"&gt;&lt;/script&gt;

It could also be done like this:

&lt;script type="text/javascript"&gt;
$(document).on("click",".ProjectMainLink",function() {
          $(".ProjectMainLink").css("background-color","");
          $(this).css("background-color","#000");
    });
&lt;/script&gt;