// Load Recipe List
//
	var image_path = "../images/recipe/";

	var current_on = 0;
	
	function swapImage(recipe_image){
		$("#recipe_image").attr( "src", image_path+recipe_image );
	}
	function restoreDefaultImage(){
		$("#recipe_image").attr( "src", image_path+default_image );		
	}
	
	function displayRecipe(recipe_id, recipe_image, recipe_name){
		// swap default image 
		// load recipe
		// set title class to selected and unselect previous

		//alert("here1: "+recipe_id);
		str = "request_type=recipe_content&recipe_id="+recipe_id;
		if(current_on){
			$("#recipe_title"+current_on).removeClass('selected');
    	}
	    $("#recipe_title"+recipe_id).addClass('selected');
        current_on = recipe_id;
		if(recipe_image != ""){
			$("#recipe_image").attr( "src", image_path+recipe_image );
			$("#recipe_image").attr( "alt", recipe_name );
			$("#recipe_image").attr( "title", recipe_name );			
			default_image = recipe_image;
		}
		
		LoadRecipeContent(str, 'recipe_content', recipe_id);
	}
	
	function LoadRecipeContent(str, event_type, category_name, category_id){
		//need to append string for page_id and security information
		
		submit_str = str +"&group_member="+GROUP_MEMBER;
		//alert("here"+submit_str);
		switch(event_type){
			case 'recipe_content':{
				$("#recipe_content").hide("fast");
				break;
			}
		}
		$.ajax({
			method: "get",url: "../ajax/recipe_content.php",data: submit_str,
			beforeSend: function(){
				switch(event_type){
					case 'recipe_content':{
						$("#loading_recipe").show("fast");
						break;
					}
				}
			}, //show loading just when link is clicked
			complete: function(){ 
				switch(event_type){
					case 'recipe_content':{
						$("#loading_recipe").hide("fast");
						break;
					}
				}
			}, //stop showing loading when the process is complete
			success: function(html){ //so, if data is retrieved, store it in html
				switch(event_type){
					case 'recipe_content':{
						if(html != ""){
							$("#recipe_content").html(html);
							$("#recipe_content").show("fast");
						}
						break;
					}
				}
			}
		});
	}