pass jquery variable to iife
move script to js file