var custom_uploader_hami;
function cahnge_image(id) {
    custom_uploader_hami = wp.media.frames.custom_uploader_hami = wp.media({
        title: 'انتخاب تصویر اسلایدر',
        library: {type: 'image'},
        button: {text: 'انتخاب'},
        multiple: false
    });
    custom_uploader_hami.on('select', function() {
        attachment = custom_uploader_hami.state().get('selection').first().toJSON();
        if(id == 0) id = "";
        jQuery('#txt_url_item_hami' + id).val(attachment.url);
        url_image = attachment.url;
        jQuery("#btn_sel_pic_banner" + id).attr('src' , url_image);
    });
    custom_uploader_hami.open();
}