var cookiescript_exists = false; var jquery_exists = false; var scriptCheck = ''; var popupHtml = ''; // Check if jQuery is loaded if (typeof jQuery == 'undefined') { document.write(''); jquery_exists = true; } else { jquery_exists = true; } // Check if jquery cookie script is loaded var scripts = document.getElementsByTagName("script"); for (var i=0; i< scripts.length; i++){ if (scripts[i].src == "//cdn.jsdelivr.net/jquery.cookie/1.4.0/jquery.cookie.min.js"){ // ... do not add header again cookiescript_exists = true; } } if (!cookiescript_exists) { document.write(''); cookiescript_exists = true; } scriptCheck = setInterval(function() { if (jquery_exists && cookiescript_exists) { var cookiename = '_warning_page'; if (!$.cookie(cookiename)) { jQuery('body').after('
'); //jQuery('#wblock').fadeIn(); //jQuery('#wiframecontainer').fadeIn(); } jQuery( "#warning-swank-enter" ).bind( "click", function( event ) { jQuery('#wiframecontainer').fadeOut(); jQuery('#wblock').fadeOut(); }); mysetCookie(cookiename,1, 10, '/', null ); /////////////// SPECIAL PROMO BELOW clearInterval(scriptCheck); } }, 400); function mysetCookie( name, value, expires, path, domain, secure ){ var today = new Date(); today.setTime( today.getTime() ); if ( expires ) { expires = expires * 24 * 60 * 60; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); }