using a promises http://stackoverflow.com/questions/14556975/modal-confirmation-jquery-advice/
https://confluence.kace.com/display/TS/The+best+way+to+run+custom+javascript+in+the+K1+web+interface
jQuery 1.9.1, HTML, CSS, JavaScript
jQuery 1.7.2, HTML, CSS, JavaScript
jQuery 1.8.3, HTML, CSS, JavaScript
from learning javascript design patterns