!function(t){"use strict";var o=["#ot-post-format-aside","#ot-post-format-audio","#ot-post-format-chat","#ot-post-format-gallery","#ot-post-format-image","#ot-post-format-link","#ot-post-format-quote","#ot-post-format-status","#ot-post-format-video"].join(","),i="postimagediv-placeholder",s=function(o,i){this.$element=t(o).on("click.postformats.data-api",t.proxy(this.toggle,this)),this.$id=this.$element.attr("id"),this.init()};s.prototype={constructor:s,init:function(){t("#ot-"+this.$id).insertAfter(t("#titlediv")).hide(),this.$element.is(":checked")&&this.show()},toggle:function(){t(o).each(function(){t(this).hide()}),this.show()},show:function(){"post-format-image"==this.$id?0==t("#"+i).length&&t("#postimagediv").after('<div id="'+i+'"></div>').insertAfter("#titlediv").css({marginTop:"20px",marginBottom:"0px"}).find("h3 span").text(option_tree.with):(t("#"+i).replaceWith(t("#postimagediv").css({marginTop:"0px",marginBottom:"20px"})),t("#postimagediv").find("h3 span").text(option_tree.replace)),t("#ot-"+this.$id).css({marginTop:"20px",marginBottom:"0px"}).show()}};var a=t.fn.postformats;t.fn.postformats=function(o){return this.each(function(){var i=t(this),a=i.data("postformats"),n="object"==typeof o&&o;a||i.data("postformats",a=new s(this,n)),"string"==typeof o&&a[o]()})},t.fn.postformats.Constructor=s,t.fn.postformats.noConflict=function(){return t.fn.postformats=a,this},t(document).on("ready.postformats.data-api",function(){t("input.post-format").each(function(){t(this).postformats()})})}(window.jQuery);
