$(function() {
$('#set1 *').tooltip();

$('.post img').tooltip({
	delay: 0,
	showURL: false,
	fade: 100,
	top: 20,
	bodyHandler: function() {
		return $("<img/>").attr({
		src: this.src,
		height: "350"
		});
	}
});

$('a').tooltip({
	track: true,
	delay: 50,
	showBody: " - ",
	showURL: true,
	fade: 250,
	extraClass: "tipCloud"
});

$('#komentarze').hide();
$('a#pokaz-komentarz').click(function() {
    $('#komentarze').toggle(1000);
    return false;
  });
$('#infoCloud').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	showBody: " - ",
	extraClass: "infoCloud",
	fixPNG: true,
	left: -120,
        height: "350"
});

});
var defaultComment = new Array()
$(document).ready(function() { // Pobieramy standardowe
defaultComment.Nick = document.addComment.Nick.value
defaultComment.Www = document.addComment.Www.value
defaultComment.Email = document.addComment.Email.value
defaultComment.comment = document.addComment.comment.value
xajax_xSetCommenterFromCookie()
});

function asyncAddComment(){
if(document.addComment.Nick.value == defaultComment.Nick) document.addComment.Nick.value = ""
if(document.addComment.Email.value  == defaultComment.Email) document.addComment.Email.value = ""
if(document.addComment.Www.value  == defaultComment.Www) document.addComment.Www.value = ""
if(document.addComment.comment.value  == defaultComment.comment) document.addComment.comment.value = ""
document.addComment.send.innerHTML = "<img src=\"./js/icons/waitComment.gif\" />"
document.addComment.send.disabled = "disabled"
xajax_xAddComment(xajax.getFormValues('addComment'))
}

function banCommenter(id){
jPrompt('Podaj powód banicji','','Banicja', function(r){xajax_xBanCommentersIP(id, r)} )
}