$(document).ready(function(e) {
  $("a.deleteJS").click(deleteClick);

  $('.jScale').hover(mouseover, mouseout).data('magnified', 0).each(function() {
      var self   = $(this);
      var offset = self.offset();
      var inner  = $('<img />')
         .attr('src', this.src.replace('tn', 'big'))
         .appendTo('body')
         .addClass('jScaleInner')
         .hide()
         .css({
            'position' : 'absolute',
            'top'      : offset.top,
            'left'     : offset.left - 260
          })
          .error(function(){ self.data('empty', true); })
      self.data('inner', inner);
  });

})

function deleteClick() {
  var msg = this.warning? this.warning : '¿Está seguro de querer borrar este registro?'
  if(confirm(msg)) {
    this.href += '/OK';
    return true
  }
  return false
}

function mouseover() {
  if (!$(this).data('empty')) $(this).data('inner').show()
}

function mouseout() {
  if (!$(this).data('empty')) $(this).data('inner').hide()
}

