/**
 * common.js
 *
 * @author    Inomata <inomata@crossnet.co.jp>
 * @pachage   Wedding
 * @see       jquery-1.3.2.js
 * @copyright JOYJOY Inc. & Gourmet Navigator Inc.
 * @version   $Id: common.js 00 2009-2-19 03:54:06Z inomata $
 */

/**
 * 送信処理
 *
 */
jQuery.fn.extend({
  doSubmit: function(act) {
    var form = $("#f1");
    form.attr("action", form.attr("action") + act);
    form.submit();
    return this;
  },
  
  oneTimeSubmit: function(act) {
    this.doSubmit(act);
    $(this).attr("disabled", "disabled");
    return this;
  },
  
  setDeleteFlag: function(hdnId) {
    var hidden = $("#"+hdnId);
    var hiddenValue = hidden.val();
    
    if(hiddenValue == 0){
        hidden.val(1);
        $(this).val("取り消す");
    }else{
        hidden.val(0);
        $(this).val("この画像を削除");
    }
    
    return this;
  }
  
});


