// Used to switch between the image upload forms
function show_hide_image_upload_forms(checkbox, image_field_prefix){
  var image_library = image_field_prefix + 'image_library';
  var image_upload = image_field_prefix + 'image_upload';
  
  if (checkbox.value == 'user' && $(image_upload).style.display=='none') {
    new Effect.BlindUp(image_library,{duration:0.5, scope: 'whatever', limit:2}); 
    new Effect.BlindDown(image_upload,{duration:0.5, scope: 'whatever', limit:2}); 
    new Effect.Highlight(image_upload,{duration:2});
  }
  if (checkbox.value == 'lib' &&  $(image_library).style.display=='none'){
    new Effect.BlindDown(image_library,{duration:0.5, scope: 'whatever', limit:2}); 
    new Effect.BlindUp(image_upload,{duration:0.5, scope: 'whatever', limit:2});
    new Effect.Highlight(image_library,{duration:2});
  }
}


// Recipe edit page
function toggle_two_column_ingredient_list(two_column) {
  if (two_column) {
    $('recipe_ingredient_list').style.width = '170px';
    $('recipe_ingredient_list_2').style.display = 'inline';
  } else {
    $('recipe_ingredient_list').style.width = '350px';
    $('recipe_ingredient_list_2').style.display = 'none';
  }
}