<?php
/*
Plugin Name:  Exit Pop Up Review Themes
Plugin URI: http://www.UltimateReviewThemes.com/
Description: Exit Pop Up Review Themes
Author: Ultimate Review Themes
Author URI: http://www.UltimateReviewThemes.com/
Version: 1.0
*/

if (is_admin()) :

else :
	wp_register_script('jquerycookie',get_bloginfo('template_url').'/plugins/exit-popup/jquery.cookie.js', array('jquery'), '2');
	wp_enqueue_script('jquery');
	wp_enqueue_script('jquerycookie');
	
	add_action('wp_footer', 'exitpopup_code');
	
endif;

function exitpopup_code() 
{
	$activate	= reviewSiteGetOption("exit-popup_activate");
	$redirect	= reviewSiteGetOption("exit-popup_redirect");
	$message	= reviewSiteGetOption("exit-popup_message");
	
	if($activate == 'yes') :

	?>

	<script type="text/javascript" language="javascript1.2">
		var exitsplashpage 		= '<?php echo $redirect; ?>';
		var exitsplashmessage 	= '<?php echo strip_tags($message); ?>';
	</script>

	<script type='text/javascript' src='<?php bloginfo('template_url');?>/plugins/exit-popup/exitSplash.js?v=2' language="javascript1.2"></script>

	<div id="jq-popup" style="display:none; width: 25%; background-color:#fff;">
		<div class="pClose"></div>	
		<p>test</p>
	</div>
    
	<?php
	
	endif;

}
?>