if (typeof jQuery == "undefined") {
    alert("jQuery is not installed");
    (function () {
        var script = document.createElement("SCRIPT");
        script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
        script.type = 'text/javascript';
        document.getElementsByTagName("head")[0].appendChild(script);
        console.log('we have now just installed jQuery for you.. no need to thank us 😉');
    })();
}
else {
    alert("jQuery is installed correctly!");
}