added jquery and fixed bugs with the portal