var old_onload = window.onload;
window.onload = function()
{
	if (typeof old_onload == 'function')
	{
		old_onload();
	}
	load();
}

function load()
{
	/* console.log(  Cookie.read( 'remove-evil-popup' ) );
	console.log(location); */
	if( Cookie.read( 'supreme' ) != 'yes' )
	{
		$('main-popup-container').addClass( 'show' );
	}
}

function close_main_popup()
{
	$('main-popup-container').style.display = 'none';
	setPopupCookie();
}

// need to call this one from flash to handle onclick event in ie
function setPopupCookie()
{
	Cookie.write( 'supreme', 'yes', { duration: 0, path: '/' } );
}
