
            $(function(){
               $.fn.formLabels();
			  $.fn.formLabels.refreshLabels()
            });

$(document).ready(function() {
$('.opis_cont').mouseenter(function() {
		var span = $(this).find('.bg');
		span.stop();
		span.animate({
			width : '420px'
		}, 250);
		
		 $(this).find('h3').animate({
    opacity: 0.25,
    paddingLeft: '50'
  }, 250, function() {
    // Animation complete.
  });
		
		
	});
	$('.opis_cont').mouseleave(function() {
		var span = $(this).find('.bg');
		span.stop();
		span.animate({
			width : 0
		}, 250);
		
		
		$(this).find('h3').animate({
    opacity: 1,
    paddingLeft: '18'
  }, 400, function() {
    // Animation complete.
  });
		
	});
});


 
    $(document).ready(
	function(){
		$(".buttSon_next").hover(
			function() 
			{
				$(this).stop().animate({"opacity": "0"}, "slow");
			},
			function() {
				$(this).stop().animate({"opacity": "1"}, "slow");
			}
		);
	}
);

$(document).ready(function() {
	$('.button_next a').mouseenter(function() {
		var span = $(this)
		span.stop();
		span.animate({
		}, 250);
		
		 $(this).animate({
	backgroundPosition:'0 0'
  }, 250, function() {
    // Animation complete.
  });
		
		
	});
	$('.button_next a').mouseleave(function() {
		var span = $(this)
		span.stop();
		span.animate({
			//width : '50px'
		}, 250);
		$(this).animate({
	backgroundPosition:'-50px 0px'
    //height: 'toggle'
  }, 400, function() {
    // Animation complete.
  });	
	});
});
$('#head_inside1') .click(function(){ $(this) .animate({backgroundPosition: '500px 150px'}) .animate({backgroundPosition: '-20px 250px'}) ; });


$(document).ready(function() {
	$("#wiadomosc").validate({
							 errorLabelContainer: $("#form_komunikaty"),
							 
messages: {
			email: {
				required: 'Wprowadź adres e-mail',
				email: 'Podaj poprawny adres e-mail'
			},
			tresc: {
				required: 'Brakuje treści wiadomości'
			},
			zatwierdz: {
				required: 'Zaznacz'
			},
			temat: {
				required: 'Wprowadź temat wiadomości',
				minlength: 'Temat jest za króki'
			},
			imie_nazwisko: {
			required: 'Wprowadź imię i nazwisko lub nazwę firmy',
			minlength: 'Wprowadź poprawne dane'
			}
		},
				rules: {
    email: {
      required: true,
      email: true
    },
	    imie_nazwisko: {
      required: true,
	  minlength: 4
    },
		    temat: {
      required: true,
	  minlength: 4
    }
  }
	});
});

        // wait for the DOM to be loaded 
        $(document).ready(function() { 
            // bind 'myForm' and provide a simple callback function 
           $('#commentForm').ajaxForm(function() { 
               alert("Twoja wiadomość została wysłana"); 
			   $('#commentForm').clearForm();
           }); 
        }); 
		
		$('#commentForm').submit(function() { 
    // submit the form 
    $(this).ajaxSubmit(); 
    // return false to prevent normal browser submit and page navigation 
    return false; 
});
