File: /home/bt667/public_html/wp-content/plugins/schema/assets/js/admin.min.js
jQuery(document).ready(function(a){a(".schema-wp-help-tip").tooltip({content:function(){return a(this).prop("title")},tooltipClass:"schema-wp-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}});var b=a(".schema_wp_datepicker");if(b.length>0){var c="mm/dd/yy";b.datepicker({dateFormat:c})}var d={init:function(){this.general()},general:function(){var b=a(".schema-wp-color-picker");if(b.length&&b.wpColorPicker(),"undefined"==typeof wp||"1"!==schema_wp_vars.new_media_ui){var c=a(".schema_wp_settings_upload_button");c.length>0&&(window.formfield="",a(document.body).on("click",c,function(b){b.preventDefault(),window.formfield=a(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(schema_wp_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(schema_wp_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.schema_wp_send_to_editor=window.send_to_editor,window.send_to_editor=function(b){window.formfield?(imgurl=a("a","<div>"+b+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.schema_wp_send_to_editor(b),window.send_to_editor=window.schema_wp_send_to_editor,window.formfield="",window.imagefield=!1})}else{var d;window.formfield="",a(document.body).on("click",".schema_wp_settings_upload_button",function(b){b.preventDefault();a(this);return window.formfield=a(this).parent().prev(),d?void d.open():(d=wp.media.frames.file_frame=wp.media({frame:"post",title:"Choose Image",multiple:!1,library:{type:"image"},button:{text:"Use Image"}}),d.on("menu:render:default",function(a){var b={};a.unset("library-separator"),a.unset("gallery"),a.unset("featured-image"),a.unset("embed"),a.set(b)}),d.on("insert",function(){var b=d.state().get("selection");b.each(function(b,c){b=b.toJSON(),window.formfield.val(b.url);var d=a("<img />");d.attr("src",b.url),a("#preview_image").empty().append(d),a("#preview_image img")&&a("#preview_image").show()})}),void d.open())});var d;window.formfield=""}}};d.init()});