/*!
* froala_editor v1.2.4 (http://editor.froala.com)
* Copyright 2014-2014 Froala
*/
!function(a){a.Editable.DEFAULTS=a.extend(a.Editable.DEFAULTS,{mediaManager:!0,imagesLoadURL:"http://i.froala.com/images",imagesLoadParams:{}}),a.Editable.prototype.showMediaManager=function(){this.$image_modal.show(),this.$overlay.show(),this.loadImages(),a("body").css("overflow","hidden")},a.Editable.prototype.hideMediaManager=function(){this.$image_modal.hide(),this.$overlay.hide(),a("body").css("overflow","")},a.Editable.prototype.mediaModalHTML=function(){var a='
').appendTo("body"),this.$overlay.on("mouseup",a.proxy(function(a){this.isResizing()||a.stopPropagation()},this)),this.$image_modal.on("mouseup",a.proxy(function(a){this.isResizing()||a.stopPropagation()},this)),this.$image_modal.find("i#f-modal-close-"+this._id).click(a.proxy(function(){this.hideMediaManager()},this)),this.$media_images.on(this.mouseup,"img",a.proxy(function(b){b.stopPropagation();var c=b.currentTarget;this.writeImage(a(c).attr("src")),this.hideMediaManager()},this)),this.$media_images.on(this.mouseup,".f-delete-img",a.proxy(function(b){b.stopPropagation();var c=a(b.currentTarget).prev(),d="Are you sure? Image will be deleted.";a.Editable.LANGS[this.options.language]&&(d=a.Editable.LANGS[this.options.language].translation[d]),confirm(d)&&this.triggerEvent("beforeDeleteImage",[a(c)],!1)!==!1&&(a(c).parent().addClass("f-img-deleting"),this.deleteImage(a(c)))},this)),this.options.mediaManager&&(this.$image_wrapper.on("click","#f-browser-"+this._id,a.proxy(function(){this.showMediaManager()},this)).on("click","#f-browser-"+this._id+" i",a.proxy(function(){this.showMediaManager()},this)),this.$image_wrapper.find("#f-browser-"+this._id).show()),this.hideMediaManager()},a.Editable.prototype.destroyMediaManager=function(){this.hideMediaManager(),this.$overlay.html("").removeData().remove(),this.$image_modal.html("").removeData().remove()},a.Editable.prototype.initMediaManager=function(){return this.options.mediaManager?(this.buildMediaManager(),void this.addListener("destroy",this.destroyMediaManager)):!1},a.Editable.initializers.push(a.Editable.prototype.initMediaManager),a.Editable.prototype.processLoadedImages=function(a){try{if(a.error)this.throwImagesLoadErrorWithMessage(a.error);else{this.$media_images.empty();for(var b=0;b
").addClass("f-empty");d.onload=a.proxy(function(){var d="Delete";a.Editable.LANGS[this.options.language]&&(d=a.Editable.LANGS[this.options.language].translation[d]);var f=a('');for(var g in c)f.attr("data-"+g,c[g]);e.append(f).append(''+d+""),e.removeClass("f-empty"),this.$media_images.hide(),this.$media_images.show(),this.triggerEvent("imageLoaded",[b],!1)},this),d.onerror=a.proxy(function(){e.remove(),this.throwLoadImagesError(1)},this),d.src=b,this.$media_images.append(e)}}(jQuery);