fixed script to be dynamic, included jquery 1.10