added resize code
added latest jQuery
tidied up display code