var f_bottom_reposition = function() {
  if (!j.support.opacity) {
    j('#footer').css({'position': 'absolute', 'bottom': 1});
    j('#footer').css({'position': 'absolute', 'bottom': 0});
  }
};

var searchExecute = function(event) {
  if (j('#side-search-box')) {
    var form_vars = j('#side-search-box > form').serializeArray();
    form_vars.each(
      function(o_input) {
        if (o_input.name == 'form_name') {
          return true;
        }
        var input = j('<input />', {
          type: 'hidden',
          name: o_input.name,
          value: o_input.value
        });
        j('form#header-search-form').append(input);
      }
    );
  }
}

j(
  function(event) {
    // {{{ 商品検索 - Induce テキスト
    j('#search-box input[name="words"]').induce('商品の検索');
    // }}}

    // {{{ 商品検索 - 検索ボタンクリック
    j('form#header-search-form').submit(searchExecute);
    j('.button-search-execute').click(
      function(e) {
        j('form#header-search-form').submit();
        return false;
      }
    );
    // }}}

    // {{{ 年末年始営業案内
    j('#closing-info p.closing-txt a').live(
      'click'
      , function (event) {
        event.preventDefault();
        j('#closing-info div.holiday-calender').slideDown('blind');
      }
    );
    j('#closing-info div.holiday-calender p.close a').live(
      'click'
      , function (event) {
        event.preventDefault();
        j('#closing-info div.holiday-calender').slideUp('blind');
      }
    );
    // }}}

    j('#button-image-header-search-execute').switchImage();
  }
);

