<script src="//yandex.st/jquery/cookie/1.0/jquery.cookie.min.js"></script>
function setCookie(name, value, expires, path, domain, secure) {
document.cookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}
function ExpireCookie(minutes) {
var date = new Date();
var m = minutes;
date.setTime(date.getTime() + (m * 60 * 1000));
$.cookie("action", "yes", { expires: date });
}
$(window).load(function () {
var getCookieValue = $.cookie("action");
if(getCookieValue!="yes")
{
function func() {
$.fancybox.open('#modal-form');
}
setTimeout(func, 15000);
date = new Date();
date.setHours(date.getHours() + 24);
setCookie('action', 'yes', date.toUTCString());
}
});