var area_key="";var ttl="Due to working Qinput functionality all editable links are disabled. For switching to normal mode just log off in your Admin Panel.";$(document).ready(function(){	var ck_obj=$("#ck");	if(ck_obj.length>0) CKEDITOR.replace('ck', {toolbar : [['Source','-'],['Cut','Copy','Paste','PasteText','PasteFromWord'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],['TextColor','BGColor'],['Maximize', 'ShowBlocks'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','SpecialChar'],['Styles','Format','Font','FontSize']],enterMode : Number(2), shiftEnterMode : Number(3)});});function setQinput(key) {	var txt=$(".qinput_"+key);	txt.attr("title","Double click on this area to edit it.");	var backstyle=txt.css("background-color");	txt.mousemove(function(){txt.css("background-color","red")});	txt.mouseout(function(){txt.css("background-color",backstyle)});	blockLinks(key);	txt.dblclick(function() {		prepareText(txt,key);		area_key=key;	});}function blockLinks(key) {	$(".qinput_"+key+" a").click(function(){return false;});	$(".qinput_"+key+" a").attr("title",ttl);	return false;}function prepareText(obj,key) {	if(obj) {		$(".qinput_"+key+" a").attr("title","");		var text=obj.html();		CKEDITOR.instances.ck.setData(text);		$.fn.colorbox({open:true,inline:true,href:"#ckedit"});	}}function sendForm() {	var trsl=CKEDITOR.instances.ck.getData();	$.ajax({		url: '/neuro/engine/ajax/qinput',		type: 'POST',		cache: 'false',		data: "data="+encodeURIComponent(trsl)+"&key="+area_key,		success: function (data, textStatus) {			$(".qinput_"+area_key).html(trsl);			blockLinks(area_key);			area_key="";			$.fn.colorbox.close();		}	});}function clearData() {	$.ajax({		url: '/neuro/engine/ajax/qinput',		type: 'POST',		cache: 'false',		data: "act=cleardata&key="+area_key,		success: function (data, textStatus) {			$(".qinput_"+area_key).html(data);			area_key="";			$.fn.colorbox.close();		}	});}
