function CheckKontaktForm()
{
	if ($('input[name=Name]').val() == '') alert("Proszę podać imię i nazwisko");
        else if ($('input[name=Mail]').val() == '') alert("Proszę podać e-mail");
        else if ($('input[name=Tel]').val() == '') alert("Proszę podać telefon");
        else if ($('textarea[name=Msg]').val() == '') alert("Proszę podać wiadomość");
        else document.contact.submit();
}

function CheckNewsletter()
{
   if (!$('.agree').attr('checked')) alert("Proszę wyrażić zgodę na otrzymywanie informacji drogą elektroniczną");
   else document.newsletter.submit();
}
			
			$(document).ready(function() {

				$('body').append('<div id="anchorTitle" class="anchorTitle1"></div>');

				$('img[title!=""]').each(function() {

					var a = $(this);

					a.hover(
						function() {
							showAnchorTitle(a, a.data('title')); 
						}, 
						function() { 
							hideAnchorTitle();
						}
					)
					.data('title', a.attr('title'))
					.removeAttr('title');

				});


			});

			function showAnchorTitle(element, text) {

				var offset = element.offset();

				$('#anchorTitle')
				.css({ 
					'top'  : (offset.top + element.outerHeight() + 4) + 'px',
					'left' : offset.left + 'px'
				})
				.html(text)
				.show();

			}

			function hideAnchorTitle() {
				$('#anchorTitle').hide();
			}
			

