window.wp=window.wp||{};(function(g){var c,b,a,h,f,e=["standard","chat","status","aside","gallery"];function d(i){c.get(0).className=c.get(0).className.replace(/\bwp-format-[^ ]+/,"");c.addClass("wp-format-"+i)}g(function(){var i=g(".post-formats-fields");g(".post-format-options").on("click","a",function(p){p.preventDefault();var o=g(this),l,j,k=o.parent(),n=o.data("wp-format"),m=g(".post-format-description");if(typeof c==="undefined"){c=g("#post-body-content")}if(n===postFormats.currentPostFormat){return}k.find("a.active").removeClass("active");o.addClass("active");g("#icon-edit").removeClass(postFormats.currentPostFormat).addClass(n);g("#post_format").val(n);if(-1600){p=600}s+=' width="'+p+'"'}if(v.height){r=v.height;if(v.width&&p<'+u+s+' class="wp-'+u+'-shortcode" controls="controls" preload="none">");g(".wp-"+u+"-shortcode").mediaelementplayer()};b.on("select",function(){var p=b.state().get("selection").first().toJSON();if(0===p.mime.indexOf("audio")){k.val(p.url);f(p)}else{if(0===p.mime.indexOf("video")){p.src=p.url;k.val(wp.shortcode.string({tag:"video",attrs:_.pick(p,"src","width","height")}));f(p)}else{k.val(p.id);j.html('');n.removeClass("empty").show()}}});b.open()})})})(jQuery);