Command $(document).referrer is the correct way to get referrer with Jquery?
How about just:
document.referrer