(function(){var A=function(C){var B=C.config.vbulletin.phrase;CKEDITOR.on("dialogDefinition",function(M){var G=M.data.name;var J=M.data.definition;if(G=="videotag"){var K=CKEDITOR.dialog.getCurrent();var F={ajax:1,"do":"getvideoproviders",securitytoken:C.config.vbulletin.securitytoken};var O=CKEDITOR.vbajax.open({url:"ajax.php",type:"POST",data:F,async:false,dataType:"xml"}).responseXML;var L="";var I=O.getElementsByTagName("provider");for(var H=0;H<I.length;H++){var N=I[H];var E=N.getAttribute("provider");var D=N.getAttribute("url");L+='<a target="_blank" href="'+D+'">'+E+"</a>&nbsp;"}J.getContents("videotag").elements[2].html=L}});return{title:B.insert_video_clip,onOk:function(E){var D=this.getValueOf("videotag","urlInput");if(PHP.trim(D)!=""){C.insertText("[VIDEO]"+D+"[/VIDEO]")}},onShow:function(){},minWidth:"300",minHeight:"200",contents:[{id:"videotag",elements:[{type:"text",id:"urlInput",label:B.enter_video_url_below,labelLayout:"vertical"},{type:"html",html:"<div>"+B.example_video_url+"</div><br/><div>"+B.supported_videos+"</div>"},{type:"html",id:"providerslist",html:""}]}]}};CKEDITOR.dialog.add("videotag",function(B){return A(B)})})();