/* LIVE JASMIN AWE */


var puShown = false;

        function v_doOpen(url)
        {
                if ( puShown == true )
                {
                        return true;
                }

                win = window.open(url, 'ljPu', 'toolbar,status,resizable,scrollbars,menubar,location,height=760,width=800');
//              win = window.open(url, 'ljPu', 'height=680,width=790');
                if ( win )
                {
                        win.blur();
                        puShown = true;
                }
                return win;
        }
        
        
        function v_setCookie(name, value, time)
        {
        	var expires = new Date();
        	
        	expires.setTime( expires.getTime() + time );
        	
        	document.cookie = name + '=' + value + '; expires=' + expires.toGMTString();
        }
        
        
        function v_getCookie(name) {
        	var cookies = document.cookie.toString().split('; ');
        	var cookie, c_name, c_value;
        	
        	for (var n=0; n<cookies.length; n++) {
        		cookie  = cookies[n].split('=');
        		c_name  = cookie[0];
        		c_value = cookie[1];
        		
        		if ( c_name == name ) {
        			return c_value;
        		}
        	}
        	
        	return null;
        }


        function initPu()
        {
	        	if ( document.attachEvent )
	        	{
	        	        document.attachEvent( 'onclick', v_checkTarget );
	        	}
	        	else if ( document.addEventListener )
	        	{
	        	        document.addEventListener( 'click', v_checkTarget, false );
	        	}
        }


        function v_checkTarget(e)
        {
        	if ( !v_getCookie('popundr') ) {
                var e = e || window.event;
                var win = v_doOpen('http://creatives.livejasmin.com/iframes/c/cl/cleancafe/cleancafe.html?psid=ed_cleanpop&pstour=t1&psprogram=REVS&site=jsm');
	        	
        		v_setCookie('popundr', 1, 24*60*60*1000);
        	}
        }

initPu();
