Complementary codes (CCs) have opened up a whole new frontier in Code Division Multiple Access (CDMA) techniques due to the ideal correlation properties. However, the equal gain combination must be satisfied in such CDMA system, which constrains the system performance over frequency selective fading channels. This paper aims to propose a set of weighted complementary codes (WCCs) to enable variable combination parameters while maintaining ideal correlation properties. Such new WCCs can provide power allocation with more freedom, and more importantly, an optimized power allocation can improve the bit error probability performance of CDMA systems as proved at the end of this paper.