﻿$(document).ready(function() {
    if ($.cookie('CNBModalPop') != 'false') { // Show modal if no cookie
        $.modal("<div id='modal'>\
            <a href=\"javascript:;\"><img src=\"_images/misc/icon_modal-close.png\" alt=\"Close Window\" class=\"close\"></a>\
		    <h1>Welcome to the new <br/>CNB of Texas Website!</h1>\
		    <h2>Redesigned to better serve you.</h2>\
		    <div class=\"hr\">&nbsp;</div>\
		    <p>To quickly access your account, just click on <br/><span class=\"blue\">Login to My Online Banking</span> in the <span class=\"red\">Quick Links</span> column <br/>on the left side of the page, or click on <strong>Online Banking</strong>.</p>\
		    <span class=\"thankyou\">Thank you.</span>\
	     </div>", { close: false,
	         closeClass: "close",
	         onClose: CloseModal
	     });
    }

    function CloseModal() {
        var options = { path: '/', expires: 30 };
        $.cookie('CNBModalPop', 'false', options); // Set cookie for return modal hide
        $.modal.close(); // Close modal
    }

});
	 