// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

$(function() {
});


var scrapEditorToolbarConfig = [
  ['Source','DocProps','-','Save','Preview'],
  ['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck'],
  ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
  ['Button','ImageButton'],
  '/',
  ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
  ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
  ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
  ['Link','Unlink','Anchor'],
  ['Image','Table','Rule','Smiley','SpecialChar','PageBreak'],
  '/',
  ['Style','FontFormat','FontName','FontSize'],
  ['TextColor','BGColor'],
  ['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
];

function togglePresidentsMessageEditor() {
  $('.presidents-message-scrap-body').toggle();
  $('.presidents-message-scrap-editor').toggle();
}


$(function() {
  $('.email-link').attr('href', "#");
  $('.email-link').click(function() {
    var toemail = $(this).html();
    $('#emailer').show();
    $('#quick-email-to-email').val(toemail);
  });
});


function deleteStateQuickLink(state_quick_link_id, state_content_page_id) {
  $.ajax({
    url: '/state_quick_links/' + state_quick_link_id + "?state_content_page_id=" + state_content_page_id,
    type: "DELETE",
    success: function(msg) {
      window.location.reload();
    }
  });
}