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(-1<'+r+' class="wp-'+r+'-shortcode" controls="controls" preload="none">");g(".wp-"+r+"-shortcode").mediaelementplayer()};b.on("select",function(){var r=b.state().get("selection").first(),q,p,s;s=r.get("id");p=r.get("url");q=r.get("mime");if(0===q.indexOf("audio")){k.val(p);f("audio",p,q)}else{if(0===q.indexOf("video")){k.val(p);f("video",p,q)}else{k.val(s);j.html('');n.removeClass("empty").show()}}});b.open()})})})(jQuery);