jQuery.noConflict(); function sppro_callback(doc){ if (!doc.forms[0])return; } jQuery(document).ready(function($) { $(document).ready(function(){ sppro_reset_cookies = function(){ c_value_a = $.cookie(sppro_cookie_name_a); c_value_b = $.cookie(sppro_cookie_name_b); if (sppro_show_mode == 1 && c_value_b != null){ $.cookie(sppro_cookie_name_b, null, { path: '/', expires: 0 }); return true; } else if (sppro_show_mode == 2 && c_value_a != null){ $.cookie(sppro_cookie_name_a, null, { path: '/', expires: 0 }); return true; } else { return false;} } sppro_can_show = function(){ if (false)return true; if (sppro_show_mode == 3) return true; if (sppro_show_mode == 4) return false; var date = new Date(); var res = false; if (!sppro_reset_cookies()){ var c_value_a = $.cookie(sppro_cookie_name_a); var c_value_b = $.cookie(sppro_cookie_name_b); if (sppro_show_mode == 1){ date.setTime(date.getTime() + (1 * 24 * 60 * 60 * 1000)); c_value = c_value_a; sppro_cookie_name = sppro_cookie_name_a; } else if (sppro_show_mode == 2){ date.setTime(date.getTime() + (100000 * 24 * 60 * 60 * 1000)); c_value = c_value_b; sppro_cookie_name = sppro_cookie_name_b;} if (c_value == null){ $.cookie(sppro_cookie_name, '0', { path: '/', expires: date }); res = true; } else {if (sppro_show_mode == 2){ date.setTime(date.getTime() + (100000 * 24 * 60 * 60 * 1000)); c_value++; if ($.cookie("sppro_session") == null || true) $.cookie(sppro_cookie_name, c_value, { path: '/', expires: date }); if (c_value < sppro_cookie_num_visits && ($.cookie("sppro_session") == null || true)) res = true;}} } $.cookie("sppro_session", "1", { path: '/'}); return res; } }) });