function validate_formmail(f)
{
antyspam_answer = $(".antyspamVer").attr('answer');
antyspam_value = $(".antyspamVer").val();
antyspam_title = $(".antyspamVer").attr('title');
if(antyspam_answer != antyspam_value || antyspam_value == '')
{
alert("Odpowiedz na pytanie weryfikujące");
return false;
}
required = 0;
wymagane = $(".required_field");
$.each(wymagane, function () {
title = $(this).attr('title');
wartosc = $(this).val();
if(wartosc.length < 3)
{
alert('Wypelnij pole obowiązkowe: '+title);
required++;
}
});
if(required > 0)
{
return false;
}
}
function registration()
{
required = 0;
required_titles = '';
wymagane = $(".required_field");
errorStyle = "solid 1px #FA5A5A";
okStyle = "solid 1px #BDBDBD";
var ErrorMsg = '';
mailValue = $(".userProfileEmail").val();
if(!MailIsValid(mailValue))
{
$(".userProfileEmail").css('border', errorStyle);
ErrorMsg = ErrorMsg+"
Podano nieprawidłowy adres e-mail";
required++;
}
else
{
$.get("Registration.html", { ajaxData: "get", userMail: mailValue },
function(data){
if(data == 'MAIL_EXIST')
{
$(".userProfileEmail").css('border', errorStyle);
alert("This e-mail address is already used");
required++;
}
else if(data == 'MAIL_EMPTY')
{
$(".userProfileEmail").css('border', errorStyle);
required++;
}
else
{
$(this).css('border', okStyle);
pass1 = $("#register1").val();
pass2 = $("#register2").val();
if(pass1 != pass2)
{
ErrorMsg = ErrorMsg+"
Podane hasła są różne";
$("#register1, #register2").css('border', errorStyle);
required++;
}
$.each(wymagane, function () {
title = $(this).attr('title');
wartosc = $(this).val();
if(wartosc.length < 1)
{
//alert('Wypelnij pole obowiązkowe: '+title);
//required_titles = required_titles+"
Fill in all fields
Wrong data was filled red colour"+ErrorMsg+"
dostawiam
"); console.log('xxx'); }, function(){ }); $('.hovers').hover( function () { var sciezka = $(this).attr("src"); var hover = sciezka.replace('public/gfx/', "public/gfx/Hovers/"); $(this).attr("src", hover); }, function () { var sciezka = $(this).attr("src"); var hover = sciezka.replace('public/gfx/Hovers/', "public/gfx/"); $(this).attr("src", hover); } ); function tooltip() { xOffset = 10; yOffset = 20; $(".pokazOpis").hover(function(e){ t = $(this).attr('title'); baseTitle = t; $(this).removeAttr('title'); $("body").append(""+ t +"
"); $("#tooltipA") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ title = baseTitle; $(this).attr('title', title); $("#tooltipA").remove(); }); $(".pokazOpis").mousemove(function(e){ $("#tooltipA") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); } tooltip(); function FitToScreen() { screenHeight = $(window).height(); containerHeight = $("#container").height(); footerHeight = $("#footer").height(); headerHeight = $("#header").height(); if(screenHeight < containerHeight) { $("#bgTopLeft").height(containerHeight+"px"); $("#bgTopRight").height(containerHeight+"px"); } else { $("#bgTopLeft").height(screenHeight+"px"); $("#bgTopRight").height(screenHeight+"px"); //$("#content").height((screenHeight-headerHeight-footerHeight-80)+"px"); } } FitToScreen(); //window.onresize = function() { FitToScreen(); } setTimeout("FitToScreen()",2000); $(function() { //$('a.lightbox').lightBox({fixedNavigation:true}); $("a[rel^='prettyPhoto'], a.lightbox").prettyPhoto({theme:'facebook'}); var so = new SWFObject("flash_980x249.swf", "header", "980", "249", "8", ""); so.addParam("wmode", "transparent"); so.write("header"); });