﻿$(document).ready(function() 
{
	function PanelOpen ()
	{
		$("div#panel")	.animate ({height: "500px"})
						.animate ({height: "400px"}, "fast");
	}

	function PanelOpen (textColor)
	{
		$("div#panel")	.animate ({height: "500px"})
						.animate ({height: "400px"}, "fast");
		$("div#panel p").css ('color', "white");
	}
	
	function PanelClose ()
	{	$("div#panel").animate ({height: "0px"}, "fast");	}
	
	$("li.panel_button").click (function()
	{
		PanelOpen ();
		$("li.panel_button").toggle();
	});	
	
	$("li#hide_button").click(function()
	{	PanelClose ();	});
	
	/**
	 *	Action one a key in username textbox of login form
	**/
	$("#username").keyup(function()
	{	$("#Regusername").val ($(this).val());	});
	$("#username").keydown(function()
	{	$("#Regusername").val ($(this).val());	});
	
	/**
	 *	Plugin loginify to manage action on input from form
	**/
	var Options =
	{
		DebugLevel : 0,
		YLength :	 8,
		PicturesPath :	"./images/",
		Titles :	["Vous ne possédez pas encore de compte sur le site",
					 "Ces données nous seront utiles pour vous contacter et mieux vous connaître :"]
	};
	//$("#login").Loginify	(Options);
	$("#register").Loginify	(Options);
	
	$.datepicker.setDefaults ({dateFormat:"dd.mm.yy"});
	$("#Birthdate").datepicker ();
});
