(function(){var e=wp.media.view.Settings.AttachmentDisplay;wp.media.view.Settings.AttachmentDisplay=wp.media.view.Settings.AttachmentDisplay.extend({updateLinkTo:function(){var e=this.model.get("link"),i=this.options.attachment,t=this.$(".alignment"),a=this.$(".link-to"),s=this.$(".size"),n=this.$(".link-to-custom");var l="other";var r=i.get("type")+"/"+i.get("subtype");for(var d in media_library_organizer_defaults.file_types){if(media_library_organizer_defaults.file_types[d].indexOf(r)>-1){l=d;break}}var _={alignment:media_library_organizer_defaults.settings[l+"_attachment_display_alignment"],link_to:media_library_organizer_defaults.settings[l+"_attachment_display_link_to"],size:media_library_organizer_defaults.settings[l+"_attachment_display_size"]};t.val(_.alignment);a.val(_.link_to);s.val(_.size);if("none"===e||"embed"===e||!i&&"custom"!==e){n.addClass("hidden");return}if(i){if("post"===e){n.val(i.get("link"))}else if("file"===e){n.val(i.get("url"))}else if(!this.model.get("linkUrl")){n.val("http://")}n.prop("readonly","custom"!==e)}n.removeClass("hidden");if(!wp.media.isTouchDevice&&n.is(":visible")){n.focus()[0].select()}}})})(jQuery,_);