added javascript to for different categories