			
			function popurl(){
				closepopup();
				refferdata = getRefferer();
				window.open("http://www.affeurope.net/redirs/ccc/go.php?member=" + refferdata.member + "&profile=" + refferdata.profile);
			}
			
			function getRefferer(){
				values = {};
				if (exitsintCookie = $.cookie('banner_domainclick'))
				{
					values.member = exitsintCookie.split(',')[0];
					values.profile = exitsintCookie.split(',')[2];
				}
				else{
					values.member = 'exitrafpage';
					values.profile = refdefault.profile;
				}
				return values;
			}
			
			
			function closepopup(){
				$.unblockUI(); 
        $('#bonus').css('z-index' , '3000');
			}
			
			$(document).ready(function() { 
        
          $("#closebtn").click(function(){
            closepopup();
          });

			
				bodyWidth = $("body").width();
				bodyHeight = $("body").height();
				position = {}
				
				position.left = bodyWidth/2 - 300;
				if (exitsintCookie = $.cookie('banner_domainclick'))
				{
					member = exitsintCookie.split(',')[0];
					profile = exitsintCookie.split(',')[2];
				}
				else{
					member = 'exitrafpage';
				}
				
				enabled=1;
				if(!($.cookie('ShowPopup')) && enabled && (refurl.indexOf("cityclubcasino") == -1)){
					$.doTimeout( 30000, function(){
						$.cookie('ShowPopup', '1', { expires: 7 }); // set cookie 
						$('#bonus').css('z-index' , '999');
            
						$.blockUI ({
						 //message: $('#bgPopUp'), css : {  border: '0px', width: '395px', height: '205px', left: position.left+"px", cursor: 'auto', color: 'white'},
             message: $('#popup'), css : {  border: '0px', width: '598px', height: '500px', left: position.left+"px",top : '15%', cursor: 'auto', 'background-color' : 'transparent', 'z-index' : '4001'},
						 overlayCSS: { opacity:   0.7 },  fadeIn:  500, fadeOut:  500 } ); 
						 
						 
						
					
					});
				};
			});
			
			
			
		
		
		
