added some jquery events and all.