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