// JavaScript Document

$(document).ready(function(){	// ========== Title ==================
		$("#Title-help-content").hide();				   
		$("#btn-title-help").click(function(){
		$("#Title-help-content").slideDown();	
	return false;
	  });
 });

$(document).ready(function(){	// hide title help
	$("#Title-help-content").click(function(){
	$("#Title-help-content").slideUp("slow");
	return false;
		 });
});


$(document).ready(function(){	// ========== Ingredients ==================
		$("#Ingredients-help-content").hide();				   
		$("#btn-Ingredients-help").click(function(){
		$("#Ingredients-help-content").slideDown("slow");	
	return false;
	  });
 });

$(document).ready(function(){	// hide title help
	$("#Ingredients-help-content").click(function(){
	$("#Ingredients-help-content").slideUp("slow");
	return false;
		 });
});



$(document).ready(function(){	// ========== Servings ==================
		$("#Serving-help-content").hide();				   
		$("#btn-Serving-help").click(function(){
		$("#Serving-help-content").slideDown("slow");	
	return false;
	  });
 });

$(document).ready(function(){	// hide title help
	$("#Serving-help-content").click(function(){
	$("#Serving-help-content").slideUp("slow");
	return false;
		 });
});


$(document).ready(function(){	// ========== Method ==================
		$("#Method-help-content").hide();				   
		$("#btn-Method-help").click(function(){
		$("#Method-help-content").slideDown("slow");	
	return false;
	  });
 });

$(document).ready(function(){	// hide title help
	$("#Method-help-content").click(function(){
	$("#Method-help-content").slideUp("slow");
	return false;
		 });
});


$(document).ready(function(){	// ========== Preperation ==================
		$("#Preperation-help-content").hide();				   
		$("#btn-preperation-help").click(function(){
		$("#Preperation-help-content").slideDown("slow");	
	return false;
	  });
 });

$(document).ready(function(){	// hide title help
	$("#Preperation-help-content").click(function(){
	$("#Preperation-help-content").slideUp("slow");
	return false;
		 });
});


$(document).ready(function(){	// ========== Cooking time ==================
		$("#Cooking-time-content").hide();				   
		$("#btn-cooking-help").click(function(){
		$("#Cooking-time-content").slideDown("slow");	
	return false;
	  });
 });

$(document).ready(function(){	// hide title help
	$("#Cooking-time-content").click(function(){
	$("#Cooking-time-content").slideUp("slow");
	return false;
		 });
});


$(document).ready(function(){	// ========== Summary ==================
		$("#Help-Content").hide();				   
		$("#btn-summary_help").click(function(){
		$("#Help-Content").slideDown("slow");	
	return false;
	  });
 });

$(document).ready(function(){	// hide summary help
	$("#Help-Content").click(function(){
	$("#Help-Content").slideUp("slow");
	return false;
		 });
});

$(document).ready(function(){	// ========== Categories ==================
		$("#Category-help-content").hide();				   
		$("#btn-categories-help").click(function(){
		$("#Category-help-content").slideDown("slow");	
	return false;
	  });
});

$(document).ready(function(){	// hide summary help
	$("#Category-help-content").click(function(){
	$("#Category-help-content").slideUp("slow");
	return false;
		 });
});


$(document).ready(function(){	// ========== suitable for ==================
		$("#quick-bake-comment").hide();				   
		$("#btn-quick-bakes-comment").click(function(){
		$("#quick-bake-comment").slideDown("slow");	
	return false;
	  });
});

$(document).ready(function(){	// hide summary help
	$("#quick-bake-comment").click(function(){
	$("#quick-bake-comment").slideUp("slow");
	return false;
		 });
});








function addFormField() {	//adds Ingredients fields
	var id = document.getElementById("id").value;
	$("ul#submit-ingredients-list li.hidden").before("<li id='Ingredient" + id + "'><input type='text' class='txt' name='ingredients[]' id='txt" + id + "'>&nbsp;&nbsp &nbsp;&nbsp<a href='#' class='remove' onClick='removeFormField(\"#Ingredient" + id + "\"); return false;'>Remove</a></li>");
	
	id = (id - 1) + 2;
	document.getElementById("id").value = id;
}

function removeFormField(id) { 	//deletes Ingredient fields
	$(id).remove();
}




$(document).ready(function(){	// clear the default value of the home search box
	$("#search-box").focus(function(){						   
	this.value = ''
	 });
 });




$(document).ready(function(){	// hide javascript warning message 		   
	 $("div#warning").hide();
});





//$(document).ready(function(){	//Adds field on the Ingredients list
//var id = document.getElementById("id").value;
//$("#Btn-Add-Ingredients").click(function(){
//$("#submit-ingredients-list li.last").before("<li id='" + id + "'><input type='text' name='Ingredients' class='txt' /><input type='image' src='Images/btn_delete.gif' id='btn_delete' width='18' height='18' class='mar-left-10' /></li>");
//id = (id - 1) + 2;
//document.getElementById("id").value = id;
//		return false;
//	});
//
//});


//$(document).ready(function(){	//removes fields on the Ingredients list
//$("#btn_delete").click(function(){
//	$(id).remove();
//	return false;
//	});
// });
