 $(document).ready(function() {
 	//Initialize tooltip
	$('abbr').tooltip({ 
		id: 'tyToolTip', 
		fade: 300, showURL: false, fixPNG: true, opacity: 1, top: 15, left: 0 
	});	
});

function removeReplyTo() {
	$('#commentRelId').val('0');
	$('#replyToComment').html('');
	$('#replyToComment').css('display','none');
}
	
function replyTo(commentId) {
	$('#commentRelId').val(commentId);
	var commentText = $('#commentText'+commentId).html();
	var deleteX = '<div class="comment-details floatr"><button type="button" class="mytyFormSubmitBtn" id="deleteReplyToComment" onclick="removeReplyTo();">Nicht antworten</button></div>';
	$('#replyToComment').html('<div class="comment-text floatl"><strong>Auf diesen Kommentar antworten: </strong><br/>' + commentText + '</div>' + deleteX + '<div class="fixfloat"></div>');
	$('#replyToComment').css('display','block');
}

function openLink( link ){
	$.fancybox(link, {
		'type':				'iframe', 
		'width':			800, 
		'height':			700,
		'autoScale':		false,			
		'hideOnOverlayClick': false,
		'onClosed': 		function() { location.reload(); }
	});
}

function move( id, posOld, posNew, mod){
	$.ajax({
		url: "/templates/faq/jquery/move.php",
		type: "POST",
		data: {qid: id, pos1: posOld, pos2: posNew, modul: mod },
		dataType: 'json',
		success: function(){
			location.reload();
		}
	});
}
