// ************************
// *** animacje JD menu ***
// ************************

function onAnimateFadeInOut(show) {
    if (show) {
        $(this).hide().fadeIn('normal');
    } else {
        $(this).fadeOut('normal');
    }
}

function onAnimateSlideUpDown(show) {
    if (show) {
        $(this).hide().slideDown('fast');
    } else {
        $(this).slideUp('fast');
    }
}

function onAnimateSlideLeftRight(show) {
    if (show) {
        $(this).hide().animate({width: 'show'}, 'fast');
    } else {
        $(this).animate({width: 'hide'}, 'fast');
    }
}

function onAnimateShowHide(show) {
    if (show) {
        $(this).hide().show('normal');
    } else {
        $(this).hide('normal');
    }
}

// ***********************


// overwrite default messages
$.extend($.validator.messages, {
	required: "To pole jest wymagane.",
	date: "Please specify valid dates"
});
	
$(document).ready(function(){
  $("#wygraj").pngFix();
	$("#wyzwanie").pngFix();
		$("#CMSform").validate({errorElement: "span",
		errorPlacement: function(error, element) {error.appendTo(element.parent().prev());}
		
		});
});



