$(function()
{
	
	/*$('#add_new_date').click(function()					// switch between views: save notifications, add new event
	{
		$('#change_notification_box').hide();
		$('#add_new_date_box').show();
	});
	
	$('#back_to_change_notification').click(function()
	{
		$('#add_new_date_box').hide();
		$('#change_notification_box').show();
	});*/
	


	$('#notify_ovulation_check').click(function()		// displaying inputs for 'daysbefore', if related 
	{													// checbox is checked
		$('#notify_ovulation_input').toggle();
	});
	$('#notify_pms_check').click(function()
	{
		$('#notify_pms_input').toggle();
	});
	$('#notify_menstruation_check').click(function()
	{
		$('#notify_menstruation_input').toggle();
	});
	$('#notify_birthday_check').click(function()
	{
		$('#notify_birthday_input').toggle();
	});
	$('#notify_nameday_check').click(function()
	{
		$('#notify_nameday_input').toggle();
	});
	
	$('#multi_day_event').click(function()
	{
		toggleDP();
	});
 	$('#e_multi_day_event').click(function()
	{
		toggleDP2();
	});
});

function toggleDP()
{
	$('#date_end_selector').toggle();
	$('#alert_date_label').toggle();
	$('#alert_date_start_label').toggle();
	$('#notify_at_event_selector').toggle();
}
function toggleDP2()
{
	$('#e_date_end_selector').toggle();
	$('#e_alert_date_label').toggle();
	$('#e_alert_date_start_label').toggle();
	$('#e_notify_at_event_selector').toggle();
}
$(document).ready(function() {
	var obj = $("#multi_day_event")
	var check = obj.attr("checked");
	var obj2 = $("#e_multi_day_event")
	var check2 = obj2.attr("checked");	
	
	if(check == true)
	{
		obj.parent().parent().addClass("highlighted");
		toggleDP();
	}
	else
	{
		obj.parent().parent().removeClass("highlighted");
	}

});

