Determine link, add class

Hi,

I need to determine current link and add class.

This is my code:

jQuery(document).ready(function() {
jQuery("[href]").each(function() {
if (this.href == window.location.href) {
jQuery(this).addClass("active");
jQuery(this).parent('li').addClass("activeborder");
}
});
});

But some of my links are like that

xxx.com/project/page/2/

xxx.com/project/?product_cat=led-pocket

Is it possible that if the link contains “xxx.com/project/” then add class to the element.