A way to do this may be to subtract from the item score for unsoceted items, for example:
Uncommon Level Gem: -1
Rare Level Gem: 0
Epic Level Gem: +1
As well as a weight scale, This gives you 4 points to play with for weighted items. It also rewards those who invest into their gear. However some items can gain +3 item level< but with epic gems it does make the gear a bit better, thus increasing it's comparative level.
On a side note: The site looks fantastic, keep up the great work!