// カテゴリの選択
function change_category(this_id, category){
    if( this_id == "f_cat" ){
        target_select = j$("#s_cat");
        target_select.html('<option value="">全て</option>');
        j$("#t_cat").html('<option value="">全て</option>');
    }else if( this_id == "f_cat_for_all" ){
        target_select = j$("#s_cat_for_all");
        target_select.html('<option value="">全て</option>');
        j$("#t_cat_for_all").html('<option value="">全て</option>');
    }else if( this_id == "s_cat"){
        target_select = j$("#t_cat");
        target_select.html('<option value="">全て</option>');
    }else if( this_id == "s_cat_for_all"){
        target_select = j$("#t_cat_for_all");
        target_select.html('<option value="">全て</option>');
    }else{
        return;
    }
    if( !category ){
        return;
    }
    var url = '/shop/item/search/select_category_options/' + category + ';json';
    j$.getJSON(url,
              function(data){
                  var category_list = data;
                  for( var i = 0; i < category_list.length; i++){
                      target_select.append(j$('<option>').attr({ value: category_list[i]["id"] }).text(category_list[i]["name"]));
                  }
               });
}

function open_detail_search(){
    j$('.search_field').each(function(){
            if( this.style.display == "none" ){
                this.style.display = "";
            }
        });
    j$('#display_more').css("display", "none");
};

