$(document).ready(function()
{
	bottommarking();
	hovermarking();

	Cufon.replace('#menu #kaki .tagline span.first', { fontFamily: 'Bau-SuperItalic' });
	Cufon.replace('#menu #kaki .tagline span.second', { fontFamily: 'Bau-Regular' });
	Cufon.replace('#menu #kaki ul li', { fontFamily: 'Bau-SuperItalic', hover: 'true' });
	
	//Cufon.replace('div.kaki p', { fontFamily: 'Bau-Regular', hover: 'true' });
	Cufon.replace('div.kaki h4', { fontFamily: 'Bau-SuperItalic', hover: 'true' });
	//Cufon.replace('div.kaki h4 a', { fontFamily: 'Bau-SuperItalic', hover: 'true' });
	
	Cufon.replace('#menu #kika .tagline span.first', { fontFamily: 'CgPosterBodoni' });
	Cufon.replace('#menu #kika .tagline span.second', { fontFamily: 'BauerBodoni' });
	Cufon.replace('#menu #kika ul li', { fontFamily: 'CgPosterBodoni', hover: 'true' });
	
	//Cufon.replace('div.kika p', { fontFamily: 'BauerBodoni', hover: 'true' });
	Cufon.replace('div.kika h4', { fontFamily: 'CgPosterBodoni', hover: 'true' });
	//Cufon.replace('div.kika h4 a', { fontFamily: 'CgPosterBodoni', hover: 'true' });
	
	Cufon.replace('#menu #katering .tagline span.first', { fontFamily: 'American Typewriter BQ Bold' });
	Cufon.replace('#menu #katering .tagline span.second', { fontFamily: 'American Typewriter BQ' });
	Cufon.replace('#menu #katering ul li', { fontFamily: 'American Typewriter BQ Bold', hover: 'true' });
	
	//Cufon.replace('div.katering p', { fontFamily: 'American Typewriter BQ', hover: 'true' });
	Cufon.replace('div.katering h4', { fontFamily: 'American Typewriter BQ Bold', hover: 'true' });
	//Cufon.replace('div.katering h4 a', { fontFamily: 'American Typewriter BQ Bold', hover: 'true' });
});

function subscribing()
{
	var action = $('input[name="sradio"]:checked').val();
	var em = $('input[name="emaild"]').val();
	//var na = $('input[@name="named"]').val();
	
	//alert(action + ' ' + em);
	
	// customize the path
	$.post('/ndxz-site/plugin/plugin.ndxz_subscriber.php', { id : action, emaild : em }, 
		function(html) {
			$('p#notify').html(html);
	});
}

function bottommarking()
{
	var x = 45; // top position for #menu
	var y = 50; // distance from bottom of window
	var z = $('#menu .activated').height(); // natural height of window
	
	if ((x + z) > ($(window).height() - y))
	{
		// we do nothing
		$('#menu .activated').css({ 'height': '', 'border-bottom': 'none' });
	}
	else
	{
		// style and position the height of #menu .activated
		$('#menu .activated').css({ 'height': ($(window).height() - (x + y)), 'border-bottom': '3px solid #000' });
	}
}

function hovermarking()
{
	$('#hover-mark').css('top', ($(window).height() - 50));
}

$(window).resize(function(){ bottommarking(); hovermarking(); });
