<?php
/*
Plugin Name: Happy New Year
Plugin URI: https://www.melihguney.com/wordpress-happy-new-year-plugin.html
Description: This plugin will create a good skin in your wordpress blog.
Version: 5.0
Author: Melih Guney
Author URI: https://www.melihguney.com/
License: GPLv2 (or later)
*/ 
function happynewyear() { 

/*  Path for snow */
	$snowPath = get_option('siteurl').'/wp-content/plugins/happy-new-year/';
	$snowJS = "\n".'<script type="text/javascript"> sitePath = "'.$snowPath.'"; </script>'."\n";
	$snowJS .= '<script type="text/javascript" src="'.$snowPath.'jquery.js"></script>'."\n";
	$snowJS .= '<script type="text/javascript" src="'.$snowPath.'newyear.js"></script>'."\n";
	$snowJS .= '<script type="text/javascript" src="'.$snowPath.'snow.js"></script>'."\n";
	print($snowJS);
?>

	<!-- Happy New Year Plugin Start -->
	
	<style type="text/css">
		<!--
		.govde { width:100%;}
		.solust { width:272px; height:283px; position:fixed; top:0; left:0; background:url('<?php echo  plugins_url('leftimg.png', __FILE__); ?>') no-repeat top left; z-index:1; }
		.sagust { width:281px; height:268px; position:fixed; top:0; right:0; background:url('<?php echo  plugins_url('rightimg.png', __FILE__); ?>') no-repeat top left; z-index:1; }
		.orta { display:block; width:500px; height:201px; position:fixed; top:0px; left:50%; margin-left:-250px; background:url('<?php echo  plugins_url('centerimg.png', __FILE__); ?>') no-repeat top left; z-index:70; overflow:hidden; cursor:pointer; }
		.orta span { display:block; width:100%; font-family:'Lobster Two'; text-align:center; }
		.orta .day { font-size:26px; font-weight:bold; color:#383131; padding-top:10px; }
		.orta .time { font-size:37px; font-weight:400; color:#d21027; padding-top:15px; }
		.red { color:#c43042; font-weight:bold; text-decoration:none; }
		-->
	</style>
	
	<div class="govde">
        <div onmouseover="document.getElementById('beep-one').play()" onMouseOut="document.getElementById('beep-one').pause()" alt="Happy New Year" border="0" usemap="#happynewyear" class="solust"></div>
        <div onmouseover="document.getElementById('beep-one').play()" onMouseOut="document.getElementById('beep-one').pause()" alt="Happy New Year" border="0" usemap="#happynewyear" class="sagust"></div>
        <div onmouseover="document.getElementById('beep-one').play()" onMouseOut="document.getElementById('beep-one').pause()" alt="Happy New Year" border="0" usemap="#happynewyear" id="cntdwn" class="orta"></div>
    </div>
	
    <script type="text/javascript" language="javascript">
    // <![CDATA[
        TargetDate = "01/01/2017 00:00 AM";
        BackColor = "transparent";
        ForeColor = "navy";
        CountActive = true;
        CountStepper = -1;
        LeadingZero = true;
        DisplayFormat = '<span class="day">Last %%D%% Days</span> <span class="time">%%H%%:%%M%%:%%S%%</span>';
        FinishMessage = '<span class="red">Happy New Year!</span> <span class="red">Welcome 2017!</span>';
        // ]]>
    </script>
    <script type="text/javascript" src="<?php echo  plugins_url('time.js', __FILE__); ?>"></script>
	
	
	<audio style="display:none;" id="beep-one" controls="controls" preload="auto">
		<source src="<?php echo  plugins_url('happynewyear.mp3', __FILE__); ?>"></source>
	</audio>
	
<!-- Happy New Year Plugin End -->

<?php }
add_action(wp_head, 'happynewyear');
?>