text: var video_id=!1;$(document).ready(function(){$("#fvButton").on("click",function(e){e.preventDefault()}),$("#video_url").on("keypress",function(e){13===e.which&&(e.preventDefault(),$("#video_url").blur())}),$("#video_url").on("focusout",function(e){if(""!=$(this).val()){$("#video_url").attr("disabled",!0);var i=urlParser.parse($("#video_url").val());i?(video_id=i.id,$("#video_preview").html('<span class="help-block">Processing Video... <i class="fa fa-spinner"></i></span>'),$("#video_provider").val(i.provider),$("#video_id").val(i.id),$("#fv_group").removeClass("has-error"),"youtube"===i.provider?($("#video_preview").html('<div class="video-container"><iframe src="https://www.youtube.com/embed/'+i.id+'" frameborder="0" allowfullscreen></iframe></div>'),$(".blog-del-video").show(),$(".youtube-image").show()):"vimeo"===i.provider?($(".blog-del-video").show(),$("#video_preview").html('<div class="video-container"><iframe src="https://player.vimeo.com/video/'+i.id+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen></iframe></div>')):($("#video_preview").html('<span class="help-block">That is not a supported video provider.</span>'),$("#fv_group").addClass("has-error"))):($("#video_preview").html('<span class="help-block">That is not a valid video url.</span>'),$("#fv_group").addClass("has-error")),$("#video_url").val(""),$("#video_url").attr("disabled",!1)}}),$("#status").bootstrapToggle({on:"Published",off:"Draft",width:"100%"}),$("#tags").select2({tags:!0,width:"100%"}),$("#category").select2({tags:!0,width:"100%"}),""!==$("#video_id").val()?($(".blog-del-video").show(),"youtube"==$("#video_provider").val()&&$(".youtube-image").show()):($(".youtube-image").show(),$(".blog-del-video").hide(),"youtube"==$("#video_provider").val()&&$(".youtube-image").hide())}),$(document).on("click",".upload-featured-local",function(){DappurMedia.loadMedia("blog_featured",null)}),$(document).on("click",".youtube-image",function(){video_id&&($("#featured_image").val("https://i1.ytimg.com/vi/"+video_id+"/maxresdefault.jpg"),$("#featured_thumbnail").html('<img src="https://i1.ytimg.com/vi/'+video_id+'/maxresdefault.jpg" class="img-responsive" alt="Featured Image" style="width: 100%;">'),$("#featured_thumbnail").attr("delete-token",""))}),$(document).on("click",".blog-del-video",function(){$("#video_id").val(""),$("#video_preview").html(""),$("#video_url").html(""),$(".blog-del-video").hide(),$(".youtube-image").hide()});