refactor the js file
add cordova ibeacon plugin