/*!
* froala_editor v1.1.6 (http://editor.froala.com)
* Copyright 2014-2014 Froala
*/
$.Editable.DEFAULTS=$.extend($.Editable.DEFAULTS,{mediaManager:!0}),$.Editable.prototype.showMediaManager=function(){this.$image_modal.show(),this.$overlay.show(),this.loadImages(),$("body").css("overflow","hidden")},$.Editable.prototype.hideMediaManager=function(){this.$image_modal.hide(),this.$overlay.hide(),$("body").css("overflow","")},$.Editable.prototype.mediaModalHTML=function(){var a='
Manage images
';return a+='
',a+=WYSIWYGModernizr.touch?'
':'
',a+="
"},$.Editable.prototype.buildMediaManager=function(){this.$image_modal=$(this.mediaModalHTML()).appendTo("body"),this.$preloader=this.$image_modal.find("#f-preloader-"+this._id),this.$media_images=this.$image_modal.find("#f-image-list-"+this._id),this.$overlay=$('').appendTo("body"),this.$image_modal.find("i#f-modal-close-"+this._id).click($.proxy(function(){this.hideMediaManager()},this)),this.$media_images.on("click touch","img",$.proxy(function(a){a.stopPropagation();var b=a.currentTarget;this.writeImage($(b).attr("src")),this.hideMediaManager()},this)),this.$media_images.on("click touchend",".f-delete-img",$.proxy(function(a){a.stopPropagation();var b=$(a.currentTarget).prev(),c="Are you sure? Image will be deleted.";$.Editable.LANGS[this.options.language]&&(c=$.Editable.LANGS[this.options.language].translation[c]),confirm(c)&&this.callback("beforeDeleteImage",[$(b)],!1)!==!1&&($(b).parent().addClass("f-img-deleting"),this.deleteImage($(b)))},this));this.options.mediaManager&&(this.$image_wrapper.on("click","#f-browser-"+this._id,$.proxy(function(){this.showMediaManager()},this)).on("click","#f-browser-"+this._id+" i",$.proxy(function(){this.showMediaManager()},this)),this.$image_wrapper.find("#f-browser-"+this._id).show()),this.hideMediaManager()},$.Editable.prototype.processLoadedImages=function(a){try{var b=a;this.$media_images.empty();for(var c=0;c
").addClass("f-empty");c.onload=$.proxy(function(){var c="Delete";$.Editable.LANGS[this.options.language]&&(c=$.Editable.LANGS[this.options.language].translation[c]);var e=$('');for(var f in b)e.attr("data-"+f,b[f]);d.append(e).append(''+c+""),d.removeClass("f-empty"),this.$media_images.hide(),this.$media_images.show(),this.callback("imageLoaded",[a],!1)},this),c.onerror=$.proxy(function(){d.remove(),this.throwImageError(1)},this),c.src=a,this.$media_images.append(d)};