/*********************************************************************************************/

// This is only area you need to make changes in this file to set it for your needs



var script_address = "add_mail.html"; // address of php script which handles adding the entered mail adresses to database



//  To set the countdown timer's target change the values of below variables

var day     = 16;         //  target day

var month   = 9;          //  target month

var year    = 2010;       //  target year

var hour    = 17;         //  target hour

var minutes = 00;         //  target minutes 

var seconds = 00;         //  target seconds

/**********************************************************************************************/



$(document).ready(function(){

	

	$("#mail_address").focus( function(){ 

		if( ( $(this).val() == "Enter your email to subscribe" ) || ( $(this).val() == "Mail is not valid!" ) || ( $(this).val() == "Database Error" ) ){	$(this).val(""); }  } );

	

	$('li').mouseover(function(){ $(this).animate( { marginTop: '+=5px' },300); });

	$('li').mouseout(function()	{ $(this).animate( { marginTop: '-=5px' },300);	});

	

	$('#submit_link').click(function()

	{ 

		email = $("#mail_address").val();

		if(!check_mail(email)){	$("#mail_address").val("Mail is not valid!"); }

		else

		{

			$("#mail_address").val("Processing...");

			$.ajax({ type: 'POST', url: script_address, data: 'email=' + email, success: function(ajaxCevap){ $("#mail_address").val( ajaxCevap ); } });

		}

	});

	

	$(function () {

		var austDay = new Date();

		austDay = new Date(year, month - 1, day, hour, minutes, seconds );

		$('#count_down').countdown({until: austDay});

	});

});



var email = "contato@cristianogomes.net ";

var toggle_value = "open_about";

var koordinat_x;

var koordinat_y;



function check_mail( email ){ return (email.indexOf(".") > 2) && (email.indexOf("@") > 0); }



function toggle_about()

{

	if( toggle_value == "open_about" )

	{

		$("div#email").fadeOut("fast");

		$("div#count_down").fadeOut("fast");

		$("div#logo").animate( { height: '0px' },50 );

		$("div#about").fadeIn("fast");

		toggle_value = "close_about";

	}

	else

	{

		$("div#email").fadeIn("fast");

		$("div#count_down").fadeIn("fast");

		$("div#logo").animate( { height: '55px' },50 );

		$("div#about").fadeOut("fast");

		toggle_value = "open_about";

	}

}
