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

if (!!window.jQuery && !!window.jQuery.yuga) {
  jQuery.yuga.externalLink = function() {};
}

function enable_form(id) {
  Form.enable(id);
  var indicator = $(id + '_indicator');
  if (!!indicator) { indicator.hide(); }
}

function disable_form(id) {
  Form.disable(id);
  var indicator = $(id + '_indicator');
  if (!!indicator) { indicator.show(); }
}

function jump(node) {
  if (node) {
    if (node.getAttribute('target')) {
      window.open('/jump/?' + encodeURIComponent(node.getAttribute('href')), node.getAttribute('target'));
    } else {
      window.location.href = '/jump/?' + encodeURIComponent(node.getAttribute('href'));
    }
  }
  return false;
}
