!function(window){var_cb=function(){if(this.baseurl=baseurl,this.imageurl="",this.page=this.baseurl+"/ajax.php",this.loading_img="<img style='vertical-align:middle' src='"+this.imageurl+"/ajax-loader.gif'>",this.loading=this.loading_img+" Loading...",this.download=0,this.total_size=0,this.cur_speed=0,this.status_refesh=1,this.result_page=this.baseurl+"/actions/file_results.php",this.download_page=this.baseurl+"/actions/file_downloader.php",this.count=0,this.hasLoaded=!1,this.perc_download=0,this.force_stop=!1,this.remoteObjID="",this.current_menu="",this.normal_player_html="",this.hq_player_html="",this.has_hq_function=!1,this.collectionID=!1,this.keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",this.ua=navigator.userAgent.toLowerCase(),this.ua.indexOf(" chrome/")>=0||this.ua.indexOf(" firefox/")>=0||this.ua.indexOf(" gecko/")>=0);else;this.setRemoteId=function(){this.remoteObjID=this.randomString()},this.Confirm_Delete=function(t){confirm("Are you sure you want to delete")&&(document.location=t)},this.Confirm_Uninstall=function(t){confirm("Are you sure you want to uninstall this plugin ?")&&(document.location=t)},this.confirm_it=function(t){vare=confirm(t);returne?!0:!1},this.reloadImage=function(t,e){img=document.getElementById(e),img.src=t+"?"+Math.random()},this.validate_category_form=function(thisform){with(thisform){if(0==validate_required(title,"Title must be filled out!"))returntitle.focus(),!1;if(0==validate_required(description,"Description must be filled out!"))returndescription.focus(),!1}},this.validate_ad_form=function(thisform){with(thisform){if(0==validate_required(name,"Name must be filled out!"))returnname.focus(),!1;if(0==validate_required(type,"Type must be filled out!"))returntype.focus(),!1;if(0==validate_required(syntax,"Syntax Must Be Filled Out"))returnsyntax.focus(),!1;if(0==validate_required(code,"Code Must Be Filled Out"))returncode.focus(),!1}},this.randomString=function(){for(vart="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",e=8,a="",o=0;e>o;o++){vari=Math.floor(Math.random()*t.length);a+=t.substring(i,i+1)}returna},this.check_remote_url=function(){vart=this,e=$("#remote_file_url").val(),a=$("#ytUploadBttn"),o=$("#remoteUploadBttn"),i=$("#remoteUploadBttnStop");if(this.force_stop=!1,e.match(/^e.g/)||"undefined"==typeofe||0===e.length)return$("#error_msgs").html('<div class="alert alert-danger" role="alert">Given URL is invalid!</div>'),!1;vars=function(t){"undefined"!=typeoft?(o.attr("disabled","disabled"),a.attr("disabled","disabled")):($(".downloadStatusContainer").removeClass("hidden"),o.attr("disabled","disabled").hide(),a.attr("disabled","disabled"),i.show())},n=function(t){"undefined"!=typeoft?(i.removeAttr("disabled").hide(),a.removeAttr("disabled"),o.removeAttr("disabled").show()):($(".downloadStatusContainer").addClass("hidden"),i.removeAttr("disabled").hide(),a.removeAttr("disabled"),o.removeAttr("disabled").show())};s();varl=$.ajax({url:t.download_page,type:"POST",data:{file:e,file_name:file_name},dataType:"JSON",beforeSend:function(){t.remoteUploadStatusUpdate();vara=t.getName(e);$("#loading").html("Downloading"),$("#remoteFileName").replaceWith('"'+a+'"')},success:function(e){if(t.force_stop=!0,e.error)returnt.force_stop=!0,n(),$("#error_msgs").html('<div class="alert alert-danger" role="alert"> File Type Not Allowed!</div>'),!1;n(),$("#loading").html("");vara=e.vid;$.post(t.baseurl+"/actions/getVideoDetails.php",{file_name:file_name,vid:a},function(t){vare=$("#updateVideoInfoForm").clone();$(e).find("input[name=title]").val(t.title),$(e).find("textarea#desc").val(t.description),$(e).find("input[name='category[]']:first").attr("checked","checked");varo=document.createElement("input");o.name="videoid",o.type="hidden",o.value=a;vari=document.createElement("input");i.name="file_name",i.type="hidden",i.value=file_name,$(e).append(o),$(e).append(i),$("#remoteForm").html(""),$(e).removeClass("hidden").attr("id","uploadFormContainer_remote").appendTo("#remoteForm"),$(e).find("form").on({submit:function(t){t.preventD