Updated Samples to include local references to js files & edited to make js generic